public interface Dialect
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
evaluateCurrentDate(java.lang.String sql,
java.sql.Date date)
Replaces non-deterministic CURRENT_DATE functions with deterministic static values.
|
java.lang.String |
evaluateCurrentTime(java.lang.String sql,
java.sql.Time time)
Replaces non-deterministic CURRENT_TIME functions with deterministic static values.
|
java.lang.String |
evaluateCurrentTimestamp(java.lang.String sql,
java.sql.Timestamp timestamp)
Replaces non-deterministic CURRENT_TIMESTAMP functions with deterministic static values.
|
java.lang.String |
evaluateRand(java.lang.String sql)
Replaces non-deterministic RAND() functions with deterministic static values.
|
java.lang.String |
getAlterIdentityColumnSQL(TableProperties table,
ColumnProperties column,
long value)
Returns a SQL statement used reset the current value of an identity column.
|
java.lang.String |
getAlterSequenceSQL(SequenceProperties sequence,
long value)
Returns a SQL statement used reset the current value of a sequence.
|
int |
getColumnType(ColumnProperties properties)
Returns the data type of the specified column of the specified schema and table.
|
java.lang.String |
getCreateForeignKeyConstraintSQL(ForeignKeyConstraint constraint)
Returns a SQL statement used to create a foreign key constraint.
|
java.lang.String |
getCreateUniqueConstraintSQL(UniqueConstraint constraint)
Returns a SQL statement used to create a unique constraint.
|
java.util.List<java.lang.String> |
getDefaultSchemas(java.sql.DatabaseMetaData metaData)
Returns a search path of schemas
|
java.lang.String |
getDropForeignKeyConstraintSQL(ForeignKeyConstraint constraint)
Returns a SQL statement used to drop a foreign key constraint.
|
java.lang.String |
getDropUniqueConstraintSQL(UniqueConstraint constraint)
Returns a SQL statement used to drop a unique constraint.
|
java.util.regex.Pattern |
getIdentifierPattern(java.sql.DatabaseMetaData metaData)
Returns a pattern for identifiers that do not require quoting
|
java.lang.String |
getNextSequenceValueSQL(SequenceProperties sequence)
Returns a SQL statement for obtaining the next value the specified sequence
|
java.util.Collection<QualifiedName> |
getSequences(java.sql.DatabaseMetaData metaData)
Returns a collection of all sequences in this database.
|
java.lang.String |
getSimpleSQL()
Returns a simple SQL statement used to validate whether a database is alive or not.
|
java.lang.String |
getTruncateTableSQL(TableProperties properties)
Returns a SQL statement used to truncate a table.
|
boolean |
isSelectForUpdate(java.lang.String sql)
Determines whether the specified SQL is a SELECT ...
|
java.lang.String |
parseInsertTable(java.lang.String sql)
Parses a table name from the specified INSERT SQL statement that may contain identity columns.
|
java.lang.String |
parseSequence(java.lang.String sql)
Parses a sequence name from the specified SQL statement.
|
java.lang.String getSimpleSQL() throws java.sql.SQLException
java.sql.SQLExceptionjava.lang.String getTruncateTableSQL(TableProperties properties) throws java.sql.SQLException
properties - table meta datajava.sql.SQLException - if there was an error fetching meta data.java.lang.String getCreateForeignKeyConstraintSQL(ForeignKeyConstraint constraint) throws java.sql.SQLException
constraint - foreign key constraint meta datajava.sql.SQLException - if there was an error fetching meta data.java.lang.String getDropForeignKeyConstraintSQL(ForeignKeyConstraint constraint) throws java.sql.SQLException
constraint - foreign key constraint meta datajava.sql.SQLException - if there was an error fetching meta data.java.lang.String getCreateUniqueConstraintSQL(UniqueConstraint constraint) throws java.sql.SQLException
constraint - unique constraint meta datajava.sql.SQLException - if there was an error fetching meta data.java.lang.String getDropUniqueConstraintSQL(UniqueConstraint constraint) throws java.sql.SQLException
constraint - unique constraint meta datajava.sql.SQLException - if there was an error fetching meta data.boolean isSelectForUpdate(java.lang.String sql) throws java.sql.SQLException
sql - a SQL statementjava.sql.SQLException - if there was an error fetching meta data.int getColumnType(ColumnProperties properties) throws java.sql.SQLException
properties - table column meta datajava.sql.SQLExceptionjava.lang.String parseInsertTable(java.lang.String sql) throws java.sql.SQLException
sql - a SQL statementjava.sql.SQLExceptionjava.lang.String parseSequence(java.lang.String sql) throws java.sql.SQLException
sql - a SQL statementjava.sql.SQLExceptionjava.util.Collection<QualifiedName> getSequences(java.sql.DatabaseMetaData metaData) throws java.sql.SQLException
metaData - database meta datajava.sql.SQLExceptionjava.lang.String getNextSequenceValueSQL(SequenceProperties sequence) throws java.sql.SQLException
sequence - a sequence namejava.sql.SQLExceptionjava.lang.String getAlterSequenceSQL(SequenceProperties sequence, long value) throws java.sql.SQLException
sequence - a sequence namevalue - a sequence valuejava.sql.SQLExceptionjava.lang.String getAlterIdentityColumnSQL(TableProperties table, ColumnProperties column, long value) throws java.sql.SQLException
table - a sequence namecolumn - a sequence namevalue - a sequence valuejava.sql.SQLExceptionjava.util.List<java.lang.String> getDefaultSchemas(java.sql.DatabaseMetaData metaData) throws java.sql.SQLException
metaData - java.sql.SQLExceptionjava.util.regex.Pattern getIdentifierPattern(java.sql.DatabaseMetaData metaData) throws java.sql.SQLException
metaData - java.sql.SQLExceptionjava.lang.String evaluateCurrentDate(java.lang.String sql, java.sql.Date date)
sql - an SQL statementdate - the replacement datejava.sql.SQLExceptionjava.lang.String evaluateCurrentTime(java.lang.String sql, java.sql.Time time)
sql - an SQL statementtime - the replacement timejava.sql.SQLExceptionjava.lang.String evaluateCurrentTimestamp(java.lang.String sql, java.sql.Timestamp timestamp)
sql - an SQL statementtimestamp - the replacement timestampjava.sql.SQLExceptionjava.lang.String evaluateRand(java.lang.String sql)
sql - an SQL statementjava.sql.SQLException