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 voidcreateTable(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 voiddropTable(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 booleanshouldUseQuotes(String defaultValue, Column column) protected voidwriteColumnAutoIncrementStmt(Table table, Column column, StringBuilder ddl) Prints that the column is an auto increment column.protected voidwriteColumnDefaultValue(Table table, Column column, StringBuilder ddl) Prints the default value of the column.protected voidwriteColumnDefaultValueStmt(Table table, Column column, StringBuilder ddl) Prints the default value stmt part for the column.protected voidwriteColumnEmbeddedPrimaryKey(Table table, Column column, StringBuilder ddl) protected voidwriteEmbeddedPrimaryKeysStmt(Table table, StringBuilder ddl) Writes the primary key constraints of the table inside its definition.protected voidwriteExternalForeignKeyCreateStmt(Database database, Table table, ForeignKey key, StringBuilder ddl) Writes a single foreign key constraint using a alter table statement.protected voidwriteExternalForeignKeyDropStmt(Table table, ForeignKey foreignKey, StringBuilder ddl) Generates the statement to drop a foreignkey constraint from the database using an alter table statement.voidwriteExternalIndexDropStmt(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, 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, processChanges, processChanges, processTableStructureChanges, processTableStructureChanges, processTableStructureChanges, renameTable, restoreTableFromBackup, setCaseSensitive, setDelimitedIdentifierModeOn, setIndent, setScriptModeOn, setSqlCommentsOn, setValueDateFormat, setValueLocale, setValueNumberFormat, setValueTimeFormat, shortenName, shouldGeneratePrimaryKeys, writeAlterColumnDataTypeToBigInt, writeCascadeAttributesForForeignKey, writeCascadeAttributesForForeignKeyDelete, writeCascadeAttributesForForeignKeyUpdate, writeCastExpression, writeColumn, writeColumnNotNullableStmt, writeColumnNullableStmt, writeColumns, writeColumnType, writeColumnTypeDefaultRequired, writeColumnUniqueStmt, writeCopyDataStatement, writeCopyDataStatement, writeEmbeddedForeignKeysStmt, writeEmbeddedIndexCreateStmt, writeEmbeddedIndicesStmt, writeExternalIndexCreate, writeExternalIndexCreateStmt, writeExternalIndicesCreateStmt, writeExternalPrimaryKeysCreateStmt, writeFixLastIdentityValues, writeForeignReferences, writeGeneratedColumn, writeIdentityGapLimit, writeLocalReferences, writePrimaryKeyStmt, writeTableAlterStmt, writeTableComment, 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:AbstractDdlBuilderWrites a single foreign key constraint using a alter table statement.- Overrides:
writeExternalForeignKeyCreateStmtin 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:AbstractDdlBuilderGenerates the statement to drop a foreignkey constraint from the database using an alter table statement.- Overrides:
writeExternalForeignKeyDropStmtin classAbstractDdlBuilder- Parameters:
table- The tableforeignKey- The foreign key
-
writeExternalIndexDropStmt
Description copied from class:AbstractDdlBuilderGenerates the statement to drop a non-embedded index from the database.- Overrides:
writeExternalIndexDropStmtin classAbstractDdlBuilder
-
writeColumnAutoIncrementStmt
Prints that the column is an auto increment column.- Overrides:
writeColumnAutoIncrementStmtin classAbstractDdlBuilder
-
writeColumnEmbeddedPrimaryKey
- Overrides:
writeColumnEmbeddedPrimaryKeyin classAbstractDdlBuilder
-
writeEmbeddedPrimaryKeysStmt
Description copied from class:AbstractDdlBuilderWrites the primary key constraints of the table inside its definition.- Overrides:
writeEmbeddedPrimaryKeysStmtin classAbstractDdlBuilder- Parameters:
table- The table
-
dropTable
Description copied from class:AbstractDdlBuilderOutputs 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:
dropTablein classAbstractDdlBuilderrecreate- TODO
-
getIndexName
Description copied from class:AbstractDdlBuilderReturns the index name. This method takes care of length limitations imposed by some databases.- Specified by:
getIndexNamein interfaceIDdlBuilder- Overrides:
getIndexNamein classAbstractDdlBuilder- Parameters:
index- The index- Returns:
- The index name
-
mapDefaultValue
- Specified by:
mapDefaultValuein interfaceIDdlBuilder- Overrides:
mapDefaultValuein classAbstractDdlBuilder
-
writeColumnDefaultValueStmt
Description copied from class:AbstractDdlBuilderPrints the default value stmt part for the column.- Overrides:
writeColumnDefaultValueStmtin classAbstractDdlBuilder
-
writeColumnDefaultValue
Description copied from class:AbstractDdlBuilderPrints the default value of the column.- Overrides:
writeColumnDefaultValuein classAbstractDdlBuilder
-
shouldUseQuotes
- Overrides:
shouldUseQuotesin classAbstractDdlBuilder
-
createTable
Description copied from class:AbstractDdlBuilderOutputs 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:
createTablein classAbstractDdlBuilderrecreate- TODO
-