/photon-xtdb-viewer

An example Photon app using XTDB

Primary LanguageClojure

photon-xtdb-starter

An example Photon app using XTDB. Adapted from xtdb-in-a-box

Setup

  • clone this repository
  • clone photon repository next to this one

Running

From command line

XTDB_ENABLE_BYTEUTILS_SHA1=true clj

Will:

From your editor (jack-in)

Make sure you set the XTDB_ENABLE_BYTEUTILS_SHA1 environnement variable to true before jacking-in.

Loading data

In ns app.core, evaluate these at the REPL:

(xt/submit-tx xtdb-node [[::xt/put {:xt/id "9" :user/name "alice"}]])
(xt/submit-tx xtdb-node [[::xt/put {:xt/id "10" :user/name "bob"}]])
(xt/submit-tx xtdb-node [[::xt/put {:xt/id "11" :user/name "charlie"}]])