Package liquibase.sqlgenerator.core
Class InsertOrUpdateGeneratorSQLite
java.lang.Object
liquibase.sqlgenerator.core.AbstractSqlGenerator<InsertOrUpdateStatement>
liquibase.sqlgenerator.core.InsertOrUpdateGenerator
liquibase.sqlgenerator.core.InsertOrUpdateGeneratorSQLite
- All Implemented Interfaces:
PrioritizedService
,SqlGenerator<InsertOrUpdateStatement>
Adds an ON CONFLICT REPLACE clause to an INSERT INTO ... statement for SQLite.
-
Field Summary
Fields inherited from interface liquibase.servicelocator.PrioritizedService
COMPARATOR
Fields inherited from interface liquibase.sqlgenerator.SqlGenerator
EMPTY_SQL, PRIORITY_DATABASE, PRIORITY_DEFAULT
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected String
protected String
getInsertStatement
(InsertOrUpdateStatement insertOrUpdateStatement, Database database, SqlGeneratorChain sqlGeneratorChain) protected String
getRecordCheck
(InsertOrUpdateStatement insertOrUpdateStatement, Database database, String whereClause) protected String
getUpdateStatement
(InsertOrUpdateStatement insertOrUpdateStatement, Database database, String whereClause, SqlGeneratorChain sqlGeneratorChain) Generates an SQL UPDATE statement for the specified insert or update statement, database, and SQL generator chain.boolean
supports
(InsertOrUpdateStatement statement, Database database) Does this generator support the given statement/database combination?Methods inherited from class liquibase.sqlgenerator.core.InsertOrUpdateGenerator
generateSql, getAffectedTable, getPostUpdateStatements, getPriority, getWhereClause, validate
Methods inherited from class liquibase.sqlgenerator.core.AbstractSqlGenerator
generateRollbackStatementsIsVolatile, generateStatementsIsVolatile, looksLikeFunctionCall, warn
-
Constructor Details
-
InsertOrUpdateGeneratorSQLite
public InsertOrUpdateGeneratorSQLite()
-
-
Method Details
-
supports
Description copied from interface:SqlGenerator
Does this generator support the given statement/database combination? Do not validate the statement with this method, only return if it can support it.- Specified by:
supports
in interfaceSqlGenerator<InsertOrUpdateStatement>
- Overrides:
supports
in classAbstractSqlGenerator<InsertOrUpdateStatement>
-
getInsertStatement
protected String getInsertStatement(InsertOrUpdateStatement insertOrUpdateStatement, Database database, SqlGeneratorChain sqlGeneratorChain) - Overrides:
getInsertStatement
in classInsertOrUpdateGenerator
-
getUpdateStatement
protected String getUpdateStatement(InsertOrUpdateStatement insertOrUpdateStatement, Database database, String whereClause, SqlGeneratorChain sqlGeneratorChain) Description copied from class:InsertOrUpdateGenerator
Generates an SQL UPDATE statement for the specified insert or update statement, database, and SQL generator chain.- Overrides:
getUpdateStatement
in classInsertOrUpdateGenerator
- Parameters:
insertOrUpdateStatement
- the insert or update statement to generate the update statement fromdatabase
- the database to generate the update statement forwhereClause
- the WHERE clause to use in the update statementsqlGeneratorChain
- the SQL generator chain to use in the update statement- Returns:
- the generated update statement, or
null
if there is nothing to update
-
getRecordCheck
protected String getRecordCheck(InsertOrUpdateStatement insertOrUpdateStatement, Database database, String whereClause) - Specified by:
getRecordCheck
in classInsertOrUpdateGenerator
-
getElse
- Specified by:
getElse
in classInsertOrUpdateGenerator
-