A single SqlStatement may yield multiple SQL commands, and may yield a different number of SQL commands depending on the database. If a particular statement. The SqlStatement implementations do not actually generate SQL strings, that is left to the SqlGenerator implementations. Instead, the purpose of the SqlStatement implementation is to hold the metadata required to generate the correct SQL for a particular database at a later time. @see liquibase.change.Change @see liquibase.sqlgenerator.SqlGenerator @see liquibase.sqlgenerator.SqlGeneratorFactory
SqlStatement
is used to generate SQL Statements. Prepare the generated Statements and also to parse the resultSets
SELECT {expr}, {expr}, ... FROM {tblExpr} [joinInfo {tblExpr} ON ...] ... WHERE {boolExpr} [AND|OR] {boolExpr} ... GROUP BY {expr}, {expr} HAVING {boolExpr} ORDER BY {expr} [ASC|DESC], {expr} [ASC|DESC], ...and also supports UNIONs between SQLStatements, and having sub-queries of other SQLStatements. Alternatively, for an UPDATE,
UPDATE {tbl} SET {expr}={val}, {expr}={val}, ... WHERE {boolExpr} [AND|OR] {boolExpr} ...
The generated SQL is cached. Any use of a mutating method, changing the composition of the statement will clear the cached SQL, and it will be regenerated when
getStatementis called next.
|
|