H2 database connection setup helper functions.
H2 database connection setup helper functions.
Default opts for BETA database, MVStore.
Default opts for BETA database, MVStore.
Default opts for legacy database, PageStore: no MV_STORE, no MVCC.
Default opts for legacy database, PageStore: no MV_STORE, no MVCC.
(legacy-spec path)
(legacy-spec path opts)
Like spec, but merges legacy-defaults to disable BETA features.
Like spec, but merges legacy-defaults to disable BETA features.
(spec path)
(spec path opts)
Create H2 connection spec for given path String (only required argument).
Store depends on method parameter of opts:
Other opts are :user, :password, :server & :port. Self explanatory.
For split filesystem use :split? flag and (2 ** :part) bytes for size. This mode can be stacked with some filesystem modes.
For :nio-mem-lzf the :part argument is used as percentage of blocks that should be kept uncompressed, so ideally it's between 1 and 99.
:flags should be a map of {String String}, like {COMPRESS TRUE}, it will overwrite all flags set by default so YMMV.
In-memory stores are opened with DB_CLOSE_DELAY=-1 by default, which means they will be available until JVM shuts down. You can close them with SHUTDOWN command.
Create H2 connection spec for given path String (only required argument). Store depends on method parameter of opts: * :raw sets :subname to given path verbose (best of luck!) * :tcp uses server, port and path for :subname * :mem sets database to in-memory storage, JVM runtime persistent * :nio-mem-fs is the new in-memory storage, JVM runtime persistent * :nio-mem-lzf for new in-memory compressing storage, JVM runtime persistent * :raf sets database to embedded, RandomAccessFile local storage * :async uses AsyncChannel instead of RandomAccessFile, may be faster * :nio uses Java nio instead of RandomAccessFile, may be faster * :nio-mapped uses nio over mem-mapped file, 2GB max size (split implied) * :default or anything else means local embedded (nio) file storage. Other opts are :user, :password, :server & :port. Self explanatory. For split filesystem use :split? flag and (2 ** :part) bytes for size. This mode can be stacked with some filesystem modes. For :nio-mem-lzf the :part argument is used as percentage of blocks that should be kept uncompressed, so ideally it's between 1 and 99. :flags should be a map of {String String}, like {COMPRESS TRUE}, it will overwrite *all* flags set by default so YMMV. In-memory stores are opened with DB_CLOSE_DELAY=-1 by default, which means they will be available until JVM shuts down. You can close them with SHUTDOWN command.
(spec->CP a-spec)
Eats spec, returns org.h2.jdbcx.JdbcConnectionPool.
Requires :subname, :user and :password.
Eats spec, returns org.h2.jdbcx.JdbcConnectionPool. Requires :subname, :user and :password.
(spec->DS a-spec)
Eats spec, returns org.h2.jdbcx.JdbcDataSource.
Requires :subname, :user and :password.
Eats spec, returns org.h2.jdbcx.JdbcDataSource. Requires :subname, :user and :password.
(spec->URL a-spec)
Eats spec, returns URL.
Requires :subname.
Eats spec, returns URL. Requires :subname.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close