Package org.h2.engine
Class Constants
- java.lang.Object
-
- org.h2.engine.Constants
-
public class Constants extends java.lang.ObjectConstants are fixed values that are used in the whole database code.
-
-
Field Summary
Fields Modifier and Type Field Description static intALLOW_LITERALS_ALLConstant meaning both numbers and text is allowed in SQL statements.static intALLOW_LITERALS_NONEConstant meaning no literals are allowed in SQL statements.static intALLOW_LITERALS_NUMBERSConstant meaning only numbers are allowed in SQL statements (but no texts).static booleanBLOB_SEARCHWhether searching in Blob values should be supported.static java.lang.StringBUILD_DATEThe build date is updated for each public release.static intBUILD_IDSequential version number.static booleanBUILD_SNAPSHOTWhether this is a snapshot version.static java.lang.StringBUILD_VENDOR_AND_VERSIONIf H2 is compiled to be included in a product, this should be set to a unique vendor id (to distinguish from official releases).static intCACHE_MIN_RECORDSThe minimum number of entries to keep in the cache.static java.lang.StringCACHE_TYPE_DEFAULTThe default cache type.static java.lang.StringCLUSTERING_DISABLEDThe value of the cluster setting if clustering is disabled.static java.lang.StringCLUSTERING_ENABLEDThe value of the cluster setting if clustering is enabled (the actual value is checked later).static java.lang.StringCONN_URL_COLUMNLISTThe database URL used when calling a function if only the column list should be returned.static java.lang.StringCONN_URL_INTERNALThe database URL used when calling a function if the data should be returned.static intCOST_ROW_OFFSETThe cost is calculated on rowcount + this offset, to avoid using the wrong or no index if the table contains no rows _currently_ (when preparing the statement)static intDEADLOCK_CHECKThe number of milliseconds after which to check for a deadlock if locking is not successful.static intDEFAULT_HTTP_PORTThe default port number of the HTTP server (for the H2 Console).static intDEFAULT_LOCK_MODEThe default value for the LOCK_MODE setting.static intDEFAULT_MAX_LENGTH_INPLACE_LOBThe default maximum length of an LOB that is stored with the record itself, and not in a separate place.static intDEFAULT_MAX_OPERATION_MEMORYThe default for the setting MAX_OPERATION_MEMORY.static intDEFAULT_PAGE_SIZEThe default page size to use for new databases.static intDEFAULT_RESULT_SET_CONCURRENCYThe default result set concurrency for statements created with Connection.createStatement() or prepareStatement(String sql).static intDEFAULT_TCP_PORTThe default port of the TCP server.static intDEFAULT_WRITE_DELAYThe default delay in milliseconds before the transaction log is written.static intENCRYPTION_KEY_HASH_ITERATIONSThe password is hashed this many times to slow down dictionary attacks.static intFILE_BLOCK_SIZEThe block of a file.static java.lang.StringFULL_VERSIONThe complete version number of this database, consisting of the major version, the minor version, the build id, and the build date.static intINFORMATION_SCHEMA_IDThe identity of INFORMATION_SCHEMA.static intINITIAL_LOCK_TIMEOUTFor testing, the lock timeout is smaller than for interactive use cases.static intIO_BUFFER_SIZEThe block size for I/O operations.static intIO_BUFFER_SIZE_COMPRESSThe block size used to compress data in the LZFOutputStream.static intLOCK_MODE_OFFThe lock mode that means no locking is used at all.static intLOCK_MODE_READ_COMMITTEDThe lock mode that means read locks are acquired, but they are released immediately after the statement is executed.static intLOCK_MODE_TABLEThe lock mode that means table level locking is used for reads and writes.static intLOCK_MODE_TABLE_GCThe lock mode that means table level locking is used for reads and writes.static intLOCK_SLEEPThe number of milliseconds to wait between checking the .lock.db file still exists once a database is locked.static intMAIN_SCHEMA_IDThe identity of PUBLIC schema.static intMAX_ARRAY_CARDINALITYThe maximum allowed cardinality of array.static intMAX_COLUMNSThe maximum number of columns in a table, select statement or row value.static intMAX_IDENTIFIER_LENGTHThe maximum allowed length of identifiers.static intMAX_NUMERIC_PRECISIONThe maximum allowed precision of numeric data types.static intMAX_PARAMETER_INDEXThe highest possible parameter index.static intMAX_STRING_LENGTHThe maximum allowed length for character string, binary string, and other data types based on them; excluding LOB data types.static intMEMORY_ARRAYThe memory needed by an array.static intMEMORY_OBJECTThe memory needed by a regular object with at least one field.static intMEMORY_POINTERThe memory needed by a pointer.static intMEMORY_ROWThe memory needed by a Row.static intPG_CATALOG_SCHEMA_IDThe identity of pg_catalog schema.static java.lang.StringPG_VERSIONAnnounced version for PgServer.static java.lang.StringPREFIX_INDEXThe name prefix used for indexes that are not explicitly named.static java.lang.StringPREFIX_JOINThe name prefix used for synthetic nested join tables.static java.lang.StringPREFIX_PRIMARY_KEYThe name prefix used for primary key constraints that are not explicitly named.static java.lang.StringPREFIX_QUERY_ALIASThe name prefix used for query aliases that are not explicitly named.static java.lang.StringPUBLIC_ROLE_NAMEEvery user belongs to this role.static intQUERY_STATISTICS_MAX_ENTRIESThe maximum number of entries in query statistics.static intSALT_LENThe number of bytes in random salt that is used to hash passwords.static java.lang.StringSCHEMA_MAINThe name of the default schema.static java.lang.StringSCHEMA_PG_CATALOGThe name of the pg_catalog schema.static intSELECTIVITY_DEFAULTThe default selectivity (used if the selectivity is not calculated).static intSELECTIVITY_DISTINCT_COUNTThe number of distinct values to keep in memory when running ANALYZE.static java.lang.StringSERVER_PROPERTIES_DIRThe default directory name of the server properties file for the H2 Console.static java.lang.StringSERVER_PROPERTIES_NAMEThe name of the server properties file for the H2 Console.static longSLOW_QUERY_LIMIT_MSQueries that take longer than this number of milliseconds are written to the trace file with the level info.static java.lang.StringSTART_URLThe database URL prefix of this database.static java.lang.StringSUFFIX_LOCK_FILEThe file name suffix of file lock files that are used to make sure a database is open by only one process at any time.static java.lang.StringSUFFIX_MV_FILEThe file name suffix of a MVStore file.static java.lang.StringSUFFIX_MV_STORE_NEW_FILEThe file name suffix of a new MVStore file, used when compacting a store.static java.lang.StringSUFFIX_MV_STORE_TEMP_FILEThe file name suffix of a temporary MVStore file, used when compacting a store.static java.lang.StringSUFFIX_OLD_DATABASE_FILEThe file name suffix of a H2 version 1.1 database file.static java.lang.StringSUFFIX_TEMP_FILEThe file name suffix of temporary files.static java.lang.StringSUFFIX_TRACE_FILEThe file name suffix of trace files.static intTCP_PROTOCOL_VERSION_17The TCP protocol version number 17.static intTCP_PROTOCOL_VERSION_18The TCP protocol version number 18.static intTCP_PROTOCOL_VERSION_19The TCP protocol version number 19.static intTCP_PROTOCOL_VERSION_20The TCP protocol version number 20.static intTCP_PROTOCOL_VERSION_MAX_SUPPORTEDMaximum supported version of TCP protocol.static intTCP_PROTOCOL_VERSION_MIN_SUPPORTEDMinimum supported version of TCP protocol.static intTHROTTLE_DELAYHow often we check to see if we need to apply a throttling delay if SET THROTTLE has been used.static intTRANSACTION_SNAPSHOTSNAPSHOT isolation level of transaction.static java.lang.StringURL_FORMATThe database URL format in simplified Backus-Naur form.static java.lang.StringUSER_PACKAGEThe package name of user defined classes.static java.lang.StringVERSIONThe version of this product, consisting of major version, minor version, and build id.static intVERSION_MAJORThe major version of this database.static intVERSION_MINORThe minor version of this database.static intVIEW_COST_CACHE_MAX_AGEThe maximum time in milliseconds to keep the cost of a view.static intVIEW_INDEX_CACHE_SIZEThe name of the index cache that is used for temporary view (subqueries used as tables).
-
Constructor Summary
Constructors Modifier Constructor Description privateConstants()
-
-
-
Field Detail
-
BUILD_DATE
public static final java.lang.String BUILD_DATE
The build date is updated for each public release.- See Also:
- Constant Field Values
-
BUILD_ID
public static final int BUILD_ID
Sequential version number. Even numbers are used for official releases, odd numbers are used for development builds.- See Also:
- Constant Field Values
-
BUILD_SNAPSHOT
public static final boolean BUILD_SNAPSHOT
Whether this is a snapshot version.- See Also:
- Constant Field Values
-
BUILD_VENDOR_AND_VERSION
public static final java.lang.String BUILD_VENDOR_AND_VERSION
If H2 is compiled to be included in a product, this should be set to a unique vendor id (to distinguish from official releases). Additionally, a version number should be set to distinguish releases. Example: ACME_SVN1651_BUILD3
-
TCP_PROTOCOL_VERSION_17
public static final int TCP_PROTOCOL_VERSION_17
The TCP protocol version number 17.- Since:
- 1.4.197 (2018-03-18)
- See Also:
- Constant Field Values
-
TCP_PROTOCOL_VERSION_18
public static final int TCP_PROTOCOL_VERSION_18
The TCP protocol version number 18.- Since:
- 1.4.198 (2019-02-22)
- See Also:
- Constant Field Values
-
TCP_PROTOCOL_VERSION_19
public static final int TCP_PROTOCOL_VERSION_19
The TCP protocol version number 19.- Since:
- 1.4.200 (2019-10-14)
- See Also:
- Constant Field Values
-
TCP_PROTOCOL_VERSION_20
public static final int TCP_PROTOCOL_VERSION_20
The TCP protocol version number 20.- Since:
- 2.0.202 (2021-11-25)
- See Also:
- Constant Field Values
-
TCP_PROTOCOL_VERSION_MIN_SUPPORTED
public static final int TCP_PROTOCOL_VERSION_MIN_SUPPORTED
Minimum supported version of TCP protocol.- See Also:
- Constant Field Values
-
TCP_PROTOCOL_VERSION_MAX_SUPPORTED
public static final int TCP_PROTOCOL_VERSION_MAX_SUPPORTED
Maximum supported version of TCP protocol.- See Also:
- Constant Field Values
-
VERSION_MAJOR
public static final int VERSION_MAJOR
The major version of this database.- See Also:
- Constant Field Values
-
VERSION_MINOR
public static final int VERSION_MINOR
The minor version of this database.- See Also:
- Constant Field Values
-
LOCK_MODE_OFF
public static final int LOCK_MODE_OFF
The lock mode that means no locking is used at all.- See Also:
- Constant Field Values
-
LOCK_MODE_READ_COMMITTED
public static final int LOCK_MODE_READ_COMMITTED
The lock mode that means read locks are acquired, but they are released immediately after the statement is executed.- See Also:
- Constant Field Values
-
LOCK_MODE_TABLE
public static final int LOCK_MODE_TABLE
The lock mode that means table level locking is used for reads and writes.- See Also:
- Constant Field Values
-
LOCK_MODE_TABLE_GC
public static final int LOCK_MODE_TABLE_GC
The lock mode that means table level locking is used for reads and writes. If a table is locked, System.gc is called to close forgotten connections.- See Also:
- Constant Field Values
-
ALLOW_LITERALS_ALL
public static final int ALLOW_LITERALS_ALL
Constant meaning both numbers and text is allowed in SQL statements.- See Also:
- Constant Field Values
-
ALLOW_LITERALS_NONE
public static final int ALLOW_LITERALS_NONE
Constant meaning no literals are allowed in SQL statements.- See Also:
- Constant Field Values
-
ALLOW_LITERALS_NUMBERS
public static final int ALLOW_LITERALS_NUMBERS
Constant meaning only numbers are allowed in SQL statements (but no texts).- See Also:
- Constant Field Values
-
TRANSACTION_SNAPSHOT
public static final int TRANSACTION_SNAPSHOT
SNAPSHOT isolation level of transaction.- See Also:
- Constant Field Values
-
BLOB_SEARCH
public static final boolean BLOB_SEARCH
Whether searching in Blob values should be supported.- See Also:
- Constant Field Values
-
CACHE_MIN_RECORDS
public static final int CACHE_MIN_RECORDS
The minimum number of entries to keep in the cache.- See Also:
- Constant Field Values
-
CACHE_TYPE_DEFAULT
public static final java.lang.String CACHE_TYPE_DEFAULT
The default cache type.- See Also:
- Constant Field Values
-
CLUSTERING_DISABLED
public static final java.lang.String CLUSTERING_DISABLED
The value of the cluster setting if clustering is disabled.- See Also:
- Constant Field Values
-
CLUSTERING_ENABLED
public static final java.lang.String CLUSTERING_ENABLED
The value of the cluster setting if clustering is enabled (the actual value is checked later).- See Also:
- Constant Field Values
-
CONN_URL_COLUMNLIST
public static final java.lang.String CONN_URL_COLUMNLIST
The database URL used when calling a function if only the column list should be returned.- See Also:
- Constant Field Values
-
CONN_URL_INTERNAL
public static final java.lang.String CONN_URL_INTERNAL
The database URL used when calling a function if the data should be returned.- See Also:
- Constant Field Values
-
COST_ROW_OFFSET
public static final int COST_ROW_OFFSET
The cost is calculated on rowcount + this offset, to avoid using the wrong or no index if the table contains no rows _currently_ (when preparing the statement)- See Also:
- Constant Field Values
-
DEADLOCK_CHECK
public static final int DEADLOCK_CHECK
The number of milliseconds after which to check for a deadlock if locking is not successful.- See Also:
- Constant Field Values
-
DEFAULT_HTTP_PORT
public static final int DEFAULT_HTTP_PORT
The default port number of the HTTP server (for the H2 Console). This value is also in the documentation and in the Server javadoc.- See Also:
- Constant Field Values
-
DEFAULT_LOCK_MODE
public static final int DEFAULT_LOCK_MODE
The default value for the LOCK_MODE setting.- See Also:
- Constant Field Values
-
DEFAULT_MAX_LENGTH_INPLACE_LOB
public static final int DEFAULT_MAX_LENGTH_INPLACE_LOB
The default maximum length of an LOB that is stored with the record itself, and not in a separate place.- See Also:
- Constant Field Values
-
DEFAULT_MAX_OPERATION_MEMORY
public static final int DEFAULT_MAX_OPERATION_MEMORY
The default for the setting MAX_OPERATION_MEMORY.- See Also:
- Constant Field Values
-
DEFAULT_PAGE_SIZE
public static final int DEFAULT_PAGE_SIZE
The default page size to use for new databases.- See Also:
- Constant Field Values
-
DEFAULT_RESULT_SET_CONCURRENCY
public static final int DEFAULT_RESULT_SET_CONCURRENCY
The default result set concurrency for statements created with Connection.createStatement() or prepareStatement(String sql).- See Also:
- Constant Field Values
-
DEFAULT_TCP_PORT
public static final int DEFAULT_TCP_PORT
The default port of the TCP server. This port is also used in the documentation and in the Server javadoc.- See Also:
- Constant Field Values
-
DEFAULT_WRITE_DELAY
public static final int DEFAULT_WRITE_DELAY
The default delay in milliseconds before the transaction log is written.- See Also:
- Constant Field Values
-
ENCRYPTION_KEY_HASH_ITERATIONS
public static final int ENCRYPTION_KEY_HASH_ITERATIONS
The password is hashed this many times to slow down dictionary attacks.- See Also:
- Constant Field Values
-
FILE_BLOCK_SIZE
public static final int FILE_BLOCK_SIZE
The block of a file. It is also the encryption block size.- See Also:
- Constant Field Values
-
INITIAL_LOCK_TIMEOUT
public static final int INITIAL_LOCK_TIMEOUT
For testing, the lock timeout is smaller than for interactive use cases. This value could be increased to about 5 or 10 seconds.- See Also:
- Constant Field Values
-
IO_BUFFER_SIZE
public static final int IO_BUFFER_SIZE
The block size for I/O operations.- See Also:
- Constant Field Values
-
IO_BUFFER_SIZE_COMPRESS
public static final int IO_BUFFER_SIZE_COMPRESS
The block size used to compress data in the LZFOutputStream.- See Also:
- Constant Field Values
-
LOCK_SLEEP
public static final int LOCK_SLEEP
The number of milliseconds to wait between checking the .lock.db file still exists once a database is locked.- See Also:
- Constant Field Values
-
MAX_IDENTIFIER_LENGTH
public static final int MAX_IDENTIFIER_LENGTH
The maximum allowed length of identifiers.- See Also:
- Constant Field Values
-
MAX_COLUMNS
public static final int MAX_COLUMNS
The maximum number of columns in a table, select statement or row value.- See Also:
- Constant Field Values
-
MAX_STRING_LENGTH
public static final int MAX_STRING_LENGTH
The maximum allowed length for character string, binary string, and other data types based on them; excluding LOB data types.- See Also:
- Constant Field Values
-
MAX_NUMERIC_PRECISION
public static final int MAX_NUMERIC_PRECISION
The maximum allowed precision of numeric data types.- See Also:
- Constant Field Values
-
MAX_ARRAY_CARDINALITY
public static final int MAX_ARRAY_CARDINALITY
The maximum allowed cardinality of array.- See Also:
- Constant Field Values
-
MAX_PARAMETER_INDEX
public static final int MAX_PARAMETER_INDEX
The highest possible parameter index.- See Also:
- Constant Field Values
-
MEMORY_OBJECT
public static final int MEMORY_OBJECT
The memory needed by a regular object with at least one field.- See Also:
- Constant Field Values
-
MEMORY_ARRAY
public static final int MEMORY_ARRAY
The memory needed by an array.- See Also:
- Constant Field Values
-
MEMORY_POINTER
public static final int MEMORY_POINTER
The memory needed by a pointer.- See Also:
- Constant Field Values
-
MEMORY_ROW
public static final int MEMORY_ROW
The memory needed by a Row.- See Also:
- Constant Field Values
-
PREFIX_INDEX
public static final java.lang.String PREFIX_INDEX
The name prefix used for indexes that are not explicitly named.- See Also:
- Constant Field Values
-
PREFIX_JOIN
public static final java.lang.String PREFIX_JOIN
The name prefix used for synthetic nested join tables.- See Also:
- Constant Field Values
-
PREFIX_PRIMARY_KEY
public static final java.lang.String PREFIX_PRIMARY_KEY
The name prefix used for primary key constraints that are not explicitly named.- See Also:
- Constant Field Values
-
PREFIX_QUERY_ALIAS
public static final java.lang.String PREFIX_QUERY_ALIAS
The name prefix used for query aliases that are not explicitly named.- See Also:
- Constant Field Values
-
PUBLIC_ROLE_NAME
public static final java.lang.String PUBLIC_ROLE_NAME
Every user belongs to this role.- See Also:
- Constant Field Values
-
SALT_LEN
public static final int SALT_LEN
The number of bytes in random salt that is used to hash passwords.- See Also:
- Constant Field Values
-
INFORMATION_SCHEMA_ID
public static final int INFORMATION_SCHEMA_ID
The identity of INFORMATION_SCHEMA.- See Also:
- Constant Field Values
-
MAIN_SCHEMA_ID
public static final int MAIN_SCHEMA_ID
The identity of PUBLIC schema.- See Also:
- Constant Field Values
-
SCHEMA_MAIN
public static final java.lang.String SCHEMA_MAIN
The name of the default schema.- See Also:
- Constant Field Values
-
PG_CATALOG_SCHEMA_ID
public static final int PG_CATALOG_SCHEMA_ID
The identity of pg_catalog schema.- See Also:
- Constant Field Values
-
SCHEMA_PG_CATALOG
public static final java.lang.String SCHEMA_PG_CATALOG
The name of the pg_catalog schema.- See Also:
- Constant Field Values
-
SELECTIVITY_DEFAULT
public static final int SELECTIVITY_DEFAULT
The default selectivity (used if the selectivity is not calculated).- See Also:
- Constant Field Values
-
SELECTIVITY_DISTINCT_COUNT
public static final int SELECTIVITY_DISTINCT_COUNT
The number of distinct values to keep in memory when running ANALYZE.- See Also:
- Constant Field Values
-
SERVER_PROPERTIES_DIR
public static final java.lang.String SERVER_PROPERTIES_DIR
The default directory name of the server properties file for the H2 Console.- See Also:
- Constant Field Values
-
SERVER_PROPERTIES_NAME
public static final java.lang.String SERVER_PROPERTIES_NAME
The name of the server properties file for the H2 Console.- See Also:
- Constant Field Values
-
SLOW_QUERY_LIMIT_MS
public static final long SLOW_QUERY_LIMIT_MS
Queries that take longer than this number of milliseconds are written to the trace file with the level info.- See Also:
- Constant Field Values
-
START_URL
public static final java.lang.String START_URL
The database URL prefix of this database.- See Also:
- Constant Field Values
-
SUFFIX_LOCK_FILE
public static final java.lang.String SUFFIX_LOCK_FILE
The file name suffix of file lock files that are used to make sure a database is open by only one process at any time.- See Also:
- Constant Field Values
-
SUFFIX_OLD_DATABASE_FILE
public static final java.lang.String SUFFIX_OLD_DATABASE_FILE
The file name suffix of a H2 version 1.1 database file.- See Also:
- Constant Field Values
-
SUFFIX_MV_FILE
public static final java.lang.String SUFFIX_MV_FILE
The file name suffix of a MVStore file.- See Also:
- Constant Field Values
-
SUFFIX_MV_STORE_NEW_FILE
public static final java.lang.String SUFFIX_MV_STORE_NEW_FILE
The file name suffix of a new MVStore file, used when compacting a store.- See Also:
- Constant Field Values
-
SUFFIX_MV_STORE_TEMP_FILE
public static final java.lang.String SUFFIX_MV_STORE_TEMP_FILE
The file name suffix of a temporary MVStore file, used when compacting a store.- See Also:
- Constant Field Values
-
SUFFIX_TEMP_FILE
public static final java.lang.String SUFFIX_TEMP_FILE
The file name suffix of temporary files.- See Also:
- Constant Field Values
-
SUFFIX_TRACE_FILE
public static final java.lang.String SUFFIX_TRACE_FILE
The file name suffix of trace files.- See Also:
- Constant Field Values
-
THROTTLE_DELAY
public static final int THROTTLE_DELAY
How often we check to see if we need to apply a throttling delay if SET THROTTLE has been used.- See Also:
- Constant Field Values
-
URL_FORMAT
public static final java.lang.String URL_FORMAT
The database URL format in simplified Backus-Naur form.- See Also:
- Constant Field Values
-
USER_PACKAGE
public static final java.lang.String USER_PACKAGE
The package name of user defined classes.- See Also:
- Constant Field Values
-
VIEW_COST_CACHE_MAX_AGE
public static final int VIEW_COST_CACHE_MAX_AGE
The maximum time in milliseconds to keep the cost of a view. 10000 means 10 seconds.- See Also:
- Constant Field Values
-
VIEW_INDEX_CACHE_SIZE
public static final int VIEW_INDEX_CACHE_SIZE
The name of the index cache that is used for temporary view (subqueries used as tables).- See Also:
- Constant Field Values
-
QUERY_STATISTICS_MAX_ENTRIES
public static final int QUERY_STATISTICS_MAX_ENTRIES
The maximum number of entries in query statistics.- See Also:
- Constant Field Values
-
PG_VERSION
public static final java.lang.String PG_VERSION
Announced version for PgServer.- See Also:
- Constant Field Values
-
VERSION
public static final java.lang.String VERSION
The version of this product, consisting of major version, minor version, and build id.
-
FULL_VERSION
public static final java.lang.String FULL_VERSION
The complete version number of this database, consisting of the major version, the minor version, the build id, and the build date.
-
-