## org.h2.engine
Class Mode

    java.lang.Object
      org.h2.engine.Mode

    public class Mode

extends java.lang.Object

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

Field Summary
`boolean` `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().
`boolean` `allowPlusForStringConcat` Text can be concatenated using '+'.
`boolean` `convertInsertNullToZero` When inserting data, if a column is defined to be NOT NULL and NULL is inserted, then a 0 (or empty string, or the current timestamp for timestamp columns) value is used.
`boolean` `convertOnlyToSmallerScale` When converting the scale of decimal data, the number is only converted if the new scale is smaller than the current scale.
`boolean` `indexDefinitionInCreateTable` Creating indexes in the CREATE TABLE statement is allowed using `INDEX(..)`
`boolean` `lowerCaseIdentifiers` Meta data calls return identifiers in lower case.
`boolean` `nullConcatIsNull` Concatenation with NULL results in NULL.
`boolean` `roundWhenConvertToLong` When converting a floating point number to an integer, the fractional digits are not truncated, but the value is rounded.
`boolean` `squareBracketQuotedNames` Identifiers may be quoted using square brackets as in [Test].
`boolean` `supportOffsetFetch` Support for the syntax [OFFSET ..
`boolean` `sysDummy1` Support the pseudo-table SYSIBM.SYSDUMMY1.
`boolean` `systemColumns` The system columns 'CTID' and 'OID' are supported.
`boolean` `uniqueIndexSingleNull` For unique indexes, NULL is distinct.
`boolean` `uniqueIndexSingleNullExceptAllColumnsAreNull` When using unique indexes, multiple rows with NULL in all columns are allowed, however it is not allowed to have multiple rows with the same values otherwise.

Method Summary
`static Mode` `getInstance(java.lang.String name)` Get the mode with the given name.
`java.lang.String` `getName()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### aliasColumnName

    public boolean 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.

### convertInsertNullToZero

    public boolean convertInsertNullToZero

  When inserting data, if a column is defined to be NOT NULL and NULL is inserted, then a 0 (or empty string, or the current timestamp for timestamp columns) value is used. Usually, this operation is not allowed and an exception is thrown.

### convertOnlyToSmallerScale

    public boolean 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.

### indexDefinitionInCreateTable

    public boolean 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));`

### lowerCaseIdentifiers

    public boolean lowerCaseIdentifiers

  Meta data calls return identifiers in lower case.

### nullConcatIsNull

    public boolean nullConcatIsNull

  Concatenation with NULL results in NULL. Usually, NULL is treated as an empty string if only one of the operands is NULL, and NULL is only returned if both operands are NULL.

### roundWhenConvertToLong

    public boolean roundWhenConvertToLong

  When converting a floating point number to an integer, the fractional digits are not truncated, but the value is rounded.

### squareBracketQuotedNames

    public boolean squareBracketQuotedNames

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

### supportOffsetFetch

    public boolean supportOffsetFetch

  Support for the syntax [OFFSET .. ROW|ROWS] [FETCH FIRST .. ROW|ROWS ONLY] as an alternative for LIMIT .. OFFSET.

### systemColumns

    public boolean systemColumns

  The system columns 'CTID' and 'OID' are supported.

### uniqueIndexSingleNull

    public boolean uniqueIndexSingleNull

  For unique indexes, NULL is distinct. That means only one row with NULL in one of the columns is allowed.

### uniqueIndexSingleNullExceptAllColumnsAreNull

    public boolean uniqueIndexSingleNullExceptAllColumnsAreNull

  When using unique indexes, multiple rows with NULL in all columns are allowed, however it is not allowed to have multiple rows with the same values otherwise.

### sysDummy1

    public boolean sysDummy1

  Support the pseudo-table SYSIBM.SYSDUMMY1.

### allowPlusForStringConcat

    public boolean allowPlusForStringConcat

  Text can be concatenated using '+'.

Method Detail

### getInstance

    public static Mode getInstance(java.lang.String name)

  Get the mode with the given name.

  Parameters:
    `name` - the name of the mode
  Returns:
    the mode object

### getName

    public java.lang.String getName()