Package com.exedio.dsmf
Class Dialect
java.lang.Object
com.exedio.dsmf.Dialect
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static interfaceprotected static final classprotected static final class -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Stringprotected voidprotected voidabstract StringcreateColumn(String tableName, String columnName, String columnType) protected abstract voidcreateSequence(StringBuilder bf, String sequenceName, Sequence.Type type, long start) final voiddeleteSchema(Schema schema) Deprecated.protected voiddropForeignKeyConstraint(StringBuilder bf, String tableName, String constraintName) protected voiddropPrimaryKeyConstraint(StringBuilder bf, String tableName, String constraintName) protected voiddropSequence(StringBuilder bf, String sequenceName) protected voiddropUniqueConstraint(StringBuilder bf, String tableName, String constraintName) protected static final booleangetBooleanStrict(ResultSet resultSet, int columnIndex, String trueValue, String falseValue) protected static final StringgetCatalog(Schema schema) protected abstract StringgetColumnType(int dataType, ResultSet resultSet) protected final Stringprotected static final TablegetTableStrict(Schema schema, ResultSet resultSet, int columnIndex) abstract StringmodifyColumn(String tableName, String columnName, String newColumnType) protected booleanprotected static final voidnotifyExistentCheck(Table table, String constraintName, String condition) protected static final ColumnnotifyExistentColumn(Table table, String columnName, String existingType) protected static final voidnotifyExistentPrimaryKey(Table table, String constraintName) protected static final voidnotifyExistentTable(Schema schema, String tableName) protected static final voidnotifyExistentUnique(Table table, String constraintName, String condition) protected static final voidnotifyExists(Sequence sequence, Sequence.Type existingType) protected final voidquerySQL(Schema schema, String statement, Dialect.ResultSetHandler resultSetHandler) Quotes a database name.abstract StringrenameColumn(String tableName, String oldColumnName, String newColumnName, String columnType) renameTable(String tableName, String newTableName) booleanbooleanprotected abstract voidprotected final voidverifyColumnsByMetaData(Schema schema, String tableSchema) protected static final voidverifyForeignKeyConstraints(String sql, Schema schema) protected static final voidverifySequences(String sql, Schema schema) protected static final voidverifyTablesByMetaData(Schema schema) protected static final voidverifyUniqueConstraints(String sql, Schema schema)
-
Field Details
-
NOT_NULL
- See Also:
-
-
Constructor Details
-
Dialect
-
-
Method Details
-
getSchema
-
quoteName
Quotes a database name. This prevents the name from being interpreted as a SQL keyword. This is usually done by enclosing the name with some (database specific) quotation characters. The default implementation uses double quotes as specified by ANSI SQL. -
supportsCheckConstraints
public boolean supportsCheckConstraints() -
supportsSemicolon
public boolean supportsSemicolon() -
adjustExistingCheckConstraintCondition
-
getColumnType
- Throws:
SQLException
-
verify
-
verifyTablesByMetaData
-
verifyColumnsByMetaData
- Parameters:
tableSchema- null means any schema is allowed
-
verifyForeignKeyConstraints
-
verifyUniqueConstraints
-
verifySequences
-
notifyExistentTable
-
notifyExistentColumn
-
notifyExistentCheck
-
notifyExistentPrimaryKey
-
notifyExistentUnique
-
notifyExists
-
getBooleanStrict
protected static final boolean getBooleanStrict(ResultSet resultSet, int columnIndex, String trueValue, String falseValue) throws SQLException - Throws:
SQLException
-
getTableStrict
protected static final Table getTableStrict(Schema schema, ResultSet resultSet, int columnIndex) throws SQLException - Throws:
SQLException
-
querySQL
protected final void querySQL(Schema schema, String statement, Dialect.ResultSetHandler resultSetHandler) -
getCatalog
-
appendTableCreateStatement
- Parameters:
bf- used in subclasses
-
needsTargetColumnName
protected boolean needsTargetColumnName() -
appendForeignKeyCreateStatement
- Parameters:
bf- used in subclasses
-
renameTable
-
renameColumn
-
createColumn
-
modifyColumn
-
dropPrimaryKeyConstraint
-
dropForeignKeyConstraint
-
dropUniqueConstraint
-
createSequence
protected abstract void createSequence(StringBuilder bf, String sequenceName, Sequence.Type type, long start) -
dropSequence
-
deleteSchema
Deprecated.UseModel.deleteSchema()instead.The default implementation just drops and re-creates the schema. Subclasses are encouraged to provide a more efficient implementation.
-
Model.deleteSchema()instead.