# Constants Constants are fixed values that are used in the whole database code.
Methods
static String | getFullVersion() Get the complete version number of this database, consisting of the major version, the minor version, the build id, and the build date.
static String | getFullVersion() Get the complete version number of this database, consisting of the major version, the minor version, the build id, and the build date. Returns: the complete version
static String | getVersion() Get the version of this product, consisting of major version, minor version, and build id.
static String | getVersion() Get the version of this product, consisting of major version, minor version, and build id. Returns: the version number
static Object | getVersionStable() Get the last stable version name.
static Object | getVersionStable() Get the last stable version name. Returns: the version number
Fields
static int | ALLOW_LITERALS_ALL = 2
static int | ALLOW_LITERALS_NONE = 0
static int | ALLOW_LITERALS_NUMBERS = 1
static boolean | BLOB_SEARCH = false
static String | BUILD_DATE = "2017-03-10"
static String | BUILD_DATE_STABLE = "2016-10-31"
static int | BUILD_ID = 194
static int | BUILD_ID_STABLE = 193
static boolean | BUILD_SNAPSHOT = false
static String | BUILD_VENDOR_AND_VERSION
static int | CACHE_MIN_RECORDS = 16
static int | CACHE_SIZE_DEFAULT = 65536
static String | CACHE_TYPE_DEFAULT = "LRU"
static String | CLUSTERING_DISABLED = "\'\'"
static String | CLUSTERING_ENABLED = "TRUE"
static String | CONN_URL_COLUMNLIST = "jdbc:columnlist:connection"
static String | CONN_URL_INTERNAL = "jdbc:default:connection"
static int | COST_ROW_OFFSET = 1000
static int | DEADLOCK_CHECK = 100
static int | DEFAULT_HTTP_PORT = 8082
static int | DEFAULT_LOCK_MODE = 3
static int | DEFAULT_MAX_LENGTH_INPLACE_LOB = 256
static long | DEFAULT_MAX_LOG_SIZE = 16777216L
static int | DEFAULT_MAX_MEMORY_UNDO = 50000
static int | DEFAULT_MAX_OPERATION_MEMORY = 100000
static int | DEFAULT_PAGE_SIZE = 4096
static int | DEFAULT_RESULT_SET_CONCURRENCY = 1007
static int | DEFAULT_TCP_PORT = 9092
static int | DEFAULT_WRITE_DELAY = 500
static int | ENCRYPTION_KEY_HASH_ITERATIONS = 1024
static int | FILE_BLOCK_SIZE = 16
static int | INITIAL_LOCK_TIMEOUT = 2000
static int | IO_BUFFER_SIZE = 4096
static int | IO_BUFFER_SIZE_COMPRESS = 131072
static int | LOCK_MODE_OFF = 0
static int | LOCK_MODE_READ_COMMITTED = 3
static int | LOCK_MODE_TABLE = 1
static int | LOCK_MODE_TABLE_GC = 2
static int | LOCK_SLEEP = 1000
static int | MAX_PARAMETER_INDEX = 100000
static int | MEMORY_DATA = 24
static int | MEMORY_FACTOR = 64
static int | MEMORY_OBJECT = 24
static int | MEMORY_PAGE_BTREE = 184
static int | MEMORY_PAGE_DATA = 240
static int | MEMORY_PAGE_DATA_OVERFLOW = 120
static int | MEMORY_POINTER = 8
static int | MEMORY_ROW = 40
static int | MIN_WRITE_DELAY = 5
static String | PREFIX_INDEX = "INDEX_"
static String | PREFIX_JOIN = "SYSTEM_JOIN_"
static String | PREFIX_PRIMARY_KEY = "PRIMARY_KEY_"
static String | PUBLIC_ROLE_NAME = "PUBLIC"
static int | QUERY_STATISTICS_MAX_ENTRIES = 100
static int | SALT_LEN = 8
static String | SCHEMA_MAIN = "PUBLIC"
static int | SELECTIVITY_DEFAULT = 50
static int | SELECTIVITY_DISTINCT_COUNT = 10000
static String | SERVER_PROPERTIES_DIR = "~"
static String | SERVER_PROPERTIES_NAME = ".h2.server.properties"
static long | SLOW_QUERY_LIMIT_MS = 100L
static String | START_URL = "jdbc:h2:"
static String | SUFFIX_DB_FILE = ".db"
static String | SUFFIX_LOBS_DIRECTORY = ".lobs.db"
static String | SUFFIX_LOB_FILE = ".lob.db"
static String | SUFFIX_LOCK_FILE = ".lock.db"
static String | SUFFIX_MV_FILE = ".mv.db"
static String | SUFFIX_MV_STORE_NEW_FILE = ".newFile"
static String | SUFFIX_MV_STORE_TEMP_FILE = ".tempFile"
static String | SUFFIX_OLD_DATABASE_FILE = ".data.db"
static String | SUFFIX_PAGE_FILE = ".h2.db"
static String | SUFFIX_TEMP_FILE = ".temp.db"
static String | SUFFIX_TRACE_FILE = ".trace.db"
static int | TCP_PROTOCOL_VERSION_10 = 10
static int | TCP_PROTOCOL_VERSION_11 = 11
static int | TCP_PROTOCOL_VERSION_12 = 12
static int | TCP_PROTOCOL_VERSION_13 = 13
static int | TCP_PROTOCOL_VERSION_14 = 14
static int | TCP_PROTOCOL_VERSION_15 = 15
static int | TCP_PROTOCOL_VERSION_16 = 16
static int | TCP_PROTOCOL_VERSION_6 = 6
static int | TCP_PROTOCOL_VERSION_7 = 7
static int | TCP_PROTOCOL_VERSION_8 = 8
static int | TCP_PROTOCOL_VERSION_9 = 9
static int | THROTTLE_DELAY = 50
static int | UNDO_BLOCK_SIZE = 1048576
static String | URL_FORMAT = "jdbc:h2:{ {.|mem:}[name] | [file:]fileName | {tcp|ssl}:[//]server[:port][,server2[:port]]/name }[;key=value...]"
static String | USER_PACKAGE = "org.h2.dynamic"
static Charset | UTF8
static int | VERSION_MAJOR = 1
static int | VERSION_MINOR = 4
static int | VIEW_COST_CACHE_MAX_AGE = 10000
static int | VIEW_INDEX_CACHE_SIZE = 64
#### SUFFIX_OLD_DATABASE_FILE = ".data.db" The file name suffix of a H2 version 1.1 database file. #### SUFFIX_DB_FILE = ".db" The file name suffix of all database files. #### SUFFIX_PAGE_FILE = ".h2.db" The file name suffix of page files. #### SERVER_PROPERTIES_NAME = ".h2.server.properties" The name of the server properties file for the H2 Console. #### SUFFIX_LOB_FILE = ".lob.db" The file name suffix of large object files. #### SUFFIX_LOBS_DIRECTORY = ".lobs.db" The suffix of the directory name used if LOB objects are stored in a directory. #### 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. #### BUILD_DATE_STABLE = "2016-10-31" The build date of the last stable release. #### BUILD_DATE = "2017-03-10" The build date is updated for each public release. #### PREFIX_INDEX = "INDEX_" The name prefix used for indexes that are not explicitly named. #### CACHE_TYPE_DEFAULT = "LRU" The default cache type. #### 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_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. #### ALLOW_LITERALS_NONE = 0 Constant meaning no literals are allowed in SQL statements. #### LOCK_MODE_OFF = 0 The lock mode that means no locking is used at all. #### ALLOW_LITERALS_NUMBERS = 1 Constant meaning only numbers are allowed in SQL statements (but no texts). #### LOCK_MODE_TABLE = 1 The lock mode that means table level locking is used for reads and writes. #### VERSION_MAJOR = 1 The major version of this database. #### TCP_PROTOCOL_VERSION_10 = 10 The TCP protocol version number 10. #### DEADLOCK_CHECK = 100 The number of milliseconds after which to check for a deadlock if locking is not successful. #### QUERY_STATISTICS_MAX_ENTRIES = 100 The maximum number of entries in query statistics. #### COST_ROW_OFFSET = 1000 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) #### LOCK_SLEEP = 1000 The number of milliseconds to wait between checking the .lock.db file still exists once a database is locked. #### SELECTIVITY_DISTINCT_COUNT = 10000 The number of distinct values to keep in memory when running ANALYZE. #### VIEW_COST_CACHE_MAX_AGE = 10000 The maximum time in milliseconds to keep the cost of a view. 10000 means 10 seconds. #### DEFAULT_MAX_OPERATION_MEMORY = 100000 The default for the setting MAX_OPERATION_MEMORY. #### MAX_PARAMETER_INDEX = 100000 The highest possible parameter index. #### DEFAULT_RESULT_SET_CONCURRENCY = 1007 The default result set concurrency for statements created with Connection.createStatement() or prepareStatement(String sql). #### SLOW_QUERY_LIMIT_MS = 100L Queries that take longer than this number of milliseconds are written to the trace file with the level info. #### ENCRYPTION_KEY_HASH_ITERATIONS = 1024 The password is hashed this many times to slow down dictionary attacks. #### UNDO_BLOCK_SIZE = 1048576 The maximum size of an undo log block. #### TCP_PROTOCOL_VERSION_11 = 11 The TCP protocol version number 11. #### TCP_PROTOCOL_VERSION_12 = 12 The TCP protocol version number 12. #### MEMORY_PAGE_DATA_OVERFLOW = 120 The memory needed by an object of class PageDataOverflow. #### TCP_PROTOCOL_VERSION_13 = 13 The TCP protocol version number 13. #### IO_BUFFER_SIZE_COMPRESS = 131072 The block size used to compress data in the LZFOutputStream. #### TCP_PROTOCOL_VERSION_14 = 14 The TCP protocol version number 14. #### TCP_PROTOCOL_VERSION_15 = 15 The TCP protocol version number 15. #### CACHE_MIN_RECORDS = 16 The minimum number of entries to keep in the cache. #### FILE_BLOCK_SIZE = 16 The block of a file. It is also the encryption block size. #### TCP_PROTOCOL_VERSION_16 = 16 The TCP protocol version number 16. #### DEFAULT_MAX_LOG_SIZE = 16777216L The default value for the maximum transaction log size. #### MEMORY_PAGE_BTREE = 184 The memory needed by an object of class PageBtree. #### BUILD_ID_STABLE = 193 The build id of the last stable release. #### BUILD_ID = 194 The build id is incremented for each public release. #### ALLOW_LITERALS_ALL = 2 Constant meaning both numbers and text is allowed in SQL statements. #### LOCK_MODE_TABLE_GC = 2 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. #### INITIAL_LOCK_TIMEOUT = 2000 For testing, the lock timeout is smaller than for interactive use cases. This value could be increased to about 5 or 10 seconds. #### MEMORY_DATA = 24 The memory needed by a object of class Data #### MEMORY_OBJECT = 24 The memory needed by a regular object with at least one field. #### MEMORY_PAGE_DATA = 240 The memory needed by an object of class PageData. #### DEFAULT_MAX_LENGTH_INPLACE_LOB = 256 The default maximum length of an LOB that is stored with the record itself, and not in a separate place. #### DEFAULT_LOCK_MODE = 3 The default value for the LOCK_MODE setting. #### LOCK_MODE_READ_COMMITTED = 3 The lock mode that means read locks are acquired, but they are released immediately after the statement is executed. #### VERSION_MINOR = 4 The minor version of this database. #### MEMORY_ROW = 40 The memory needed by a Row. #### DEFAULT_PAGE_SIZE = 4096 The default page size to use for new databases. #### IO_BUFFER_SIZE = 4096 The block size for I/O operations. #### MIN_WRITE_DELAY = 5 The minimum write delay that causes commits to be delayed. #### SELECTIVITY_DEFAULT = 50 The default selectivity (used if the selectivity is not calculated). #### THROTTLE_DELAY = 50 The delay that is to be used if throttle has been enabled. #### DEFAULT_WRITE_DELAY = 500 The default delay in milliseconds before the transaction log is written. #### DEFAULT_MAX_MEMORY_UNDO = 50000 The default value for the MAX_MEMORY_UNDO setting. #### TCP_PROTOCOL_VERSION_6 = 6 The TCP protocol version number 6. #### MEMORY_FACTOR = 64 This value is used to calculate the average memory usage. #### VIEW_INDEX_CACHE_SIZE = 64 The name of the index cache that is used for temporary view (subqueries used as tables). #### CACHE_SIZE_DEFAULT = 65536 The default cache size in KB for each GB of RAM. #### TCP_PROTOCOL_VERSION_7 = 7 The TCP protocol version number 7. #### MEMORY_POINTER = 8 The memory needed by a pointer. #### SALT_LEN = 8 The number of bytes in random salt that is used to hash passwords. #### TCP_PROTOCOL_VERSION_8 = 8 The TCP protocol version number 8. #### DEFAULT_HTTP_PORT = 8082 The default port number of the HTTP server (for the H2 Console). This value is also in the documentation and in the Server javadoc. #### TCP_PROTOCOL_VERSION_9 = 9 The TCP protocol version number 9. #### DEFAULT_TCP_PORT = 9092 The default port of the TCP server. This port is also used in the documentation and in the Server javadoc. #### 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 #### UTF8 Name of the character encoding format. #### BLOB_SEARCH = false Whether searching in Blob values should be supported. #### BUILD_SNAPSHOT = false Whether this is a snapshot version.