Top Inners Fields Constructors Methods
liquibase.database.core

public Class SQLiteDatabase

extends AbstractJdbcDatabase
Class Inheritance
Imports
liquibase.CatalogAndSchema, .Scope, liquibase.change.AddColumnConfig, .ColumnConfig, liquibase.change.core.CreateTableChange, liquibase.database.AbstractJdbcDatabase, .Database, .DatabaseConnection, liquibase.exception.DatabaseException, .UnexpectedLiquibaseException, liquibase.executor.ExecutorService, liquibase.snapshot.InvalidExampleException, .SnapshotControl, .SnapshotGeneratorFactory, liquibase.sql.Sql, liquibase.sqlgenerator.SqlGeneratorFactory, liquibase.statement.SqlStatement, liquibase.statement.core.*, liquibase.structure.DatabaseObject, liquibase.structure.core.*, liquibase.util.ISODateFormat, java.math.BigInteger, java.util.*

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface

Field Summary

Modifier and TypeField and Description
public static final String
private final Set<String>
Inherited from liquibase.database.AbstractJdbcDatabase:
caseSensitivecurrentDateTimeFunctiondateFunctionsdefaultAutoIncrementBydefaultAutoIncrementStartWithdefaultCatalogNamedefaultSchemaNamequotingStrategysequenceCurrentValueFunctionsequenceNextValueFunctionunmodifiableDataTypesunquotedObjectsAreUppercased

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected boolean
protected boolean
public static Sql[]

Returns:

an array of Sql objects containing the generated SQL statements
getAlterTableSqls
(Database
the database to generate SQL for
database
,
SQLiteDatabase.AlterTableVisitor
the visitor to use for generating the ALTER TABLE statements
alterTableVisitor
,
String
the name of the catalog containing the table (may be null)
catalogName
,
String
the name of the schema containing the table (may be null)
schemaName
,
String
the name of the table to alter
tableName
)

Uses the SqlGeneratorFactory to generate SQL statements for altering the specified table in the given database.

public static List<SqlStatement>
getAlterTableStatements(SQLiteDatabase.AlterTableVisitor alterTableVisitor, Database database, String catalogName, String schemaName, String tableName)

public String
public String
protected String
public String
getDefaultDriver(String url)

Implements liquibase.database.Database.getDefaultDriver.

If this database understands the given url, return the default driver class name.

public Integer
public int
public String
getShortName()

Implements liquibase.database.Database.getShortName.

Returns an all-lower-case short name of the product.

protected Set<String>
getSystemTables()

Overrides liquibase.database.AbstractJdbcDatabase.getSystemTables.

Returns system (undroppable) views.

protected Set<String>
getSystemViews()

Overrides liquibase.database.AbstractJdbcDatabase.getSystemViews.

Returns system (undroppable) views.

public String
getTrigger(String table, String column)

public String
public boolean
isCorrectDatabaseImplementation(DatabaseConnection conn)

Implements liquibase.database.Database.isCorrectDatabaseImplementation.

Is this AbstractDatabase subclass the correct one to use for the given connection.

public boolean
supportsCreateIfNotExists(Class<? extends DatabaseObject>
the DatabaseObject type to be checked.
type
)

Overrides default liquibase.database.Database.supportsCreateIfNotExists.

Does the database support the "if not exits" syntax?

public boolean
public boolean
supportsInitiallyDeferrableColumns()

Implements liquibase.database.Database.supportsInitiallyDeferrableColumns.

Returns whether this database support initially deferrable columns.

