|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface Dialect
Encapsulates database vendor specific SQL syntax.
| Method Summary | |
|---|---|
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. |
String |
getAlterIdentityColumnSQL(TableProperties table,
ColumnProperties column,
long value)
Returns a SQL statement used reset the current value of an identity column. |
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. |
String |
getCreateForeignKeyConstraintSQL(ForeignKeyConstraint constraint)
Returns a SQL statement used to create a foreign key constraint. |
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 |
getDropUniqueConstraintSQL(UniqueConstraint constraint)
Returns a SQL statement used to drop a unique constraint. |
Pattern |
getIdentifierPattern(DatabaseMetaData metaData)
Returns a pattern for identifiers that do not require quoting |
String |
getNextSequenceValueSQL(SequenceProperties sequence)
Returns a SQL statement for obtaining the next value the specified sequence |
Collection<QualifiedName> |
getSequences(DatabaseMetaData metaData)
Returns a collection of all sequences in this database. |
String |
getSimpleSQL()
Returns a simple SQL statement used to validate whether a database is alive or not. |
String |
getTruncateTableSQL(TableProperties properties)
Returns a SQL statement used to truncate a table. |
boolean |
isIdentity(ColumnProperties properties)
Indicates whether or not the specified column is an identity column. |
boolean |
isSelectForUpdate(String sql)
Determines whether the specified SQL is a SELECT ... |
String |
parseInsertTable(String sql)
Parses a table name from the specified INSERT SQL statement that may contain identity columns. |
String |
parseSequence(String sql)
Parses a sequence name from the specified SQL statement. |
| Method Detail |
|---|
String getSimpleSQL()
throws SQLException
SQLException
String getTruncateTableSQL(TableProperties properties)
throws SQLException
properties - table meta data
SQLException - if there was an error fetching meta data.
String getCreateForeignKeyConstraintSQL(ForeignKeyConstraint constraint)
throws SQLException
constraint - foreign key constraint meta data
SQLException - if there was an error fetching meta data.
String getDropForeignKeyConstraintSQL(ForeignKeyConstraint constraint)
throws SQLException
constraint - foreign key constraint meta data
SQLException - if there was an error fetching meta data.
String getCreateUniqueConstraintSQL(UniqueConstraint constraint)
throws SQLException
constraint - unique constraint meta data
SQLException - if there was an error fetching meta data.
String getDropUniqueConstraintSQL(UniqueConstraint constraint)
throws SQLException
constraint - unique constraint meta data
SQLException - if there was an error fetching meta data.
boolean isSelectForUpdate(String sql)
throws SQLException
sql - a SQL statement
SQLException - if there was an error fetching meta data.
int getColumnType(ColumnProperties properties)
throws SQLException
properties - table column meta data
SQLException
String parseInsertTable(String sql)
throws SQLException
sql - a SQL statement
SQLException
boolean isIdentity(ColumnProperties properties)
throws SQLException
properties - a table column
SQLException
String parseSequence(String sql)
throws SQLException
sql - a SQL statement
SQLException
Collection<QualifiedName> getSequences(DatabaseMetaData metaData)
throws SQLException
metaData - database meta data
SQLException
String getNextSequenceValueSQL(SequenceProperties sequence)
throws SQLException
sequence - a sequence name
SQLException
String getAlterSequenceSQL(SequenceProperties sequence,
long value)
throws SQLException
sequence - a sequence namevalue - a sequence value
SQLException
String getAlterIdentityColumnSQL(TableProperties table,
ColumnProperties column,
long value)
throws SQLException
table - a sequence namecolumn - a sequence namevalue - a sequence value
SQLException
List<String> getDefaultSchemas(DatabaseMetaData metaData)
throws SQLException
metaData -
SQLException
Pattern getIdentifierPattern(DatabaseMetaData metaData)
throws SQLException
metaData -
SQLException
String evaluateCurrentDate(String sql,
Date date)
throws SQLException
sql - an SQL statementdate - the replacement date
SQLException
String evaluateCurrentTime(String sql,
Time time)
throws SQLException
sql - an SQL statementtime - the replacement time
SQLException
String evaluateCurrentTimestamp(String sql,
Timestamp timestamp)
throws SQLException
sql - an SQL statementtimestamp - the replacement timestamp
SQLException
String evaluateRand(String sql)
throws SQLException
sql - an SQL statement
SQLException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||