liquibase.database.core
Class SQLiteDatabase

java.lang.Object
  extended by liquibase.database.AbstractDatabase
      extended by liquibase.database.core.SQLiteDatabase
All Implemented Interfaces:
Database, DatabaseObject, PrioritizedService

public class SQLiteDatabase
extends AbstractDatabase


Nested Class Summary
static interface SQLiteDatabase.AlterTableVisitor
           
 
Field Summary
static java.lang.String PRODUCT_NAME
           
 
Fields inherited from class liquibase.database.AbstractDatabase
currentDateTimeFunction, databaseFunctions, defaultAutoIncrementBy, defaultAutoIncrementStartWith
 
Fields inherited from interface liquibase.servicelocator.PrioritizedService
PRIORITY_DATABASE, PRIORITY_DEFAULT
 
Constructor Summary
SQLiteDatabase()
           
 
Method Summary
protected  boolean generateAutoIncrementBy(java.math.BigInteger incrementBy)
           
protected  boolean generateAutoIncrementStartWith(java.math.BigInteger startWith)
           
static java.util.List<SqlStatement> getAlterTableStatements(SQLiteDatabase.AlterTableVisitor alterTableVisitor, Database database, java.lang.String schemaName, java.lang.String tableName)
           
 java.lang.String getAutoIncrementClause()
           
 java.lang.String getCurrentDateTimeFunction()
          Returns database-specific function for generating the current date/time.
 java.lang.String getDateTimeLiteral(java.sql.Timestamp date)
           
 java.lang.String getDefaultDriver(java.lang.String url)
          If this database understands the given url, return the default driver class name.
 int getPriority()
           
protected  java.util.Set<java.lang.String> getSystemTablesAndViews()
          Returns system (undroppable) tables and views.
 java.lang.String getTrigger(java.lang.String table, java.lang.String column)
           
 java.lang.String getTypeName()
          Returns an all-lower-case short name of the product.
 java.lang.String getViewDefinition(java.lang.String schemaName, java.lang.String viewName)
           
 boolean isCorrectDatabaseImplementation(DatabaseConnection conn)
          Is this AbstractDatabase subclass the correct one to use for the given connection.
 boolean supportsInitiallyDeferrableColumns()
          Returns whether this database support initially deferrable columns.
 boolean supportsSchemas()
           
 boolean supportsSequences()
          Does the database type support sequence.
 boolean supportsTablespaces()
           
 
Methods inherited from class liquibase.database.AbstractDatabase
canCreateChangeLogTable, checkDatabaseChangeLogLockTable, checkDatabaseChangeLogTable, close, commit, convertRequestedSchemaToCatalog, convertRequestedSchemaToSchema, disableForeignKeyChecks, doesTagExist, dropDatabaseObjects, enableForeignKeyChecks, equals, escapeColumnName, escapeColumnNameList, escapeConstraintName, escapeDatabaseObject, escapeIndexName, escapeSequenceName, escapeStringForDatabase, escapeTableName, escapeViewName, execute, executeRollbackStatements, executeStatements, generatePrimaryKeyName, getAutoCommitMode, getAutoIncrementByClause, getAutoIncrementClause, getAutoIncrementClosing, getAutoIncrementOpening, getAutoIncrementStartWithClause, getConcatSql, getConnection, getContainingObjects, getDatabaseChangeLogLockTableName, getDatabaseChangeLogTableName, getDatabaseFunctions, getDatabaseMajorVersion, getDatabaseMinorVersion, getDatabaseProductName, getDatabaseProductVersion, getDateLiteral, getDateLiteral, getDateLiteral, getDefaultCatalogName, getDefaultDatabaseSchemaName, getDefaultSchemaName, getLineComment, getLiquibaseSchemaName, getNextChangeSetSequenceValue, getRanChangeSet, getRanChangeSetList, getRanDate, getRunStatus, getTable, getTimeLiteral, hasDatabaseChangeLogLockTable, hasDatabaseChangeLogTable, hashCode, isAutoCommit, isDateOnly, isDateTime, isLiquibaseTable, isLocalDatabase, isReservedWord, isSystemTable, isSystemView, isTimeOnly, markChangeSetExecStatus, parseDate, removeRanStatus, requiresPassword, requiresUsername, reset, rollback, saveRollbackStatement, saveStatements, setAutoCommit, setCanCacheLiquibaseTableInfo, setConnection, setCurrentDateTimeFunction, setDatabaseChangeLogLockTableName, setDatabaseChangeLogTableName, setDefaultSchemaName, shouldQuoteValue, supportsAutoIncrement, supportsDDLInTransaction, supportsDropTableCascadeConstraints, supportsForeignKeyDisable, supportsRestrictForeignKeys, tag, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