public boolean
public boolean
public boolean
Inherited from liquibase.database.AbstractJdbcDatabase:
addReservedWordscanCreateChangeLogTableclosecommitcorrectObjectNamecorrectSchemacorrectSchemacreatesIndexesForForeignKeysdataTypeIsNotModifiabledisableForeignKeyChecksdoesTagExistdropDatabaseObjectsenableForeignKeyChecksequalsescapeColumnNameescapeColumnNameescapeColumnNameListescapeConstraintNameescapeDataTypeNameescapeIndexNameescapeObjectNameescapeObjectNameescapeSequenceNameescapeStringForDatabaseescapeTableNameescapeViewNameexecuteexecuteRollbackStatementsexecuteRollbackStatementsexecuteStatementsfilterRollbackVisitorsgenerateDatabaseFunctionValuegeneratePrimaryKeyNamegetgetAutoCommitModegetAutoIncrementByClausegetAutoIncrementClausegetAutoIncrementClausegetAutoIncrementClosinggetAutoIncrementOpeninggetAutoIncrementStartWithClausegetConcatSqlgetConnectiongetConnectionCatalogNamegetConnectionSchemaNamegetConnectionSchemaNameCallStatementgetContainingObjectsgetCurrentDateTimeFunctiongetDatabaseChangeLogLockTableNamegetDatabaseChangeLogTableNamegetDatabaseMajorVersiongetDatabaseMinorVersiongetDatabaseProductNamegetDatabaseProductVersiongetDataTypeMaxParametersgetDateFunctionsgetDateLiteralgetDateLiteralgetDateLiteralgetDefaultCatalogNamegetDefaultFractionalDigitsForTimestampgetDefaultScaleForNativeDataTypegetDefaultSchemagetDefaultSchemaNamegetFetchSizegetJdbcCatalogNamegetJdbcCatalogNamegetJdbcSchemaNamegetJdbcSchemaNamegetLineCommentgetLiquibaseCatalogNamegetLiquibaseSchemaNamegetLiquibaseTablespaceNamegetMaxFractionalDigitsForTimestampgetNamegetObjectQuotingStrategygetOutputDefaultCataloggetOutputDefaultSchemagetQuotingEndCharactergetQuotingEndReplacementgetQuotingStartCharactergetRanChangeSetgetRanChangeSetListgetRanDategetRawDatabaseChangeLogLockTableNamegetRawDatabaseChangeLogTableNamegetRunStatusgetSchemaAndCatalogCasegetSchemaFromJdbcInfogetSystemSchemagetTimeLiteralhashCodeisAutoCommitisCaseSensitiveisCatalogOrSchemaTypeisCurrentTimeFunctionisDateOnlyisDateTimeisDefaultCatalogisDefaultSchemaisFunctionisLiquibaseObjectisReservedWordisSafeToRunUpdateisSystemObjectisSystemViewisTimeOnlyisTimestampjdbcCallsCatalogsSchemasmarkChangeSetExecStatusmustQuoteObjectNameparseDatequoteObjectremoveRanStatusrequiresExplicitNullForColumnsrequiresPasswordrequiresUsernameresetInternalStaterollbacksaveRollbackStatementsaveStatementssetsetAutoCommitsetCanCacheLiquibaseTableInfosetCaseSensitivesetConnectionsetCurrentDateTimeFunctionsetDatabaseChangeLogLockTableNamesetDatabaseChangeLogTableNamesetDefaultCatalogNamesetDefaultSchemaNamesetLiquibaseCatalogNamesetLiquibaseSchemaNamesetLiquibaseTablespaceNamesetObjectQuotingStrategysetOutputDefaultCatalogsetOutputDefaultSchemastartsWithNumericsupportsAutoIncrementsupportsBatchUpdatessupportsCatalogInObjectNamesupportsCatalogssupportsDDLInTransactionsupportsForeignKeyDisablesupportsNotNullConstraintNamessupportsPrimaryKeyNamessupportsRestrictForeignKeystagtoStringunescapeDataTypeNameunescapeDataTypeStringvalidate

Field Detail

PRODUCT_NAMEback to summary
public static final String PRODUCT_NAME
systemTablesback to summary
private final Set<String> systemTables

Constructor Detail

SQLiteDatabaseback to summary
public SQLiteDatabase()

Method Detail

generateAutoIncrementByback to summary
protected boolean generateAutoIncrementBy(BigInteger incrementBy)

Overrides liquibase.database.AbstractJdbcDatabase.generateAutoIncrementBy.

Annotations
@Override
generateAutoIncrementStartWithback to summary
protected boolean generateAutoIncrementStartWith(BigInteger startWith)

Overrides liquibase.database.AbstractJdbcDatabase.generateAutoIncrementStartWith.

Annotations
@Override
getAlterTableSqlsback to summary
public static Sql[] getAlterTableSqls(Database database, SQLiteDatabase.AlterTableVisitor alterTableVisitor, String catalogName, String schemaName, String tableName)

Uses the SqlGeneratorFactory to generate SQL statements for altering the specified table in the given database.

Parameters
database:Database

the database to generate SQL for

alterTableVisitor:SQLiteDatabase.AlterTableVisitor

the visitor to use for generating the ALTER TABLE statements

catalogName:String

the name of the catalog containing the table (may be null)

schemaName:String

the name of the schema containing the table (may be null)

tableName:String

the name of the table to alter

Returns:Sql[]

an array of Sql objects containing the generated SQL statements

Exceptions
UnexpectedLiquibaseException:
if an error occurs during SQL generation
getAlterTableStatementsback to summary
public static List<SqlStatement> getAlterTableStatements(SQLiteDatabase.AlterTableVisitor alterTableVisitor, Database database, String catalogName, String schemaName, String tableName) throws DatabaseException
getAutoIncrementClauseback to summary
public String getAutoIncrementClause()

Overrides liquibase.database.AbstractJdbcDatabase.getAutoIncrementClause.

Annotations
@Override
getDateTimeLiteralback to summary
public String getDateTimeLiteral(Timestamp date)

Overrides liquibase.database.AbstractJdbcDatabase.getDateTimeLiteral.

Implements liquibase.database.Database.getDateTimeLiteral.

Annotations
@Override
getDefaultDatabaseProductNameback to summary
protected String getDefaultDatabaseProductName()

Implements abstract liquibase.database.AbstractJdbcDatabase.getDefaultDatabaseProductName.

Annotations
@Override
getDefaultDriverback to summary
public String getDefaultDriver(String url)

Implements liquibase.database.Database.getDefaultDriver.

Doc from liquibase.database.Database.getDefaultDriver.

If this database understands the given url, return the default driver class name. Otherwise return null.

Annotations
@Override
getDefaultPortback to summary
public Integer getDefaultPort()

Implements liquibase.database.Database.getDefaultPort.

Annotations
@Override
getPriorityback to summary
public int getPriority()

Implements liquibase.servicelocator.PrioritizedService.getPriority.

Annotations
@Override
getShortNameback to summary
public String getShortName()

Implements liquibase.database.Database.getShortName.

Doc from liquibase.database.Database.getShortName.

Returns an all-lower-case short name of the product. Used for end-user selecting of database type such as the DBMS precondition.

Annotations
@Override
getSystemTablesback to summary
protected Set<String> getSystemTables()

Overrides liquibase.database.AbstractJdbcDatabase.getSystemTables.

Doc from liquibase.database.AbstractJdbcDatabase.getSystemTables.

Returns system (undroppable) views.

Annotations
@Override
getSystemViewsback to summary
protected Set<String> getSystemViews()

Overrides liquibase.database.AbstractJdbcDatabase.getSystemViews.

Doc from liquibase.database.AbstractJdbcDatabase.getSystemViews.

Returns system (undroppable) views.

Annotations
@Override
getTriggerback to summary
public String getTrigger(String table, String column)
getViewDefinitionback to summary
public String getViewDefinition(CatalogAndSchema schema, String viewName) throws DatabaseException

Overrides liquibase.database.AbstractJdbcDatabase.getViewDefinition.

Implements liquibase.database.Database.getViewDefinition.

Annotations
@Override
isCorrectDatabaseImplementationback to summary
public boolean isCorrectDatabaseImplementation(DatabaseConnection conn) throws DatabaseException

Implements liquibase.database.Database.isCorrectDatabaseImplementation.

Doc from liquibase.database.Database.isCorrectDatabaseImplementation.

Is this AbstractDatabase subclass the correct one to use for the given connection.

Annotations
@Override
supportsCreateIfNotExistsback to summary
public boolean supportsCreateIfNotExists(Class<? extends DatabaseObject> type)

Overrides default liquibase.database.Database.supportsCreateIfNotExists.

Doc from liquibase.database.Database.supportsCreateIfNotExists.

Does the database support the "if not exits" syntax?

Parameters
type:Class<? extends DatabaseObject>

the DatabaseObject type to be checked.

Returns:boolean

true if the "if not exists" syntax is supported, false otherwise.

Annotations
@Override
supportsDropTableCascadeConstraintsback to summary
public boolean supportsDropTableCascadeConstraints()

Overrides liquibase.database.AbstractJdbcDatabase.supportsDropTableCascadeConstraints.

Implements liquibase.database.Database.supportsDropTableCascadeConstraints.

Annotations
@Override
supportsInitiallyDeferrableColumnsback to summary
public boolean supportsInitiallyDeferrableColumns()

Implements liquibase.database.Database.supportsInitiallyDeferrableColumns.

Doc from liquibase.database.Database.supportsInitiallyDeferrableColumns.

Returns whether this database support initially deferrable columns.

Annotations
@Override
supportsSchemasback to summary
public boolean supportsSchemas()

Overrides liquibase.database.AbstractJdbcDatabase.supportsSchemas.

Implements liquibase.database.Database.supportsSchemas.

Annotations
@Override
supportsSequencesback to summary
public boolean supportsSequences()

Overrides liquibase.database.AbstractJdbcDatabase.supportsSequences.

Implements liquibase.database.Database.supportsSequences.

Doc from liquibase.database.AbstractJdbcDatabase.supportsSequences.

Does the database type support sequence.

Annotations
@Override
supportsTablespacesback to summary
public boolean supportsTablespaces()

Implements liquibase.database.Database.supportsTablespaces.

Annotations
@Override
liquibase.database.core back to summary

public Interface SQLiteDatabase.AlterTableVisitor

Known Direct Implementers
liquibase.change.core.AddNotNullConstraintChange.SQLiteAlterTableVisitor

Method Summary

Modifier and TypeMethod and Description
public boolean
public boolean
public boolean
public ColumnConfig[]

Method Detail

copyThisColumnback to summary
public boolean copyThisColumn(ColumnConfig column)
createThisColumnback to summary
public boolean createThisColumn(ColumnConfig column)
createThisIndexback to summary
public boolean createThisIndex(Index index)
getColumnsToAddback to summary
public ColumnConfig[] getColumnsToAdd()