This commit is contained in:
Redkale
2018-04-20 20:54:36 +08:00
parent 6c05a4a038
commit e64d522707

View File

@@ -96,6 +96,14 @@ public abstract class PoolSource<T> {
} else if ("sqlserver".equals(this.dbtype)) {
this.props.setProperty(JDBC_CONTAIN_SQLTEMPLATE, "CHARINDEX(${column}, ${keystr}) > 0");
this.props.setProperty(JDBC_NOTCONTAIN_SQLTEMPLATE, "CHARINDEX(${column}, ${keystr}) = 0");
} else
if ("postgresql".equals(this.dbtype)) {
if (!this.props.containsKey(JDBC_TABLECOPY_SQLTEMPLATE)) {
this.props.setProperty(JDBC_TABLECOPY_SQLTEMPLATE, "CREATE TABLE ${newtable} AS (SELECT * FROM ${oldtable} LIMIT 0)");
}
if (!this.props.containsKey(JDBC_TABLENOTEXIST_SQLSTATES)) {
this.props.setProperty(JDBC_TABLENOTEXIST_SQLSTATES, "42P01");
}
}
}