Package org.h2.engine
Class Constants
java.lang.Object
org.h2.engine.Constants
Constants are fixed values that are used in the whole database code.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Constant meaning both numbers and text is allowed in SQL statements.static final int
Constant meaning no literals are allowed in SQL statements.static final int
Constant meaning only numbers are allowed in SQL statements (but no texts).static final boolean
Whether searching in Blob values should be supported.static final String
The build date is updated for each public release.static final int
Sequential version number.static final boolean
Whether this is a snapshot version.static final String
If H2 is compiled to be included in a product, this should be set to a unique vendor id (to distinguish from official releases).static final int
The minimum number of entries to keep in the cache.static final String
The default cache type.static final String
The value of the cluster setting if clustering is disabled.static final String
The value of the cluster setting if clustering is enabled (the actual value is checked later).static final String
The database URL used when calling a function if only the column list should be returned.static final String
The database URL used when calling a function if the data should be returned.static final int
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)static final int
The number of milliseconds after which to check for a deadlock if locking is not successful.static final int
The default port number of the HTTP server (for the H2 Console).static final int
The default value for the LOCK_MODE setting.static final int
The default maximum length of an LOB that is stored with the record itself, and not in a separate place.static final int
The default for the setting MAX_OPERATION_MEMORY.static final int
The default page size to use for new databases.static final int
The default result set concurrency for statements created with Connection.createStatement() or prepareStatement(String sql).static final int
The default port of the TCP server.static final int
The default delay in milliseconds before the transaction log is written.static final int
The password is hashed this many times to slow down dictionary attacks.static final int
The block of a file.static final String
The complete version number of this database, consisting of the major version, the minor version, the build id, and the build date.static final int
The identity of INFORMATION_SCHEMA.static final int
For testing, the lock timeout is smaller than for interactive use cases.static final int
The block size for I/O operations.static final int
The block size used to compress data in the LZFOutputStream.static final int
The lock mode that means no locking is used at all.static final int
The lock mode that means read locks are acquired, but they are released immediately after the statement is executed.static final int
The lock mode that means table level locking is used for reads and writes.static final int
The lock mode that means table level locking is used for reads and writes.static final int
The number of milliseconds to wait between checking the .lock.db file still exists once a database is locked.static final int
The identity of PUBLIC schema.static final int
The maximum allowed cardinality of array.static final int
The maximum number of columns in a table, select statement or row value.static final int
The maximum allowed length of identifiers.static final int
The maximum allowed precision of numeric data types.static final int
The highest possible parameter index.static final int
The maximum allowed length for character string, binary string, and other data types based on them; excluding LOB data types.static final int
The memory needed by an array.static final int
The memory needed by a regular object with at least one field.static final int
The memory needed by a pointer.static final int
The memory needed by a Row.static final int
The minimum number of characters in web admin password.static final int
The identity of pg_catalog schema.static final String
Announced version for PgServer.static final String
The name prefix used for indexes that are not explicitly named.static final String
The name prefix used for synthetic nested join tables.static final String
The name prefix used for primary key constraints that are not explicitly named.static final String
The name prefix used for query aliases that are not explicitly named.static final String
Every user belongs to this role.static final int
The maximum number of entries in query statistics.static final int
The number of bytes in random salt that is used to hash passwords.static final String
The name of the default schema.static final String
The name of the pg_catalog schema.static final int
The default selectivity (used if the selectivity is not calculated).static final int
The number of distinct values to keep in memory when running ANALYZE.static final String
The default directory name of the server properties file for the H2 Console.static final String
The name of the server properties file for the H2 Console.static final long
Queries that take longer than this number of milliseconds are written to the trace file with the level info.static final String
The database URL prefix of this database.static final String
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.static final String
The file name suffix of a MVStore file.static final String
The file name suffix of a new MVStore file, used when compacting a store.static final String
The file name suffix of a temporary MVStore file, used when compacting a store.static final String
The file name suffix of a H2 version 1.1 database file.static final String
The file name suffix of temporary files.static final String
The file name suffix of trace files.static final int
The TCP protocol version number 17.static final int
The TCP protocol version number 18.static final int
The TCP protocol version number 19.static final int
The TCP protocol version number 20.static final int
The TCP protocol version number 21.static final int
Maximum supported version of TCP protocol.static final int
Minimum supported version of TCP protocol.static final int
How often we check to see if we need to apply a throttling delay if SET THROTTLE has been used.static final int
SNAPSHOT isolation level of transaction.static final String
The database URL format in simplified Backus-Naur form.static final String
The package name of user defined classes.static final String
The version of this product, consisting of major version, minor version, and build id.static final int
The major version of this database.static final int
The minor version of this database.static final int
The maximum time in milliseconds to keep the cost of a view.static final int
The name of the index cache that is used for temporary view (subqueries used as tables). -
Method Summary
-
Field Details
-
BUILD_DATE
The build date is updated for each public release.- See Also:
-
BUILD_ID
public static final int BUILD_IDSequential version number. Even numbers are used for official releases, odd numbers are used for development builds.- See Also:
-
BUILD_SNAPSHOT
public static final boolean BUILD_SNAPSHOTWhether this is a snapshot version.- See Also:
-
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_17The TCP protocol version number 17.- Since:
- 1.4.197 (2018-03-18)
- See Also:
-
TCP_PROTOCOL_VERSION_18
public static final int TCP_PROTOCOL_VERSION_18The TCP protocol version number 18.- Since:
- 1.4.198 (2019-02-22)
- See Also:
-
TCP_PROTOCOL_VERSION_19
public static final int TCP_PROTOCOL_VERSION_19The TCP protocol version number 19.- Since:
- 1.4.200 (2019-10-14)
- See Also:
-
TCP_PROTOCOL_VERSION_20
public static final int TCP_PROTOCOL_VERSION_20The TCP protocol version number 20.- Since:
- 2.0.202 (2021-11-25)
- See Also:
-
TCP_PROTOCOL_VERSION_21
public static final int TCP_PROTOCOL_VERSION_21The TCP protocol version number 21.- Since:
- 2.3.230 (TODO)
- See Also:
-
TCP_PROTOCOL_VERSION_MIN_SUPPORTED
public static final int TCP_PROTOCOL_VERSION_MIN_SUPPORTEDMinimum supported version of TCP protocol.- See Also:
-
TCP_PROTOCOL_VERSION_MAX_SUPPORTED
public static final int TCP_PROTOCOL_VERSION_MAX_SUPPORTEDMaximum supported version of TCP protocol.- See Also:
-
VERSION_MAJOR
public static final int VERSION_MAJORThe major version of this database.- See Also:
-
VERSION_MINOR
public static final int VERSION_MINORThe minor version of this database.- See Also:
-
LOCK_MODE_OFF
public static final int LOCK_MODE_OFFThe lock mode that means no locking is used at all.- See Also:
-
LOCK_MODE_READ_COMMITTED
public static final int LOCK_MODE_READ_COMMITTEDThe lock mode that means read locks are acquired, but they are released immediately after the statement is executed.- See Also:
-
LOCK_MODE_TABLE
public static final int LOCK_MODE_TABLEThe lock mode that means table level locking is used for reads and writes.- See Also:
-
LOCK_MODE_TABLE_GC
public static final int LOCK_MODE_TABLE_GCThe 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:
-
ALLOW_LITERALS_ALL
public static final int ALLOW_LITERALS_ALLConstant meaning both numbers and text is allowed in SQL statements.- See Also:
-
ALLOW_LITERALS_NONE
public static final int ALLOW_LITERALS_NONEConstant meaning no literals are allowed in SQL statements.- See Also:
-
ALLOW_LITERALS_NUMBERS
public static final int ALLOW_LITERALS_NUMBERSConstant meaning only numbers are allowed in SQL statements (but no texts).- See Also:
-
TRANSACTION_SNAPSHOT
public static final int TRANSACTION_SNAPSHOTSNAPSHOT isolation level of transaction.- See Also:
-
BLOB_SEARCH
public static final boolean BLOB_SEARCHWhether searching in Blob values should be supported.- See Also:
-
CACHE_MIN_RECORDS
public static final int CACHE_MIN_RECORDSThe minimum number of entries to keep in the cache.- See Also:
-
CACHE_TYPE_DEFAULT
The default cache type.- See Also:
-
CLUSTERING_DISABLED
The value of the cluster setting if clustering is disabled.- See Also:
-
CLUSTERING_ENABLED
The value of the cluster setting if clustering is enabled (the actual value is checked later).- See Also:
-
CONN_URL_COLUMNLIST
The database URL used when calling a function if only the column list should be returned.- See Also:
-
CONN_URL_INTERNAL
The database URL used when calling a function if the data should be returned.- See Also:
-
COST_ROW_OFFSET
public static final int COST_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)- See Also:
-
DEADLOCK_CHECK
public static final int DEADLOCK_CHECKThe number of milliseconds after which to check for a deadlock if locking is not successful.- See Also:
-
DEFAULT_HTTP_PORT
public static final int DEFAULT_HTTP_PORTThe 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:
-
DEFAULT_LOCK_MODE
public static final int DEFAULT_LOCK_MODEThe default value for the LOCK_MODE setting.- See Also:
-
DEFAULT_MAX_LENGTH_INPLACE_LOB
public static final int DEFAULT_MAX_LENGTH_INPLACE_LOBThe default maximum length of an LOB that is stored with the record itself, and not in a separate place.- See Also:
-
DEFAULT_MAX_OPERATION_MEMORY
public static final int DEFAULT_MAX_OPERATION_MEMORYThe default for the setting MAX_OPERATION_MEMORY.- See Also:
-
DEFAULT_PAGE_SIZE
public static final int DEFAULT_PAGE_SIZEThe default page size to use for new databases.- See Also:
-
DEFAULT_RESULT_SET_CONCURRENCY
public static final int DEFAULT_RESULT_SET_CONCURRENCYThe default result set concurrency for statements created with Connection.createStatement() or prepareStatement(String sql).- See Also:
-
DEFAULT_TCP_PORT
public static final int DEFAULT_TCP_PORTThe default port of the TCP server. This port is also used in the documentation and in the Server javadoc.- See Also:
-
DEFAULT_WRITE_DELAY
public static final int DEFAULT_WRITE_DELAYThe default delay in milliseconds before the transaction log is written.- See Also:
-
ENCRYPTION_KEY_HASH_ITERATIONS
public static final int ENCRYPTION_KEY_HASH_ITERATIONSThe password is hashed this many times to slow down dictionary attacks.- See Also:
-
FILE_BLOCK_SIZE
public static final int FILE_BLOCK_SIZEThe block of a file. It is also the encryption block size.- See Also:
-
INITIAL_LOCK_TIMEOUT
public static final int INITIAL_LOCK_TIMEOUTFor testing, the lock timeout is smaller than for interactive use cases. This value could be increased to about 5 or 10 seconds.- See Also:
-
IO_BUFFER_SIZE
public static final int IO_BUFFER_SIZEThe block size for I/O operations.- See Also:
-
IO_BUFFER_SIZE_COMPRESS
public static final int IO_BUFFER_SIZE_COMPRESSThe block size used to compress data in the LZFOutputStream.- See Also:
-
LOCK_SLEEP
public static final int LOCK_SLEEPThe number of milliseconds to wait between checking the .lock.db file still exists once a database is locked.- See Also:
-
MAX_IDENTIFIER_LENGTH
public static final int MAX_IDENTIFIER_LENGTHThe maximum allowed length of identifiers.- See Also:
-
MAX_COLUMNS
public static final int MAX_COLUMNSThe maximum number of columns in a table, select statement or row value.- See Also:
-
MAX_STRING_LENGTH
public static final int MAX_STRING_LENGTHThe maximum allowed length for character string, binary string, and other data types based on them; excluding LOB data types.This needs to be less than (2^31-8)/2 to avoid running into the limit on encoding data fields when storing rows.
- See Also:
-
MAX_NUMERIC_PRECISION
public static final int MAX_NUMERIC_PRECISIONThe maximum allowed precision of numeric data types.- See Also:
-
MAX_ARRAY_CARDINALITY
public static final int MAX_ARRAY_CARDINALITYThe maximum allowed cardinality of array.- See Also:
-
MAX_PARAMETER_INDEX
public static final int MAX_PARAMETER_INDEXThe highest possible parameter index.- See Also:
-
MEMORY_OBJECT
public static final int MEMORY_OBJECTThe memory needed by a regular object with at least one field.- See Also:
-
MEMORY_ARRAY
public static final int MEMORY_ARRAYThe memory needed by an array.- See Also:
-
MEMORY_POINTER
public static final int MEMORY_POINTERThe memory needed by a pointer.- See Also:
-
MEMORY_ROW
public static final int MEMORY_ROWThe memory needed by a Row.- See Also:
-
PREFIX_INDEX
The name prefix used for indexes that are not explicitly named.- See Also:
-
PREFIX_JOIN
The name prefix used for synthetic nested join tables.- See Also:
-
PREFIX_PRIMARY_KEY
The name prefix used for primary key constraints that are not explicitly named.- See Also:
-
PREFIX_QUERY_ALIAS
The name prefix used for query aliases that are not explicitly named.- See Also:
-
PUBLIC_ROLE_NAME
Every user belongs to this role.- See Also:
-
SALT_LEN
public static final int SALT_LENThe number of bytes in random salt that is used to hash passwords.- See Also:
-
INFORMATION_SCHEMA_ID
public static final int INFORMATION_SCHEMA_IDThe identity of INFORMATION_SCHEMA.- See Also:
-
MAIN_SCHEMA_ID
public static final int MAIN_SCHEMA_IDThe identity of PUBLIC schema.- See Also:
-
SCHEMA_MAIN
The name of the default schema.- See Also:
-
PG_CATALOG_SCHEMA_ID
public static final int PG_CATALOG_SCHEMA_IDThe identity of pg_catalog schema.- See Also:
-
SCHEMA_PG_CATALOG
The name of the pg_catalog schema.- See Also:
-
SELECTIVITY_DEFAULT
public static final int SELECTIVITY_DEFAULTThe default selectivity (used if the selectivity is not calculated).- See Also:
-
SELECTIVITY_DISTINCT_COUNT
public static final int SELECTIVITY_DISTINCT_COUNTThe number of distinct values to keep in memory when running ANALYZE.- See Also:
-
SERVER_PROPERTIES_DIR
The default directory name of the server properties file for the H2 Console.- See Also:
-
SERVER_PROPERTIES_NAME
The name of the server properties file for the H2 Console.- See Also:
-
SLOW_QUERY_LIMIT_MS
public static final long SLOW_QUERY_LIMIT_MSQueries that take longer than this number of milliseconds are written to the trace file with the level info.- See Also:
-
START_URL
The database URL prefix of this database.- See Also:
-
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:
-
SUFFIX_OLD_DATABASE_FILE
The file name suffix of a H2 version 1.1 database file.- See Also:
-
SUFFIX_MV_FILE
The file name suffix of a MVStore file.- See Also:
-
SUFFIX_MV_STORE_NEW_FILE
The file name suffix of a new MVStore file, used when compacting a store.- See Also:
-
SUFFIX_MV_STORE_TEMP_FILE
The file name suffix of a temporary MVStore file, used when compacting a store.- See Also:
-
SUFFIX_TEMP_FILE
The file name suffix of temporary files.- See Also:
-
SUFFIX_TRACE_FILE
The file name suffix of trace files.- See Also:
-
THROTTLE_DELAY
public static final int THROTTLE_DELAYHow often we check to see if we need to apply a throttling delay if SET THROTTLE has been used.- See Also:
-
URL_FORMAT
The database URL format in simplified Backus-Naur form.- See Also:
-
USER_PACKAGE
The package name of user defined classes.- See Also:
-
VIEW_COST_CACHE_MAX_AGE
public static final int VIEW_COST_CACHE_MAX_AGEThe maximum time in milliseconds to keep the cost of a view. 10000 means 10 seconds.- See Also:
-
VIEW_INDEX_CACHE_SIZE
public static final int VIEW_INDEX_CACHE_SIZEThe name of the index cache that is used for temporary view (subqueries used as tables).- See Also:
-
QUERY_STATISTICS_MAX_ENTRIES
public static final int QUERY_STATISTICS_MAX_ENTRIESThe maximum number of entries in query statistics.- See Also:
-
MIN_WEB_ADMIN_PASSWORD_LENGTH
public static final int MIN_WEB_ADMIN_PASSWORD_LENGTHThe minimum number of characters in web admin password.- See Also:
-
PG_VERSION
Announced version for PgServer.- See Also:
-
VERSION
The version of this product, consisting of major version, minor version, and build id. -
FULL_VERSION
The complete version number of this database, consisting of the major version, the minor version, the build id, and the build date.
-