SQLUtils

Undocumented in source.
class SQLUtils {}

Members

Static functions

DEFAULT_FORMAT_OPTION
FormatOption DEFAULT_FORMAT_OPTION()
Undocumented in source. Be warned that the author may not have intended to support it.
DEFAULT_LCASE_FORMAT_OPTION
FormatOption DEFAULT_LCASE_FORMAT_OPTION()
Undocumented in source. Be warned that the author may not have intended to support it.
addCondition
string addCondition(string sql, string condition, string dbType)
Undocumented in source. Be warned that the author may not have intended to support it.
addCondition
string addCondition(string sql, string condition, SQLBinaryOperator op, bool left, string dbType)
Undocumented in source. Be warned that the author may not have intended to support it.
addCondition
void addCondition(SQLStatement stmt, SQLBinaryOperator op, SQLExpr condition, bool left)
Undocumented in source. Be warned that the author may not have intended to support it.
addSelectItem
string addSelectItem(string selectSql, string expr, string _alias, string dbType)
Undocumented in source. Be warned that the author may not have intended to support it.
addSelectItem
string addSelectItem(string selectSql, string expr, string _alias, bool first, string dbType)
Undocumented in source. Be warned that the author may not have intended to support it.
addSelectItem
void addSelectItem(SQLStatement stmt, SQLExpr expr, string _alias, bool first)
Undocumented in source. Be warned that the author may not have intended to support it.
addSelectItem
void addSelectItem(SQLSelectQueryBlock queryBlock, SQLExpr expr, string _alias, bool first)
Undocumented in source. Be warned that the author may not have intended to support it.
buildCondition
SQLExpr buildCondition(SQLBinaryOperator op, SQLExpr condition, bool left, SQLExpr where)
Undocumented in source. Be warned that the author may not have intended to support it.
buildToDate
string buildToDate(string columnName, string tableAlias, string pattern, string dbType)

@param columnName @param tableAlias @param pattern if pattern is null,it will be set {%Y-%m-%d %H:%i:%s} as mysql default value and set {yyyy-mm-dd hh24:mi:ss} as oracle default value @param dbType {@link DBType} if dbType is null ,it will be set the mysql as a default value

createFormatOutputVisitor
SQLASTOutputVisitor createFormatOutputVisitor(Appendable _out, List!(SQLStatement) statementList, string dbType)
Undocumented in source. Be warned that the author may not have intended to support it.
createOutputVisitor
SQLASTOutputVisitor createOutputVisitor(Appendable _out, string dbType)
Undocumented in source. Be warned that the author may not have intended to support it.
createSchemaStatVisitor
SchemaStatVisitor createSchemaStatVisitor(List!(SQLStatement) statementList, string dbType)
Undocumented in source. Be warned that the author may not have intended to support it.
createSchemaStatVisitor
SchemaStatVisitor createSchemaStatVisitor(string dbType)
Undocumented in source. Be warned that the author may not have intended to support it.
desensitizeTable
string desensitizeTable(string tableName)
Undocumented in source. Be warned that the author may not have intended to support it.
format
string format(string sql, string dbType)
Undocumented in source. Be warned that the author may not have intended to support it.
format
string format(string sql, string dbType, FormatOption option)
Undocumented in source. Be warned that the author may not have intended to support it.
format
string format(string sql, string dbType, List!(Object) parameters)
Undocumented in source. Be warned that the author may not have intended to support it.
format
string format(string sql, string dbType, List!(Object) parameters, FormatOption option)
Undocumented in source. Be warned that the author may not have intended to support it.
formatMySql
string formatMySql(string sql)
Undocumented in source. Be warned that the author may not have intended to support it.
formatMySql
string formatMySql(string sql, FormatOption option)
Undocumented in source. Be warned that the author may not have intended to support it.
formatPGSql
string formatPGSql(string sql, FormatOption option)
Undocumented in source. Be warned that the author may not have intended to support it.
hash
long hash(string sql, string dbType)
Undocumented in source. Be warned that the author may not have intended to support it.
isValue
bool isValue(SQLExpr expr)
Undocumented in source. Be warned that the author may not have intended to support it.
nameEquals
bool nameEquals(SQLName a, SQLName b)
Undocumented in source. Be warned that the author may not have intended to support it.
nameEquals
bool nameEquals(string a, string b)
Undocumented in source. Be warned that the author may not have intended to support it.
normalize
string normalize(string name)
Undocumented in source. Be warned that the author may not have intended to support it.
normalize
string normalize(string name, string dbType)
Undocumented in source. Be warned that the author may not have intended to support it.
not
SQLExpr not(SQLExpr expr)
Undocumented in source. Be warned that the author may not have intended to support it.
parseStatements
List!(SQLStatement) parseStatements(string sql, string dbType)
Undocumented in source. Be warned that the author may not have intended to support it.
parseStatements
List!(SQLStatement) parseStatements(string sql, string dbType, bool keepComments)
Undocumented in source. Be warned that the author may not have intended to support it.
refactor
string refactor(string sql, string dbType, Map!(string, string) tableMapping)
Undocumented in source. Be warned that the author may not have intended to support it.
replaceInParent
bool replaceInParent(SQLExpr expr, SQLExpr target)
Undocumented in source. Be warned that the author may not have intended to support it.
sort
string sort(string sql, string dbType)

