public abstract class AbstractSql92Backend extends AbstractBackend
| Modifier and Type | Field and Description |
|---|---|
static String[] |
RESERVED_WORDS_SQL92
array of reserved words.
|
static String |
SQL_COALESCE
COALESCE keyword.
|
static String |
SQL_FOR_UPDATE
FOR UPDATE string.
|
EMPTY_STRING, TYPE_BIGINT, TYPE_BIT, TYPE_BLOB, TYPE_BOOL, TYPE_BOOLEAN, TYPE_BYTE, TYPE_BYTEA, TYPE_CHAR_1, TYPE_DATE, TYPE_DATETIME, TYPE_DATETIME_YEAR_TO_SECOND, TYPE_DECIMAL, TYPE_DECIMAL_19, TYPE_DOUBLE, TYPE_FLOAT, TYPE_FLOAT4, TYPE_FLOAT8, TYPE_INT, TYPE_INT2, TYPE_INT4, TYPE_INT8, TYPE_INTEGER, TYPE_NCHAR_1, TYPE_NUMBER, TYPE_NUMBER_1, TYPE_NUMBER_10, TYPE_NUMBER_19, TYPE_NUMBER_5, TYPE_NVARCHAR, TYPE_NVARCHAR_MAX, TYPE_REAL, TYPE_SMALLFLOAT, TYPE_SMALLINT, TYPE_TEXT, TYPE_TIME, TYPE_TIMESTAMP, TYPE_TINYINT, TYPE_VARBINARY_MAX, TYPE_VARCHARSQL_ALLSTAR, SQL_AND, SQL_ANDNOT, SQL_COMMA, SQL_COMMA_PAR, SQL_DELETE, SQL_EQUAL, SQL_EQUAL_PAR, SQL_EQUAL_PAR_COMMA, SQL_EQUAL_ZERO, SQL_EXISTS, SQL_FROM, SQL_GREATER, SQL_GREATER_PAR, SQL_GREATEROREQUAL, SQL_GREATEROREQUAL_PAR, SQL_GROUPBY, SQL_INSERT_INTO, SQL_INSERT_VALUES, SQL_ISNOTNULL, SQL_ISNULL, SQL_LEFT_PARENTHESIS, SQL_LESS, SQL_LESS_PAR, SQL_LESSOREQUAL, SQL_LESSOREQUAL_PAR, SQL_LIKE, SQL_LIKE_PAR, SQL_MAX, SQL_MIN, SQL_NOT, SQL_NOTEQUAL, SQL_NOTEQUAL_PAR, SQL_NOTEQUAL_ZERO, SQL_NOTLIKE, SQL_NOTLIKE_PAR, SQL_OR, SQL_ORDERBY, SQL_ORNOT, SQL_PAR, SQL_PAR_COMMA, SQL_PLUS_ONE, SQL_RIGHT_PARENTHESIS, SQL_SELECT, SQL_SELECT_ALL_FROM, SQL_SET, SQL_SORTASC, SQL_SORTDESC, SQL_UPDATE, SQL_WHERE, SQL_WHEREALL, SQL_WHEREAND, SQL_WHERENOTHING, SQL_WHEREOR| Constructor and Description |
|---|
AbstractSql92Backend() |
| Modifier and Type | Method and Description |
|---|---|
void |
buildSelectSql(StringBuilder sqlBuilder,
boolean writeLock,
int limit,
int offset)
Creates a select statement string from an inner sql string.
|
String |
getCoalesceKeyword()
Gets the keyword for the COALESCE function.
|
Set<String> |
getReservedWords()
Gets the list of reserved words for this backend.
|
int |
setLeadingSelectParameters(BackendPreparedStatement stmt,
int limit,
int offset)
Sets optional parameters before applying the original parameters.
|
int |
setTrailingSelectParameters(BackendPreparedStatement stmt,
int index,
int limit,
int offset)
Sets optional parameters after applying the original parameters.
|
String |
sqlCreateForeignKey(String referencingTableName,
String referencingColumnName,
String referencedTableName,
String referencedColumnName,
String foreignKeyName,
boolean composite)
Generates the ALTER TABLE statement to add a foreign key constraint.
|
String |
sqlDropForeignKey(String referencingTableName,
String foreignKeyName)
Generates the sql statement to drop a foreign key constraint.
|
String |
sqlNextFromSequene(String name)
Creates the SQL string to retrieve the next id from a sequence.
|
boolean |
supportsSequences()
True if backend provides transactionless sequences.
|
allowsExpressionsReferringToTablesBeingUpdated, assertValidName, buildSelectSql, columnTypeNullDefaultToString, columnTypeToString, createColumnMetaData, createConnection, createIndexColumnMetaData, createIndexMetaData, createTableMetaData, extractWhereClause, getDefaultSchema, getDefaultSize, getEmptyString, getMaxScale, getMaxSize, getMetaData, getMigrationStrategy, getModelMetaData, getTableMetaData, isCommunicationLinkException, isConstraintException, isDefaultEqual, isMatchingName, isReleaseSavepointSupported, isTemporaryName, jdbcTypeToSqlType, needAliasForSubselect, needSetLongWorkaround, needTxForFetchsize, normalizeDefault, optimizeSql, sqlAddColumn, sqlAlterColumnComment, sqlAlterColumnDefault, sqlAlterColumnNullConstraint, sqlAlterColumnType, sqlAlterTableComment, sqlAsBeforeTableAlias, sqlComment, sqlCreateColumn, sqlCreateColumnComment, sqlCreateIndex, sqlCreateTableAttributeWithoutComment, sqlCreateTableClosing, sqlCreateTableComment, sqlCreateTableIntro, sqlCreateTableIntroWithoutComment, sqlDropColumn, sqlDropIndex, sqlFunction, sqlJoin, sqlJoinSelects, sqlJoinSelects, sqlRenameAndAlterColumnType, sqlRenameColumn, sqlRequiresExtraCommit, sqlResultSetIsClosedSupported, sqlTypeToString, sqlUpdateToNotNull, toQuotedString, toString, valueToLiteralclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetBackendId, getDriverClassName, getName, isMatchingUrlpublic static final String SQL_FOR_UPDATE
public static final String SQL_COALESCE
public static final String[] RESERVED_WORDS_SQL92
public Set<String> getReservedWords()
Backendpublic void buildSelectSql(StringBuilder sqlBuilder, boolean writeLock, int limit, int offset)
Backend
sqlBuilder is anything as FROM... WHERE... ORDER BY....
It is decorated with a leading SELECT plus optional clauses
like for the given parameters.
sqlBuilder - the sql builder, initially containing the inner sql without leading SELECT.writeLock - true select should write locklimit - the limit value, ≤ 0 if no limit clauseoffset - the offset value, ≤ 0 if no offset clausepublic int setLeadingSelectParameters(BackendPreparedStatement stmt, int limit, int offset)
Backendstmt - the prepared statementlimit - the limit value, ≤ 0 if no limit clauseoffset - the offset value, ≤ 0 if no offset clausepublic int setTrailingSelectParameters(BackendPreparedStatement stmt, int index, int limit, int offset)
Backendstmt - the prepared statementindex - the first parameter indexlimit - the limit value, ≤ 0 if no limit clauseoffset - the offset value, ≤ 0 if no offset clausepublic String getCoalesceKeyword()
BackendgetCoalesceKeyword in interface BackendgetCoalesceKeyword in class AbstractBackendpublic String sqlCreateForeignKey(String referencingTableName, String referencingColumnName, String referencedTableName, String referencedColumnName, String foreignKeyName, boolean composite)
BackendreferencingTableName - the referencing foreign table namereferencingColumnName - the referencing foreign column namereferencedTableName - the referenced primary table namereferencedColumnName - the referenced primary column nameforeignKeyName - the name of the foreign keycomposite - true if referencing table is a component of the referenced tablepublic String sqlDropForeignKey(String referencingTableName, String foreignKeyName)
BackendreferencingTableName - the referencing foreign table nameforeignKeyName - the name of the foreign keypublic boolean supportsSequences()
BackendTentackle - distributed, domain- and model-driven