public interface Dialect
Modifier and Type | Method and Description |
---|---|
ColumnPropertiesFactory |
createColumnPropertiesFactory(IdentifierNormalizer normalizer) |
ForeignKeyConstraintFactory |
createForeignKeyConstraintFactory(QualifiedNameFactory factory) |
IdentifierNormalizer |
createIdentifierNormalizer(DatabaseMetaData metaData) |
QualifiedNameFactory |
createQualifiedNameFactory(DatabaseMetaData metaData,
IdentifierNormalizer normalizer) |
UniqueConstraintFactory |
createUniqueConstraintFactory(IdentifierNormalizer normalizer) |
String |
evaluateCurrentDate(String sql,
Date date)
Replaces non-deterministic CURRENT_DATE functions with deterministic static values.
|
String |
evaluateCurrentTime(String sql,
Time time)
Replaces non-deterministic CURRENT_TIME functions with deterministic static values.
|
String |
evaluateCurrentTimestamp(String sql,
Timestamp timestamp)
Replaces non-deterministic CURRENT_TIMESTAMP functions with deterministic static values.
|
String |
evaluateRand(String sql)
Replaces non-deterministic RAND() functions with deterministic static values.
|
Map<String,ColumnProperties> |
getColumns(DatabaseMetaData metaData,
QualifiedName table,
ColumnPropertiesFactory factory)
Returns the columns of the specified table.
|
int |
getColumnType(ColumnProperties properties)
Returns the data type of the specified column of the specified schema and table.
|
<Z,D extends Database<Z>> |
getConnectionProperties(D database,
Decoder decoder) |
String |
getCreateForeignKeyConstraintSQL(ForeignKeyConstraint constraint)
Returns a SQL statement used to create a foreign key constraint.
|
String |
getCreateSchemaSQL(String schema) |
String |
getCreateUniqueConstraintSQL(UniqueConstraint constraint)
Returns a SQL statement used to create a unique constraint.
|
List<String> |
getDefaultSchemas(DatabaseMetaData metaData)
Returns a search path of schemas
|
String |
getDropForeignKeyConstraintSQL(ForeignKeyConstraint constraint)
Returns a SQL statement used to drop a foreign key constraint.
|
String |
getDropSchemaSQL(String schema) |
String |
getDropUniqueConstraintSQL(UniqueConstraint constraint)
Returns a SQL statement used to drop a unique constraint.
|
DumpRestoreSupport |
getDumpRestoreSupport() |
Collection<ForeignKeyConstraint> |
getForeignKeyConstraints(DatabaseMetaData metaData,
QualifiedName table,
ForeignKeyConstraintFactory factory)
Returns the foreign key constraints on the specified table.
|
Collection<String> |
getIdentityColumns(Collection<ColumnProperties> columns)
Identifies any identity columns from the from the specified collection of columns
|
IdentityColumnSupport |
getIdentityColumnSupport() |
UniqueConstraint |
getPrimaryKey(DatabaseMetaData metaData,
QualifiedName table,
UniqueConstraintFactory factory)
Returns the primary key of the specified table.
|
SequenceSupport |
getSequenceSupport() |
Collection<QualifiedName> |
getTables(DatabaseMetaData metaData,
QualifiedNameFactory factory)
Returns all tables in this database mapped by schema.
|
TriggerSupport |
getTriggerSupport() |
String |
getTruncateTableSQL(TableProperties properties)
Returns a SQL statement used to truncate a table.
|
Map<Integer,Map.Entry<String,Integer>> |
getTypes(DatabaseMetaData metaData)
Returns a mapping of standard JDBC types to native types
|
Collection<UniqueConstraint> |
getUniqueConstraints(DatabaseMetaData metaData,
QualifiedName table,
UniqueConstraint primaryKey,
UniqueConstraintFactory factory)
Returns the unique constraints on the specified table - excluding the primary key of the table.
|
boolean |
indicatesFailure(SQLException e)
Determines whether the specified exception indicates a catastrophic error.
|
boolean |
indicatesFailure(XAException e)
Determines whether the specified exception indicates a catastrophic error.
|
boolean |
isSelectForUpdate(String sql)
Determines whether the specified SQL is a SELECT ...
|
boolean |
isValid(Connection connection) |
String getTruncateTableSQL(TableProperties properties) throws SQLException
properties
- table meta dataSQLException
- if there was an error fetching meta data.String getCreateForeignKeyConstraintSQL(ForeignKeyConstraint constraint) throws SQLException
constraint
- foreign key constraint meta dataSQLException
- if there was an error fetching meta data.String getDropForeignKeyConstraintSQL(ForeignKeyConstraint constraint) throws SQLException
constraint
- foreign key constraint meta dataSQLException
- if there was an error fetching meta data.String getCreateUniqueConstraintSQL(UniqueConstraint constraint) throws SQLException
constraint
- unique constraint meta dataSQLException
- if there was an error fetching meta data.String getDropUniqueConstraintSQL(UniqueConstraint constraint) throws SQLException
constraint
- unique constraint meta dataSQLException
- if there was an error fetching meta data.boolean isSelectForUpdate(String sql) throws SQLException
sql
- a SQL statementSQLException
- if there was an error fetching meta data.int getColumnType(ColumnProperties properties) throws SQLException
properties
- table column meta dataSQLException
List<String> getDefaultSchemas(DatabaseMetaData metaData) throws SQLException
metaData
- SQLException
String evaluateCurrentDate(String sql, Date date)
sql
- an SQL statementdate
- the replacement dateSQLException
String evaluateCurrentTime(String sql, Time time)
sql
- an SQL statementtime
- the replacement timeSQLException
String evaluateCurrentTimestamp(String sql, Timestamp timestamp)
sql
- an SQL statementtimestamp
- the replacement timestampSQLException
String evaluateRand(String sql)
sql
- an SQL statementSQLException
boolean indicatesFailure(SQLException e)
e
- an exceptionboolean indicatesFailure(XAException e)
e
- an exceptionSequenceSupport getSequenceSupport()
IdentityColumnSupport getIdentityColumnSupport()
DumpRestoreSupport getDumpRestoreSupport()
TriggerSupport getTriggerSupport()
String getCreateSchemaSQL(String schema)
String getDropSchemaSQL(String schema)
Collection<QualifiedName> getTables(DatabaseMetaData metaData, QualifiedNameFactory factory) throws SQLException
metaData
- a DatabaseMetaData implementationSQLException
- if an error occurs access DatabaseMetaDataMap<String,ColumnProperties> getColumns(DatabaseMetaData metaData, QualifiedName table, ColumnPropertiesFactory factory) throws SQLException
metaData
- a DatabaseMetaData implementationtable
- a schema qualified table nameSQLException
- if an error occurs access DatabaseMetaDataUniqueConstraint getPrimaryKey(DatabaseMetaData metaData, QualifiedName table, UniqueConstraintFactory factory) throws SQLException
metaData
- a DatabaseMetaData implementationtable
- a schema qualified table nameSQLException
- if an error occurs access DatabaseMetaDataCollection<ForeignKeyConstraint> getForeignKeyConstraints(DatabaseMetaData metaData, QualifiedName table, ForeignKeyConstraintFactory factory) throws SQLException
metaData
- a DatabaseMetaData implementationtable
- a schema qualified table nameSQLException
- if an error occurs access DatabaseMetaDataCollection<UniqueConstraint> getUniqueConstraints(DatabaseMetaData metaData, QualifiedName table, UniqueConstraint primaryKey, UniqueConstraintFactory factory) throws SQLException
metaData
- a schema qualified table nametable
- a qualified table nameprimaryKey
- the primary key of this tableSQLException
- if an error occurs access DatabaseMetaDataCollection<String> getIdentityColumns(Collection<ColumnProperties> columns) throws SQLException
columns
- the columns of a tableSQLException
Map<Integer,Map.Entry<String,Integer>> getTypes(DatabaseMetaData metaData) throws SQLException
metaData
- database meta dataSQLException
IdentifierNormalizer createIdentifierNormalizer(DatabaseMetaData metaData) throws SQLException
SQLException
QualifiedNameFactory createQualifiedNameFactory(DatabaseMetaData metaData, IdentifierNormalizer normalizer) throws SQLException
SQLException
ColumnPropertiesFactory createColumnPropertiesFactory(IdentifierNormalizer normalizer)
ForeignKeyConstraintFactory createForeignKeyConstraintFactory(QualifiedNameFactory factory)
UniqueConstraintFactory createUniqueConstraintFactory(IdentifierNormalizer normalizer)
boolean isValid(Connection connection) throws SQLException
SQLException
<Z,D extends Database<Z>> ConnectionProperties getConnectionProperties(D database, Decoder decoder) throws SQLException
SQLException
Copyright © 2004–2014 Paul Ferraro. All rights reserved.