Liking cljdoc? Tell your friends :D

embedded.mariadb


*db-spec*clj

source

halt-dbclj

(halt-db db)
source

init-dbclj

(init-db {:keys [port delete-after-shutdown base-dir data-dir security-disabled
                 dbname]
          :or {port 4306
               delete-after-shutdown true
               base-dir (File. (str (System/getProperty "java.io.tmpdir")
                                    "/maria-data1"))
               data-dir (File. (str (System/getProperty "java.io.tmpdir")
                                    "/maria-base1"))
               security-disabled true
               dbname "testdb"}})

Starts a temporary MariaDB instance and returns it.

Available options to configure DB:

  • port (int): Maria db port
  • base-dir (String): Path where maria db files are stored
  • base-dir (File): File in which maria db files are stored
  • data-dir (String): Path where maria db data is stored
  • data-dir (File): File where maria db data is stored
  • security-disabled (Boolean): Skip grant tables
Starts a temporary MariaDB instance and returns it.

Available options to configure DB:
- port (int): Maria db port
- base-dir (String): Path where maria db files are stored
- base-dir (File): File in which maria db  files are stored
- data-dir (String): Path where maria db data is stored
- data-dir (File): File where maria db data is stored
- security-disabled (Boolean):  Skip grant tables
sourceraw docstring

shutdown-threadsclj

source

with-dbclj

(with-db f
         {:keys [port delete-after-shutdown base-dir data-dir security-disabled
                 on-error dbname username password init-hook]
          :or
            {delete-after-shutdown true
             on-error nil
             init-hook nil
             password "password"
             username "username"
             port 4306
             dbname "testdb"
             data-dir (str (System/getProperty "java.io.tmpdir") "/maria-data")
             base-dir (str (System/getProperty "java.io.tmpdir") "/maria-base")
             security-disabled true}})

Starts a temporary MariaDB instance and executes the provided function f with database being available and ensures that database shuts down properly after function f is finished.

Available options to configure DB:

  • port (int): Maria db port
  • base-dir (String): Path where maria db files are stored
  • base-dir (File): File in which maria db files are stored
  • data-dir (String): Path where maria db data is stored
  • data-dir (File): File where maria db data is stored
  • security-disabled (Boolean): Skip grant tables
  • on-error (IFn): Function to run when error is thrown.
Starts a temporary MariaDB instance and executes the provided function `f` with database being available and ensures that database shuts down properly after function `f` is finished.

Available options to configure DB:
- port (int): Maria db port
- base-dir (String): Path where maria db files are stored
- base-dir (File): File in which maria db  files are stored
- data-dir (String): Path where maria db data is stored
- data-dir (File): File where maria db data is stored
- security-disabled (Boolean):  Skip grant tables
- on-error (IFn): Function to run when error is thrown.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close