org.h2.engine
Class Constants

java.lang.Object
  extended by org.h2.engine.Constants

public class Constants
extends java.lang.Object

Constants are fixed values that are used in the whole database code.


Field Summary
static boolean ALLOW_EMPTY_BTREE_PAGES
          If empty b-tree pages are allowed.
static int ALLOW_LITERALS_ALL
          Constant meaning both numbers and text is allowed in SQL statements.
static int ALLOW_LITERALS_NONE
          Constant meaning no literals are allowed in SQL statements.
static int ALLOW_LITERALS_NUMBERS
          Constant meaning only numbers are allowed in SQL statements (but no texts).
static boolean AUTO_CONVERT_LOB_TO_FILES
          Automatically convert large LOB objects to files even if they have been set using setBytes.
static int BIG_DECIMAL_SCALE_MAX
          The maximum scale of a BigDecimal value.
static boolean BLOB_SEARCH
          Whether searching in Blob values should be supported.
static java.lang.String BUILD_DATE
          The build date is updated for each public release.
static java.lang.String BUILD_DATE_STABLE
          The build date is updated for each public release.
static int BUILD_ID
          The build id is incremented for each public release.
static int BUILD_ID_STABLE
          The build id of the last stable release.
static int CACHE_MIN_RECORDS
          The minimum number of entries to keep in the cache.
static java.lang.String CHARACTER_SET_NAME
          The name of the character set used in this database.
static java.lang.String CLUSTERING_DISABLED
          The value of the cluster setting if clustering is disabled.
static java.lang.String CONN_URL_COLUMNLIST
          The database URL used when calling a function if only the column list should be returned.
static java.lang.String CONN_URL_INTERNAL
          The database URL used when calling a function if the data should be returned.
static 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)
static java.lang.String DBA_NAME
          The default name of the system user.
static int DEADLOCK_CHECK
          The number of milliseconds after which to check for a deadlock if locking is not successful.
static int DEFAULT_ALLOW_LITERALS
          The default value of the ALLOW_LITERALS setting
static int DEFAULT_DATA_PAGE_SIZE
          The default data page size.
static boolean DEFAULT_HTTP_ALLOW_OTHERS
          If the HTTP server should allow connections from other computers by default.
static int DEFAULT_HTTP_PORT
          The default port number of the HTTP server (for the H2 Console).
static boolean DEFAULT_HTTP_SSL
          The default SSL setting for the HTTP server.
static int DEFAULT_MAX_LENGTH_CLIENTSIDE_LOB
          The default maximum length on an in-memory LOB object.
static long DEFAULT_MAX_LOG_SIZE
          The default value for the maximum log file size.
static int DEFAULT_MAX_MEMORY_ROWS
          The default maximum number of rows to be kept in memory in a result set.
static int DEFAULT_SERVER_PORT
          The default port of the TCP server.
static int DEFAULT_TABLE_TYPE
          The default table type when creating new tables.
static int DEFAULT_WRITE_DELAY
          The default delay in milliseconds before the log file is written.
static java.lang.String DRIVER_NAME
          The name of the JDBC driver.
static int ENCRYPTION_KEY_HASH_ITERATIONS
          The password is hashed this many times to slow down dictionary attacks.
static int FILE_BLOCK_SIZE
          The 'word size' of a file (the minimum allocation size).
static int FILE_MAX_INCREMENT
          The maximum number of bytes a file should be expanded in one step.
static int FILE_MIN_SIZE
          The minimum file size in bytes.
static int FILE_PAGE_SIZE
          The page size of a file.
static long FLUSH_INDEX_DELAY
          The default delay to flush indexes.
static int INITIAL_LOCK_TIMEOUT
          For testing, the lock timeout is smaller than for interactive use cases.
static int IO_BUFFER_SIZE
          The block size for I/O operations.
static int IO_BUFFER_SIZE_COMPRESS
          The block size used to compress data in the LZFOutputStream.
static int LOCK_MODE_OFF
          The lock mode that means no locking is used at all.
static int LOCK_MODE_READ_COMMITTED
          The lock mode that means read locks are acquired, but they are released immediately after the statement is executed.
static int LOCK_MODE_TABLE
          The lock mode that means table level locking is used for reads and writes.
static int LOCK_MODE_TABLE_GC
          The lock mode that means table level locking is used for reads and writes.
