Mode

The compatibility modes. There is a fixed set of modes (for example PostgreSQL, MySQL). Each mode has different settings.

Methods
static Mode getInstance(String name)
Get the mode with the given name.
static Mode getInstance(String name)
Get the mode with the given name.
Parameters:
name - the name of the mode
Returns:
the mode object
static Mode getRegular()
static Mode getRegular()
Mode.ModeEnum getEnum()
Mode.ModeEnum getEnum()
String getName()
String getName()
String toString()
String toString()

Fields
static boolean aliasColumnName
static boolean allNumericTypesHavePrecision
static boolean allowDB2TimestampFormat
static boolean allowEmptyInPredicate
static boolean allowEmptySchemaValuesAsDefaultSchema
static boolean allowPlusForStringConcat
static boolean allowUnrelatedOrderByExpressionsInDistinctQueries
static boolean allowUsingFromClauseInUpdateStatement
static boolean alterTableExtensionsMySQL
static boolean alterTableModifyColumn
static boolean autoIncrementClause
static boolean charAndByteLengthUnits
static Mode.CharPadding charPadding
static boolean convertOnlyToSmallerScale
static boolean createUniqueConstraintForReferencedColumns
static boolean dateTimeValueWithinTransaction
static boolean decimalSequences
static Set disallowedTypes
static boolean discardWithTableHints
static Mode.ExpressionNames expressionNames
static boolean forBitData
static boolean groupByColumnIndex
static boolean identityClause
static boolean identityColumnsHaveDefaultOnNull
static boolean identityDataType
static boolean indexDefinitionInCreateTable
static boolean insertOnConflict
static boolean isolationLevelInSelectOrInsertStatement
static boolean limit
static boolean logIsLogBase10
static boolean mergeWhere
static boolean nextValueReturnsDifferentValues
static boolean nextvalAndCurrvalPseudoColumns
static boolean numericWithBooleanComparison
static boolean onDuplicateKeyUpdate
static boolean regexpReplaceBackslashReferences
static boolean replaceInto
static boolean serialDataTypes
static boolean squareBracketQuotedNames
static boolean supportPoundSymbolForColumnNames
static Pattern supportedClientInfoPropertiesRegEx
static boolean swapConvertFunctionParameters
static boolean swapLogFunctionParameters
static boolean sysDummy1
static boolean systemColumns
static boolean takeGeneratedSequenceValue
static boolean takeInsertedIdentity
static boolean topInDML
static boolean topInSelect
static boolean treatEmptyStringsAsNull
static boolean truncateTableRestartIdentity
static HashMap typeByNameMap
static Mode.UniqueIndexNullsHandling uniqueIndexNullsHandling
static boolean updateSequenceOnManualIdentityInsertion
static Mode.ViewExpressionNames viewExpressionNames
static boolean zeroExLiteralsAreBinaryStrings

aliasColumnName

When enabled, aliased columns (as in SELECT ID AS I FROM TEST) return the alias (I in this case) in ResultSetMetaData.getColumnName() and 'null' in getTableName(). If disabled, the real column name (ID in this case) and table name is returned.

allNumericTypesHavePrecision

If {@code true} all numeric data types may have precision and 'UNSIGNED' clause.

allowDB2TimestampFormat

Whether DB2 TIMESTAMP formats are allowed.

allowEmptyInPredicate

Whether IN predicate may have an empty value list.

allowEmptySchemaValuesAsDefaultSchema

If {@code true} constructs like 'CREATE TABLE CATALOG..TABLE_NAME' are allowed, the default schema is used.

allowPlusForStringConcat

Text can be concatenated using '+'.

allowUnrelatedOrderByExpressionsInDistinctQueries

If {@code true} unrelated ORDER BY expression are allowed in DISTINCT queries, if {@code false} they are disallowed.

allowUsingFromClauseInUpdateStatement

If {@code true}, allow using from clause in update statement.

alterTableExtensionsMySQL

If {@code true} some additional non-standard ALTER TABLE commands are allowed.

alterTableModifyColumn

If {@code true} non-standard ALTER TABLE MODIFY COLUMN is allowed.

autoIncrementClause

Whether MySQL-style AUTO_INCREMENT clause is supported.

charAndByteLengthUnits

If {@code true} 'CHAR' and 'BYTE' length units are allowed.

charPadding

How to pad or trim CHAR values.

convertOnlyToSmallerScale

When converting the scale of decimal data, the number is only converted if the new scale is smaller than the current scale. Usually, the scale is converted and 0s are added if required.

