Package org.jumpmind.db.platform.sqlite
Class SqliteDdlBuilder
java.lang.Object
org.jumpmind.db.platform.AbstractDdlBuilder
org.jumpmind.db.platform.sqlite.SqliteDdlBuilder
- All Implemented Interfaces:
IDdlBuilder
-
Field Summary
Fields inherited from class org.jumpmind.db.platform.AbstractDdlBuilder
caseSensitive, databaseInfo, databaseName, delimitedIdentifierModeOn, log, scriptModeOn, SIZE_PLACEHOLDER, sqlCommentsOn
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
createTable
(Table table, StringBuilder ddl, boolean temporary, boolean recreate) Outputs the DDL to create the table along with any non-external constraints as well as with external primary keys and indices (but not foreign keys).protected void
dropTable
(Table table, StringBuilder ddl, boolean temporary, boolean recreate) Outputs the DDL to drop the table.getIndexName
(IIndex index) Returns the index name.mapDefaultValue
(Object defaultValue, Column column) protected boolean
shouldUseQuotes
(String defaultValue, Column column) protected void
writeColumnAutoIncrementStmt
(Table table, Column column, StringBuilder ddl) Prints that the column is an auto increment column.protected void
writeColumnDefaultValue
(Table table, Column column, StringBuilder ddl) Prints the default value of the column.protected void
writeColumnDefaultValueStmt
(Table table, Column column, StringBuilder ddl) Prints the default value stmt part for the column.protected void
writeColumnEmbeddedPrimaryKey
(Table table, Column column, StringBuilder ddl) protected void
writeEmbeddedPrimaryKeysStmt
(Table table, StringBuilder ddl) Writes the primary key constraints of the table inside its definition.protected void
writeExternalForeignKeyCreateStmt
(Database database, Table table, ForeignKey key, StringBuilder ddl) Writes a single foreign key constraint using a alter table statement.protected void
writeExternalForeignKeyDropStmt
(Table table, ForeignKey foreignKey, StringBuilder ddl) Generates the statement to drop a foreignkey constraint from the database using an alter table statement.void
writeExternalIndexDropStmt
(Table table, IIndex index, StringBuilder ddl) Generates the statement to drop a non-embedded index from the database.Methods inherited from class org.jumpmind.db.platform.AbstractDdlBuilder
addEscapedCharSequence, alterDatabase, alterDatabase, alterTable, areColumnSizesTheSame, areEqual, areMappedTypesTheSame, copy, createBackupTableFor, createExternalForeignKeys, createExternalForeignKeys, createTable, createTables, createTables, createTemporaryTable, dropExternalForeignKeys, dropTable, dropTables, dropTables, dropTemporaryTable, escapeStringValue, filterChanges, filterColumnSqlType, findCorrespondingForeignKey, findForeignKey, findTable, fixLastIdentityValues, getBackupTableFor, getBareNativeType, getColumnName, getColumnTypeDdl, getConstraintName, getCopyDataColumnMapping, getCopyDataColumnOrderedMapping, getDatabaseInfo, getDefaultValueHelper, getDefinitionForGeneratedColumn, getDeleteSql, getDelimitedIdentifier, getDetectedChanges, getForeignKeyName, getFullyQualifiedIndexNameShorten, getFullyQualifiedTableNameShorten, getGapLimitSize, getIndent, getInsertSql, getNativeDefaultValue, getNativeType, getRealTargetTableFor, getSelectLastIdentityValues, getSize, getSqlType, getTableName, getTemporaryTableFor, getTemporaryTableFor, getTriggerDelimiterReplacementCharacters, getUpdateSql, getValueAsString, getValueDateFormat, getValueLocale, getValueNumberFormat, getValueTimeFormat, hasSize, initCteExpression, isAlterDatabase, isCaseSensitive, isDelimitedIdentifierModeOn, isFullTextIndex, isScriptModeOn, isSpecifyIdentityGapLimit, isSqlCommentsOn, isValidDefaultValue, mergeOrRemovePlatformTypes, printComment, printDefaultValue, printEndOfStatement, printIdentifier, printIndent, println, println, printlnIdentifier, printStartOfEmbeddedStatement, processChange, processChange, processChange, processChange, processChange, processChange, processChange, processChange, processChange, processChange, processChange, processChange, processChange, processChange, processChange, processChanges, processChanges, processTableStructureChanges, processTableStructureChanges, processTableStructureChanges, renameTable, replaceDelimiterWithEscapeCharacters, restoreTableFromBackup, setCaseSensitive, setDelimitedIdentifierModeOn, setIndent, setScriptModeOn, setSqlCommentsOn, setTriggerDelimiterReplacementCharacters, setValueDateFormat, setValueLocale, setValueNumberFormat, setValueTimeFormat, shortenName, shouldGeneratePrimaryKeys, writeAlterColumnDataTypeToBigInt, writeCascadeAttributesForForeignKey, writeCascadeAttributesForForeignKeyDelete, writeCascadeAttributesForForeignKeyUpdate, writeCastExpression, writeColumn, writeColumnAutoUpdateStmt, writeColumnNotNullableStmt, writeColumnNullableStmt, writeColumns, writeColumnType, writeColumnTypeDefaultRequired, writeColumnUniqueStmt, writeCopyDataStatement, writeCopyDataStatement, writeEmbeddedForeignKeysStmt, writeEmbeddedIndexCreateStmt, writeEmbeddedIndicesStmt, writeExternalIndexCreate, writeExternalIndexCreateStmt, writeExternalIndicesCreateStmt, writeExternalPrimaryKeysCreateStmt, writeFixLastIdentityValues, writeForeignReferences, writeGeneratedColumn, writeIdentityGapLimit, writeLocalReferences, writePrimaryKeyStmt, writeTableAlterStmt, writeTableComment, writeTableCreateOpeningStmt, writeTableCreationStmt, writeTableCreationStmtEnding
-
Constructor Details
-
SqliteDdlBuilder
public SqliteDdlBuilder()
-
-
Method Details
-
writeExternalForeignKeyCreateStmt
protected void writeExternalForeignKeyCreateStmt(Database database, Table table, ForeignKey key, StringBuilder ddl) Description copied from class:AbstractDdlBuilder
Writes a single foreign key constraint using a alter table statement.- Overrides:
writeExternalForeignKeyCreateStmt
in classAbstractDdlBuilder
- Parameters:
database
- The database modeltable
- The tablekey
- The foreign key
-
writeExternalForeignKeyDropStmt
protected void writeExternalForeignKeyDropStmt(Table table, ForeignKey foreignKey, StringBuilder ddl) Description copied from class:AbstractDdlBuilder
Generates the statement to drop a foreignkey constraint from the database using an alter table statement.- Overrides:
writeExternalForeignKeyDropStmt
in classAbstractDdlBuilder
- Parameters:
table
- The tableforeignKey
- The foreign key
-
writeExternalIndexDropStmt
Description copied from class:AbstractDdlBuilder
Generates the statement to drop a non-embedded index from the database.- Overrides:
writeExternalIndexDropStmt
in classAbstractDdlBuilder
-
writeColumnAutoIncrementStmt
Prints that the column is an auto increment column.- Overrides:
writeColumnAutoIncrementStmt
in classAbstractDdlBuilder
-
writeColumnEmbeddedPrimaryKey
- Overrides:
writeColumnEmbeddedPrimaryKey
in classAbstractDdlBuilder
-
writeEmbeddedPrimaryKeysStmt
Description copied from class:AbstractDdlBuilder
Writes the primary key constraints of the table inside its definition.- Overrides:
writeEmbeddedPrimaryKeysStmt
in classAbstractDdlBuilder
- Parameters:
table
- The table
-
dropTable
Description copied from class:AbstractDdlBuilder
Outputs the DDL to drop the table. Note that this method does not drop foreign keys to this table. Use#dropTable(Database, Table)
if you want that.- Overrides:
dropTable
in classAbstractDdlBuilder
recreate
- TODO
-
getIndexName
Description copied from class:AbstractDdlBuilder
Returns the index name. This method takes care of length limitations imposed by some databases.- Specified by:
getIndexName
in interfaceIDdlBuilder
- Overrides:
getIndexName
in classAbstractDdlBuilder
- Parameters:
index
- The index- Returns:
- The index name
-
mapDefaultValue
- Specified by:
mapDefaultValue
in interfaceIDdlBuilder
- Overrides:
mapDefaultValue
in classAbstractDdlBuilder
-
writeColumnDefaultValueStmt
Description copied from class:AbstractDdlBuilder
Prints the default value stmt part for the column.- Overrides:
writeColumnDefaultValueStmt
in classAbstractDdlBuilder
-
writeColumnDefaultValue
Description copied from class:AbstractDdlBuilder
Prints the default value of the column.- Overrides:
writeColumnDefaultValue
in classAbstractDdlBuilder
-
shouldUseQuotes
- Overrides:
shouldUseQuotes
in classAbstractDdlBuilder
-
createTable
Description copied from class:AbstractDdlBuilder
Outputs the DDL to create the table along with any non-external constraints as well as with external primary keys and indices (but not foreign keys).- Overrides:
createTable
in classAbstractDdlBuilder
recreate
- TODO
-