Liking cljdoc? Tell your friends :D

Query console

corium console opens an interactive Datalog console. The console is a peer. Every query runs locally in the console process.

corium console people --transactor http://127.0.0.1:4334

Input

The console accepts three kinds of input.

EDN Datalog queries. Enter the query on one line:

[:find ?name ?age :where [?e :person/name ?name] [?e :person/age ?age]]

Pull forms.

(pull [:person/name :person/age] 1000)

Console commands. Every command starts with a colon.

Partly implemented. A console query takes database inputs only. A query with :in parameters other than $ is rejected. Use a client library for a parameterized query.

The console is read-only. There is no transact command. See getting started for the write paths.

Commands

CommandEffect
:basisPrint the basis and the active view.
:as-of <t>Fix the view at transaction <t>.
:as-of <timestamp>Fix the view at a UTC timestamp.
:since <t>Show only facts added after <t>.
:since <timestamp>The same, named by timestamp.
:history onShow every assertion and retraction.
:history offReturn to the current view.
:currentReturn to the current view.
:schemaPrint every attribute.
:schema <attr>Print one attribute, for example :schema person/name.
:statsPrint the basis and the datom, entity, and attribute counts.
:timing onReport time and datoms scanned after each query.
:timing offStop reporting them.
:watchTail live transaction reports until Ctrl-C.
:helpPrint the command list.
:quit, :exitLeave the console.

Timestamps

:as-of and :since accept a transaction number, or a UTC timestamp.

:as-of 10
:as-of 2026-07-25T09:30:00Z
:since 2026-07-25 09:30:00

A timestamp is YYYY-MM-DD, optionally with HH:MM, HH:MM:SS, or HH:MM:SS.mmm. A timestamp selects the last transaction committed at or before it. Resolution reads the :db/txInstant datom that every commit asserts.

The SQL shell accepts the same two forms with \as-of and \since.

Cost of a time view

Partly implemented. A distinct time view costs a fold of the whole history on first read, not a fold of the view. A :history on console session on a large database is slow and uses memory in proportion to total history. See time and database values.

Bootstrap

By default the console replays the log from basis 0. On a large database that is slow.

Add --peer-bootstrap when the console host can reach the storage backend:

corium console people --peer-bootstrap

The console then reads the published snapshot and subscribes from the index basis. The transactor supplies the storage connection details, using the read-only credential that you configured. See storage backends.

An encrypted database also needs --storage-key.

Watching transactions

:watch tails the transaction report stream. Each report prints t, the commit instant, and the datom count. Press Ctrl-C to stop the tail and return to the prompt.

The Transactions panel of corium tui shows the same stream with a datom detail pane.

Can you improve this documentation?Edit on GitHub

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