createUniqueConstraintForReferencedColumns

If {@code true}, referential constraints will create a unique constraint on referenced columns if it doesn't exist instead of throwing an exception.

dateTimeValueWithinTransaction

If {@code true}, datetime value function return the same value within a transaction, if {@code false} datetime value functions return the same value within a command.

decimalSequences

If {@code true} NEXT VALUE FOR SEQUENCE, CURRENT VALUE FOR SEQUENCE, SEQUENCE.NEXTVAL, and SEQUENCE.CURRVAL return values with DECIMAL/NUMERIC data type instead of BIGINT.

disallowedTypes

An optional Set of hidden/disallowed column types. Certain DBMSs don't support all column types provided by H2, such as "NUMBER" when using PostgreSQL mode.

discardWithTableHints

Discard SQLServer table hints (e.g. "SELECT * FROM table WITH (NOLOCK)")

expressionNames

How column names are generated for expressions.

forBitData

If {@code true} 'FOR BIT DATA' clauses are allowed for character string data types.

groupByColumnIndex

Allow to use GROUP BY n, where n is column index in the SELECT list, similar to ORDER BY

identityClause

Whether SQL Server-style IDENTITY clause is supported.

identityColumnsHaveDefaultOnNull

If {@code true}, identity columns have DEFAULT ON NULL clause.

identityDataType

Whether IDENTITY pseudo data type is supported.

indexDefinitionInCreateTable

Creating indexes in the CREATE TABLE statement is allowed using INDEX(..) or KEY(..). Example: create table test(id int primary key, name varchar(255), key idx_name(name));

insertOnConflict

PostgreSQL style INSERT ... ON CONFLICT DO NOTHING.

isolationLevelInSelectOrInsertStatement

can set the isolation level using WITH {RR|RS|CS|UR}

limit

Whether LIMIT / OFFSET clauses are supported.

logIsLogBase10

The single-argument function LOG() uses base 10 instead of E.

mergeWhere

If {@code true}, merge when matched clause may have WHERE clause.

nextValueReturnsDifferentValues

If {@code true}, the next value expression returns different values when invoked multiple times within a row. This setting does not affect NEXTVAL() function.

nextvalAndCurrvalPseudoColumns

If {@code true}, sequence.NEXTVAL and sequence.CURRVAL pseudo columns are supported.

numericWithBooleanComparison

Allow to compare numeric with BOOLEAN.

onDuplicateKeyUpdate

MySQL style INSERT ... ON DUPLICATE KEY UPDATE ... and INSERT IGNORE.

regexpReplaceBackslashReferences

The function REGEXP_REPLACE() uses \ for back-references.

replaceInto

MySQL style REPLACE INTO.

serialDataTypes

Whether SERIAL and BIGSERIAL pseudo data types are supported.

squareBracketQuotedNames

Identifiers may be quoted using square brackets as in [Test].

supportPoundSymbolForColumnNames

Support the # for column names

supportedClientInfoPropertiesRegEx

Pattern describing the keys the java.sql.Connection.setClientInfo() method accepts.

swapConvertFunctionParameters

Swap the parameters of the CONVERT function.

swapLogFunctionParameters

Swap the parameters of LOG() function.

sysDummy1

Support the pseudo-table SYSIBM.SYSDUMMY1.

systemColumns

The system columns 'ctid' and 'oid' are supported.

takeGeneratedSequenceValue

If {@code true}, last identity of the session is updated on generation of a new sequence value.

takeInsertedIdentity

If {@code true}, last identity of the session is updated on insertion of a new value into identity column.

topInDML

Whether TOP clause in DML commands is supported.

topInSelect

Whether TOP clause in SELECT queries is supported.

treatEmptyStringsAsNull

Empty strings are treated like NULL values. Useful for Oracle emulation.

truncateTableRestartIdentity

If {@code true} TRUNCATE TABLE uses RESTART IDENTITY by default.

typeByNameMap

Custom mappings from type names to data types.

uniqueIndexNullsHandling

Determines how rows with {@code NULL} values in indexed columns are handled in unique indexes.

updateSequenceOnManualIdentityInsertion

If {@code true}, sequences of generated by default identity columns are updated when value is provided by user.

viewExpressionNames

How column names are generated for views.

zeroExLiteralsAreBinaryStrings

If {@code true} {@code 0x}-prefixed numbers are parsed as binary string literals, if {@code false} they are parsed as hexadecimal numeric values.