static int LOCK_SLEEP
          The number of milliseconds to wait between checking the .lock.db file still exists once a database is locked.
static java.lang.String MAGIC_FILE_HEADER
          The file header used for binary files.
static boolean MAGIC_FILE_HEADER_SUPPORT_TEXT
          If old text file headers should be supported.
static java.lang.String MANAGEMENT_DB_PREFIX
          The name of the in-memory management database used by the TCP server to keep the active sessions.
static java.lang.String MANAGEMENT_DB_USER
          The user name of the management database.
static int MAX_PARAMETER_INDEX
          The highest possible parameter index.
static java.lang.String PREFIX_INDEX
          The name prefix used for indexes that are not explicitly named.
static java.lang.String PREFIX_PRIMARY_KEY
          The name prefix used for primary key constraints that are not explicitly named.
static java.lang.String PRODUCT_NAME
          The product name.
static java.lang.String PUBLIC_ROLE_NAME
          Every user belongs to this role.
static int SALT_LEN
          The number of bytes in random salt that is used to hash passwords.
static java.lang.String SCHEMA_INFORMATION
          The name of the schema that contains the information schema tables.
static java.lang.String SCHEMA_MAIN
          The name of the default schema.
static java.lang.String SCRIPT_SQL
          The default name of the script file if .zip compression is used.
static int SELECTIVITY_ANALYZE_SAMPLE_ROWS
          The default sample size for the ANALYZE statement.
static int SELECTIVITY_DEFAULT
          The default selectivity (used if the selectivity is not calculated).
static int SELECTIVITY_DISTINCT_COUNT
          The number of distinct values to keep in memory when running ANALYZE.
static java.lang.String SERVER_PROPERTIES_FILE
          The name of the server properties file.
static java.lang.String SERVER_PROPERTIES_TITLE
          The title of the server properties file.
static long SLOW_QUERY_LIMIT_MS
          Queries that take longer than this number of milliseconds are written to the trace file with the level info.
static java.lang.String START_URL
          The database URL prefix of this database.
static java.lang.String SUFFIX_DATA_FILE
          The file name suffix of data files.
static java.lang.String SUFFIX_DB_FILE
          The file name suffix of all database files.
static java.lang.String SUFFIX_INDEX_FILE
          The file name suffix of index files.
static java.lang.String SUFFIX_LOB_FILE
          The file name suffix of large object files.
static java.lang.String SUFFIX_LOBS_DIRECTORY
          The suffix of the directory name used if LOB objects are stored in a directory.
static 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.
static java.lang.String SUFFIX_LOG_FILE
          The file name suffix of transaction log files.
static java.lang.String SUFFIX_PAGE_FILE
          The file name suffix of page files.
static java.lang.String SUFFIX_TEMP_FILE
          The file name suffix of temporary files.
static java.lang.String SUFFIX_TRACE_FILE
          The file name suffix of trace files.
static int TCP_PROTOCOL_VERSION_5
          The TCP protocol version number 5.
static int TCP_PROTOCOL_VERSION_6
          The TCP protocol version number 6.
static java.lang.String TEMP_TABLE_PREFIX
          The table name suffix used to create internal temporary tables.
static int THROTTLE_DELAY
          The delay that is to be used if throttle has been enabled.
static java.lang.String URL_FORMAT
          The database URL format in simplified Backus-Naur form.
static java.lang.String UTF8
          Name of the character encoding format.
static double VERSION
          The version number (major.minor) of this product.
static int VERSION_JDBC_MAJOR
          The major version number of the supported JDBC API.
static int VERSION_JDBC_MINOR
          The minor version number of the supported JDBC API.
static int VERSION_MAJOR
          The major version of this product.
static int VERSION_MINOR
          The minor version of this product.
static int VIEW_COST_CACHE_MAX_AGE
          The maximum time in milliseconds to keep the cost of a view.
static int VIEW_INDEX_CACHE_SIZE
          The name of the index cache that is used for temporary view (subqueries used as tables).
 
Method Summary
static java.lang.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 java.lang.String getVersion()
          Get the version of this product, consisting of major version, minor version, and build id.
static java.lang.Object getVersionStable()
          Get the last stable version name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BUILD_ID

public static final int BUILD_ID
The build id is incremented for each public release.

See Also:
Constant Field Values

BUILD_ID_STABLE

public static final int BUILD_ID_STABLE
The build id of the last stable release.

See Also:
Constant Field Values

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_DATE_STABLE

public static final java.lang.String BUILD_DATE_STABLE
The build date is updated for each public release.

See Also:
Constant Field Values

TCP_PROTOCOL_VERSION_5

public static final int TCP_PROTOCOL_VERSION_5
The TCP protocol version number 5. This protocol is used by the TCP server and remote JDBC client.

See Also:
Constant Field Values

TCP_PROTOCOL_VERSION_6

public static final int TCP_PROTOCOL_VERSION_6
The TCP protocol version number 6. This protocol is used by the TCP server and remote JDBC client.

See Also:
Constant Field Values

VERSION_MAJOR

public static final int VERSION_MAJOR
The major version of this product.

See Also:
Constant Field Values

VERSION_MINOR

public static final int VERSION_MINOR
The minor version of this product.

See Also:
Constant Field Values

VERSION

public static final double VERSION
The version number (major.minor) of this product.

See Also:
Constant Field Values

ALLOW_EMPTY_BTREE_PAGES

public static final boolean ALLOW_EMPTY_BTREE_PAGES
If empty b-tree pages are allowed. This is supported for backward compatibility.

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

AUTO_CONVERT_LOB_TO_FILES

public static final boolean AUTO_CONVERT_LOB_TO_FILES
Automatically convert large LOB objects to files even if they have been set using setBytes.

See Also:
Constant Field Values

BIG_DECIMAL_SCALE_MAX

public static final int BIG_DECIMAL_SCALE_MAX
The maximum scale of a BigDecimal value.

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

CHARACTER_SET_NAME

public static final java.lang.String CHARACTER_SET_NAME
The name of the character set used in this database.

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

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

DBA_NAME

public static final java.lang.String DBA_NAME
The default name of the system user. This name is only used as long as there is no administrator user registered.

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_ALLOW_LITERALS

public static final int DEFAULT_ALLOW_LITERALS
The default value of the ALLOW_LITERALS setting

See Also:
Constant Field Values

DEFAULT_DATA_PAGE_SIZE

public static final int DEFAULT_DATA_PAGE_SIZE
The default data page size.

See Also:
Constant Field Values

DEFAULT_HTTP_ALLOW_OTHERS

public static final boolean DEFAULT_HTTP_ALLOW_OTHERS
If the HTTP server should allow connections from other computers by default.

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_HTTP_SSL

public static final boolean DEFAULT_HTTP_SSL
The default SSL setting for the HTTP server.

See Also:
Constant Field Values

DEFAULT_MAX_LOG_SIZE

public static final long DEFAULT_MAX_LOG_SIZE
The default value for the maximum log file size.

See Also:
Constant Field Values

DEFAULT_MAX_LENGTH_CLIENTSIDE_LOB

public static final int DEFAULT_MAX_LENGTH_CLIENTSIDE_LOB
The default maximum length on an in-memory LOB object. Larger objects will be written to a temporary file.

See Also:
Constant Field Values

DEFAULT_MAX_MEMORY_ROWS

public static final int DEFAULT_MAX_MEMORY_ROWS
The default maximum number of rows to be kept in memory in a result set.

See Also:
Constant Field Values

DEFAULT_SERVER_PORT

public static final int DEFAULT_SERVER_PORT
The default port of the TCP server. This port is also used in the documentation.

See Also:
Constant Field Values

DEFAULT_TABLE_TYPE

public static final int DEFAULT_TABLE_TYPE
The default table type when creating new tables.

See Also:
Constant Field Values

DEFAULT_WRITE_DELAY

public static final int DEFAULT_WRITE_DELAY
The default delay in milliseconds before the log file is written.

See Also:
Constant Field Values

DRIVER_NAME

public static final java.lang.String DRIVER_NAME
The name of the JDBC driver.

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 'word size' of a file (the minimum allocation size).

See Also:
Constant Field Values

FILE_MAX_INCREMENT

public static final int FILE_MAX_INCREMENT
The maximum number of bytes a file should be expanded in one step.

See Also:
Constant Field Values

FILE_MIN_SIZE

public static final int FILE_MIN_SIZE
The minimum file size in bytes.

See Also:
Constant Field Values

FILE_PAGE_SIZE