@param sql @param dbType @return

split
List!(SQLExpr) split(SQLBinaryOpExpr x)
Undocumented in source. Be warned that the author may not have intended to support it.
toMySqlExpr
SQLExpr toMySqlExpr(string sql)
Undocumented in source. Be warned that the author may not have intended to support it.
toMySqlString
string toMySqlString(SQLObject sqlObject)
Undocumented in source. Be warned that the author may not have intended to support it.
toMySqlString
string toMySqlString(SQLObject sqlObject, VisitorFeature[] features)
Undocumented in source. Be warned that the author may not have intended to support it.
toMySqlString
string toMySqlString(SQLObject sqlObject, FormatOption option)
Undocumented in source. Be warned that the author may not have intended to support it.
toOrderByItem
SQLSelectOrderByItem toOrderByItem(string sql, string dbType)
Undocumented in source. Be warned that the author may not have intended to support it.
toPGString
string toPGString(SQLObject sqlObject)
Undocumented in source. Be warned that the author may not have intended to support it.
toPGString
string toPGString(SQLObject sqlObject, FormatOption option)
Undocumented in source. Be warned that the author may not have intended to support it.
toSQLExpr
SQLExpr toSQLExpr(string sql, string dbType)
Undocumented in source. Be warned that the author may not have intended to support it.
toSQLExpr
SQLExpr toSQLExpr(string sql)
Undocumented in source. Be warned that the author may not have intended to support it.
toSQLString
string toSQLString(SQLObject sqlObject, string dbType)
Undocumented in source. Be warned that the author may not have intended to support it.
toSQLString
string toSQLString(SQLObject sqlObject, string dbType, FormatOption option)
Undocumented in source. Be warned that the author may not have intended to support it.
toSQLString
string toSQLString(SQLObject sqlObject)
Undocumented in source. Be warned that the author may not have intended to support it.
toSQLString
string toSQLString(List!(SQLStatement) statementList, string dbType)
Undocumented in source. Be warned that the author may not have intended to support it.
toSQLString
string toSQLString(List!(SQLStatement) statementList, string dbType, FormatOption option)
Undocumented in source. Be warned that the author may not have intended to support it.
toSQLString
string toSQLString(List!(SQLStatement) statementList, DBType dbType, FormatOption option)
Undocumented in source. Be warned that the author may not have intended to support it.
toSQLString
string toSQLString(List!(SQLStatement) statementList, string dbType, List!(Object) parameters)
Undocumented in source. Be warned that the author may not have intended to support it.
toSQLString
string toSQLString(List!(SQLStatement) statementList, string dbType, List!(Object) parameters, FormatOption option)
Undocumented in source. Be warned that the author may not have intended to support it.
toSQLString
string toSQLString(List!(SQLStatement) statementList, string dbType, List!(Object) parameters, FormatOption option, Map!(string, string) tableMapping)
Undocumented in source. Be warned that the author may not have intended to support it.
toSelectItem
SQLSelectItem toSelectItem(string sql, string dbType)
Undocumented in source. Be warned that the author may not have intended to support it.
toStatementList
List!(SQLStatement) toStatementList(string sql, string dbType)
Undocumented in source. Be warned that the author may not have intended to support it.
toUpdateSetItem
SQLUpdateSetItem toUpdateSetItem(string sql, string dbType)
Undocumented in source. Be warned that the author may not have intended to support it.

Meta