Created
April 26, 2017 23:58
-
-
Save bgrins/21abcd6779e6be10dfb78bfa3c5dd3ab to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://github.com/Datomic/mbrainz-sample#getting-started | |
bin/datomic restore-db file:///Documents/mbrainz-1968-1973 datomic:free://localhost:4334/mbrainz-1968-1973 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> lein repl | |
(ns datomic.samples.mbrainz | |
(:require [clojure.pprint :refer (pprint)] | |
[datomic.api :as d] | |
[datomic.samples.mbrainz.rules :refer (rules)])) | |
;; Replace with your transactor's connection information | |
(def uri "datomic:free://localhost:4334/mbrainz-1968-1973") | |
(def conn (d/connect uri)) | |
(def db (d/db conn)) | |
(d/q '[:find ?e ?a ?v | |
:in ?log | |
:where [(tx-ids ?log 0 nil) [?tx ...]] | |
[(tx-data ?log ?tx) [[?e ?a ?v]]]] | |
(d/log conn)) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment