All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.wicp.tams.common.http.flink.SqlCmdWrapper Maven / Gradle / Ivy

The newest version!
package net.wicp.tams.common.http.flink;

import lombok.Data;

@Data
public class SqlCmdWrapper {
	private String catalog;
	private String db;
//	private final String[] hasCatalog = new String[] { "mycatalog", "tscatalog" };
	public SqlCmdWrapper(String catalog, String db) {
//在没有做init时并没有设置catalog,所以不能校验
//		if (!ArrayUtils.contains(hasCatalog, catalog)) {
//			throw new ProjectExceptionRuntime(ExceptAll.flink_catalog_nosuppert, "只允许mycatalog和tscatalog");
//		}
		this.catalog = catalog;
		this.db = db;
	}
	public SqlCmdWrapper() {
		this.catalog="";
		this.db="";
	}

	public String getSql(SqlCmd cmd, Object... params) {
		return cmd.getSql(this.catalog, this.db, params);
	}

	public String getFormater(SqlCmd cmd) {
		return cmd.getFormater(this.catalog, this.db);
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy