ConstantsConstants are fixed values that are used in the whole database code.
SUFFIX_OLD_DATABASE_FILE = ".data.db"The file name suffix of a H2 version 1.1 database file.
SERVER_PROPERTIES_NAME = ".h2.server.properties"The name of the server properties file for the H2 Console.
SUFFIX_LOCK_FILE = ".lock.db"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.
SUFFIX_MV_FILE = ".mv.db"The file name suffix of a MVStore file.
SUFFIX_MV_STORE_NEW_FILE = ".newFile"The file name suffix of a new MVStore file, used when compacting a store.
SUFFIX_TEMP_FILE = ".temp.db"The file name suffix of temporary files.
SUFFIX_MV_STORE_TEMP_FILE = ".tempFile"The file name suffix of a temporary MVStore file, used when compacting a
store.
SUFFIX_TRACE_FILE = ".trace.db"The file name suffix of trace files.
VERSION_STABLE = "2.0.204"The last stable version name.
BUILD_DATE_STABLE = "2021-12-21"The build date of the last stable release.
BUILD_DATE = "2022-01-04"The build date is updated for each public release.
PG_VERSION = "8.2.23"Announced version for PgServer.
PREFIX_INDEX = "INDEX_"The name prefix used for indexes that are not explicitly named.
CACHE_TYPE_DEFAULT = "LRU"The default cache type.
SCHEMA_PG_CATALOG = "PG_CATALOG"The name of the pg_catalog schema.
PREFIX_PRIMARY_KEY = "PRIMARY_KEY_"The name prefix used for primary key constraints that are not explicitly
named.
PUBLIC_ROLE_NAME = "PUBLIC"Every user belongs to this role.
SCHEMA_MAIN = "PUBLIC"The name of the default schema.
PREFIX_QUERY_ALIAS = "QUERY_ALIAS_"The name prefix used for query aliases that are not explicitly named.
PREFIX_JOIN = "SYSTEM_JOIN_"The name prefix used for synthetic nested join tables.
CLUSTERING_ENABLED = "TRUE"The value of the cluster setting if clustering is enabled (the actual
value is checked later).
CLUSTERING_DISABLED = "\'\'"The value of the cluster setting if clustering is disabled.
CONN_URL_COLUMNLIST = "jdbc:columnlist:connection"The database URL used when calling a function if only the column list
should be returned.
CONN_URL_INTERNAL = "jdbc:default:connection"The database URL used when calling a function if the data should be
returned.
START_URL = "jdbc:h2:"The database URL prefix of this database.
URL_FORMAT = "jdbc:h2:{ {.|mem:}[name] | [file:]fileName | {tcp|ssl}:[//]server[:port][,server2[:port]]/name }[;key=value...]"The database URL format in simplified Backus-Naur form.
USER_PACKAGE = "org.h2.dynamic"The package name of user defined classes.
SERVER_PROPERTIES_DIR = "~"The default directory name of the server properties file for the H2
Console.
INFORMATION_SCHEMA_ID = -1The identity of INFORMATION_SCHEMA.
PG_CATALOG_SCHEMA_ID = -1000The identity of pg_catalog schema.
ALLOW_LITERALS_NONE = 0Constant meaning no literals are allowed in SQL statements.
LOCK_MODE_OFF = 0The lock mode that means no locking is used at all.
MAIN_SCHEMA_ID = 0The identity of PUBLIC schema.
VERSION_MINOR = 0The minor version of this database.
ALLOW_LITERALS_NUMBERS = 1Constant meaning only numbers are allowed in SQL statements (but no
texts).
LOCK_MODE_TABLE = 1The lock mode that means table level locking is used for reads and
writes.
DEADLOCK_CHECK = 100The number of milliseconds after which to check for a deadlock if locking
is not successful.
QUERY_STATISTICS_MAX_ENTRIES = 100The maximum number of entries in query statistics.
COST_ROW_OFFSET = 1000The 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)
LOCK_SLEEP = 1000The number of milliseconds to wait between checking the .lock.db file
still exists once a database is locked.
SELECTIVITY_DISTINCT_COUNT = 10000The number of distinct values to keep in memory when running ANALYZE.
VIEW_COST_CACHE_MAX_AGE = 10000The maximum time in milliseconds to keep the cost of a view.
10000 means 10 seconds.
DEFAULT_MAX_OPERATION_MEMORY = 100000The default for the setting MAX_OPERATION_MEMORY.
MAX_NUMERIC_PRECISION = 100000The maximum allowed precision of numeric data types.
MAX_PARAMETER_INDEX = 100000The highest possible parameter index.
DEFAULT_RESULT_SET_CONCURRENCY = 1007The default result set concurrency for statements created with
Connection.createStatement() or prepareStatement(String sql).
SLOW_QUERY_LIMIT_MS = 100LQueries that take longer than this number of milliseconds are written to
the trace file with the level info.
ENCRYPTION_KEY_HASH_ITERATIONS = 1024The password is hashed this many times
to slow down dictionary attacks.
MAX_STRING_LENGTH = 1048576The maximum allowed length for character string, binary string, and other
data types based on them; excluding LOB data types.
IO_BUFFER_SIZE_COMPRESS = 131072The block size used to compress data in the LZFOutputStream.
CACHE_MIN_RECORDS = 16The minimum number of entries to keep in the cache.
FILE_BLOCK_SIZE = 16The block of a file. It is also the encryption block size.
MAX_COLUMNS = 16384The maximum number of columns in a table, select statement or row value.
TCP_PROTOCOL_VERSION_17 = 17The TCP protocol version number 17.
TCP_PROTOCOL_VERSION_MIN_SUPPORTED = 17Minimum supported version of TCP protocol.
TCP_PROTOCOL_VERSION_18 = 18The TCP protocol version number 18.
TCP_PROTOCOL_VERSION_19 = 19The TCP protocol version number 19.
ALLOW_LITERALS_ALL = 2Constant meaning both numbers and text is allowed in SQL statements.
LOCK_MODE_TABLE_GC = 2The 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.
VERSION_MAJOR = 2The major version of this database.
TCP_PROTOCOL_VERSION_20 = 20The TCP protocol version number 20.
TCP_PROTOCOL_VERSION_MAX_SUPPORTED = 20Maximum supported version of TCP protocol.
INITIAL_LOCK_TIMEOUT = 2000For testing, the lock timeout is smaller than for interactive use cases.
This value could be increased to about 5 or 10 seconds.
BUILD_ID_STABLE = 204The build id of the last stable release.
BUILD_ID = 206Sequential version number. Even numbers are used for official releases,
odd numbers are used for development builds.
MEMORY_ARRAY = 24The memory needed by an array.
MEMORY_OBJECT = 24The memory needed by a regular object with at least one field.
DEFAULT_MAX_LENGTH_INPLACE_LOB = 256The default maximum length of an LOB that is stored with the record
itself, and not in a separate place.
MAX_IDENTIFIER_LENGTH = 256The maximum allowed length of identifiers.
DEFAULT_LOCK_MODE = 3The default value for the LOCK_MODE setting.
LOCK_MODE_READ_COMMITTED = 3The lock mode that means read locks are acquired, but they are released
immediately after the statement is executed.
MEMORY_ROW = 40The memory needed by a Row.
DEFAULT_PAGE_SIZE = 4096The default page size to use for new databases.
IO_BUFFER_SIZE = 4096The block size for I/O operations.
SELECTIVITY_DEFAULT = 50The default selectivity (used if the selectivity is not calculated).
THROTTLE_DELAY = 50How often we check to see if we need to apply a throttling delay if SET
THROTTLE has been used.
DEFAULT_WRITE_DELAY = 500The default delay in milliseconds before the transaction log is written.
TRANSACTION_SNAPSHOT = 6SNAPSHOT isolation level of transaction.
VIEW_INDEX_CACHE_SIZE = 64The name of the index cache that is used for temporary view (subqueries
used as tables).
MAX_ARRAY_CARDINALITY = 65536The maximum allowed cardinality of array.
MEMORY_POINTER = 8The memory needed by a pointer.
SALT_LEN = 8The number of bytes in random salt that is used to hash passwords.
DEFAULT_HTTP_PORT = 8082The default port number of the HTTP server (for the H2 Console).
This value is also in the documentation and in the Server javadoc.
DEFAULT_TCP_PORT = 9092The default port of the TCP server.
This port is also used in the documentation and in the Server javadoc.
BUILD_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).
Additionally, a version number should be set to distinguish releases.
Example: ACME_SVN1651_BUILD3
FULL_VERSIONThe complete version number of this database, consisting of
the major version, the minor version, the build id, and the build date.
VERSIONThe version of this product, consisting of major version, minor
version, and build id.
BLOB_SEARCH = falseWhether searching in Blob values should be supported.
BUILD_SNAPSHOT = falseWhether this is a snapshot version.
|