public static final int FILE_PAGE_SIZE
The page size of a file.

See Also:
Constant Field Values

FLUSH_INDEX_DELAY

public static final long FLUSH_INDEX_DELAY
The default delay to flush indexes. 0 means indexes are not flushed.

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_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

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

MAGIC_FILE_HEADER

public static final java.lang.String MAGIC_FILE_HEADER
The file header used for binary files.


MAGIC_FILE_HEADER_SUPPORT_TEXT

public static final boolean MAGIC_FILE_HEADER_SUPPORT_TEXT
If old text file headers should be supported. This setting can be removed in future versions (required for compatibility with version 1.1.103).

See Also:
Constant Field Values

MANAGEMENT_DB_PREFIX

public static final java.lang.String MANAGEMENT_DB_PREFIX
The name of the in-memory management database used by the TCP server to keep the active sessions.

See Also:
Constant Field Values

MANAGEMENT_DB_USER

public static final java.lang.String MANAGEMENT_DB_USER
The user name of the management database.

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

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

START_URL

public static final java.lang.String START_URL
The database URL prefix of this database.

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_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

PRODUCT_NAME

public static final java.lang.String PRODUCT_NAME
The product name. This value must stay like that, see http://opensource.atlassian.com/projects/hibernate/browse/HHH-2682

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

SCHEMA_INFORMATION

public static final java.lang.String SCHEMA_INFORMATION
The name of the schema that contains the information schema tables.

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

SCRIPT_SQL

public static final java.lang.String SCRIPT_SQL
The default name of the script file if .zip compression is used.

See Also:
Constant Field Values

SELECTIVITY_ANALYZE_SAMPLE_ROWS

public static final int SELECTIVITY_ANALYZE_SAMPLE_ROWS
The default sample size for the ANALYZE statement.

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_FILE

public static final java.lang.String SERVER_PROPERTIES_FILE
The name of the server properties file.

See Also:
Constant Field Values

SERVER_PROPERTIES_TITLE

public static final java.lang.String SERVER_PROPERTIES_TITLE
The title of the server properties file.

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

SUFFIX_DATA_FILE

public static final java.lang.String SUFFIX_DATA_FILE
The file name suffix of data files.

See Also:
Constant Field Values

SUFFIX_PAGE_FILE

public static final java.lang.String SUFFIX_PAGE_FILE
The file name suffix of page files.

See Also:
Constant Field Values

SUFFIX_DB_FILE

public static final java.lang.String SUFFIX_DB_FILE
The file name suffix of all database files.

See Also:
Constant Field Values

SUFFIX_INDEX_FILE

public static final java.lang.String SUFFIX_INDEX_FILE
The file name suffix of index files.

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_LOB_FILE

public static final java.lang.String SUFFIX_LOB_FILE
The file name suffix of large object files.

See Also:
Constant Field Values

SUFFIX_LOBS_DIRECTORY

public static final java.lang.String SUFFIX_LOBS_DIRECTORY
The suffix of the directory name used if LOB objects are stored in a directory.

See Also:
Constant Field Values

SUFFIX_LOG_FILE

public static final java.lang.String SUFFIX_LOG_FILE
The file name suffix of transaction log files.

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

TEMP_TABLE_PREFIX

public static final java.lang.String TEMP_TABLE_PREFIX
The table name suffix used to create internal temporary tables.

See Also:
Constant Field Values

THROTTLE_DELAY

public static final int THROTTLE_DELAY
The delay that is to be used if throttle has been enabled.

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

UTF8

public static final java.lang.String UTF8
Name of the character encoding format.

See Also:
Constant Field Values

VERSION_JDBC_MAJOR

public static final int VERSION_JDBC_MAJOR
The major version number of the supported JDBC API.

See Also:
Constant Field Values

VERSION_JDBC_MINOR

public static final int VERSION_JDBC_MINOR
The minor version number of the supported JDBC API.

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

BLOB_SEARCH

public static final boolean BLOB_SEARCH
Whether searching in Blob values should be supported.

See Also:
Constant Field Values
Method Detail

getVersion

public static java.lang.String getVersion()
Get the version of this product, consisting of major version, minor version, and build id.

Returns:
the version number

getVersionStable

public static java.lang.Object getVersionStable()
Get the last stable version name.

Returns:
the version number

getFullVersion

public static java.lang.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