PRODUCT_NAME

public static final java.lang.String PRODUCT_NAME
See Also:
Constant Field Values
Constructor Detail

SQLiteDatabase

public SQLiteDatabase()
Method Detail

getCurrentDateTimeFunction

public java.lang.String getCurrentDateTimeFunction()
Description copied from interface: Database
Returns database-specific function for generating the current date/time.


getDefaultDriver

public java.lang.String getDefaultDriver(java.lang.String url)
Description copied from interface: Database
If this database understands the given url, return the default driver class name. Otherwise return null.


getPriority

public int getPriority()

getTypeName

public java.lang.String getTypeName()
Description copied from interface: Database
Returns an all-lower-case short name of the product. Used for end-user selecting of database type such as the DBMS precondition.


isCorrectDatabaseImplementation

public boolean isCorrectDatabaseImplementation(DatabaseConnection conn)
                                        throws DatabaseException
Description copied from interface: Database
Is this AbstractDatabase subclass the correct one to use for the given connection.

Throws:
DatabaseException

supportsInitiallyDeferrableColumns

public boolean supportsInitiallyDeferrableColumns()
Description copied from interface: Database
Returns whether this database support initially deferrable columns.


supportsTablespaces

public boolean supportsTablespaces()

getViewDefinition

public java.lang.String getViewDefinition(java.lang.String schemaName,
                                          java.lang.String viewName)
                                   throws DatabaseException
Specified by:
getViewDefinition in interface Database
Overrides:
getViewDefinition in class AbstractDatabase
Throws:
DatabaseException

supportsSequences

public boolean supportsSequences()
Description copied from class: AbstractDatabase
Does the database type support sequence.

Specified by:
supportsSequences in interface Database
Overrides:
supportsSequences in class AbstractDatabase

supportsSchemas

public boolean supportsSchemas()
Specified by:
supportsSchemas in interface Database
Overrides:
supportsSchemas in class AbstractDatabase

getTrigger

public java.lang.String getTrigger(java.lang.String table,
                                   java.lang.String column)

getAutoIncrementClause

public java.lang.String getAutoIncrementClause()
Overrides:
getAutoIncrementClause in class AbstractDatabase

generateAutoIncrementStartWith

protected boolean generateAutoIncrementStartWith(java.math.BigInteger startWith)
Overrides:
generateAutoIncrementStartWith in class AbstractDatabase

generateAutoIncrementBy

protected boolean generateAutoIncrementBy(java.math.BigInteger incrementBy)
Overrides:
generateAutoIncrementBy in class AbstractDatabase

getAlterTableStatements

public static java.util.List<SqlStatement> getAlterTableStatements(SQLiteDatabase.AlterTableVisitor alterTableVisitor,
                                                                   Database database,
                                                                   java.lang.String schemaName,
                                                                   java.lang.String tableName)
                                                            throws UnsupportedChangeException,
                                                                   DatabaseException
Throws:
UnsupportedChangeException
DatabaseException

getSystemTablesAndViews

protected java.util.Set<java.lang.String> getSystemTablesAndViews()
Description copied from class: AbstractDatabase
Returns system (undroppable) tables and views.

Overrides:
getSystemTablesAndViews in class AbstractDatabase

getDateTimeLiteral

public java.lang.String getDateTimeLiteral(java.sql.Timestamp date)
Specified by:
getDateTimeLiteral in interface Database
Overrides:
getDateTimeLiteral in class AbstractDatabase


Copyright © 2011 Liquibase.org. All Rights Reserved.