Liking cljdoc? Tell your friends :D

szew.h2

H2 database connection setup helper functions.

H2 database connection setup helper functions.
raw docstring

defaultsclj

Default opts for BETA database, MVStore.

Default opts for BETA database, MVStore.
raw docstring

legacy-defaultsclj

Default opts for legacy database, PageStore: no MV_STORE, no MVCC.

Default opts for legacy database, PageStore: no MV_STORE, no MVCC.
raw docstring

legacy-specclj

(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.
raw docstring

specclj

(spec path)
(spec path opts)

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.

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.
raw docstring

spec->CPclj

(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.
raw docstring

spec->DSclj

(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.
raw docstring

spec->URLclj

(spec->URL a-spec)

Eats spec, returns URL.

Requires :subname.

Eats spec, returns URL.

Requires :subname.
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close