Crux is becoming XTDB!

You can read the rename announcement, or head to this page on the new XTDB site (where you'll be taken in 10 seconds).

Menu

JDBC Nodes

Crux nodes can use JDBC databases to store their transaction logs and document stores.

Local Cluster Mode

JDBC Nodes use next.jdbc internally and pass through the relevant configuration options that you can find here.

Below is the minimal configuration you will need:

Table 1. Minimal JDBC Configuration
Property Description

:crux.jdbc/dbtype

One of: postgresql, oracle, mysql, h2, sqlite

:crux.jdbc/dbname

Database Name

Depending on the type of JDBC database used, you may also need some of the following properties:

Table 2. Other JDBC Properties
Property Description

:crux.jdbc/host

Database Host

:crux.jdbc/user

Database Username

:crux.jdbc/password

Database Password

Project Dependencies

  juxt/crux-core {:mvn/version "20.09-1.11.0-beta"}
  juxt/crux-jdbc {:mvn/version "20.09-1.11.0-beta"}

Getting started

Use the API to start a JDBC node, configuring it with the required parameters:

(defn start-jdbc-node []
  (crux/start-node {:crux.node/topology '[crux.jdbc/topology]
                    :crux.jdbc/dbtype "postgresql"
                    :crux.jdbc/dbname "cruxdb"
                    :crux.jdbc/host "<host>"
                    :crux.jdbc/user "<user>"
                    :crux.jdbc/password "<password>"}))