Skip to content

Instantly share code, notes, and snippets.

@hkjels
Forked from fabioyamate/datomic-queries.clj
Created December 3, 2015 08:33
Show Gist options
  • Save hkjels/bad910bbd8b6c839deb5 to your computer and use it in GitHub Desktop.
Save hkjels/bad910bbd8b6c839deb5 to your computer and use it in GitHub Desktop.
Datomic Queries cheat-sheet
;;; Replace entity with the schema
{:find [...]
:in [...]
:where [...]}
;;; eav
[?e ?a ?v ?tx]
;;; txInstant
[?tx :db/txInstant ?time]
;;; retract
[:db/retract [:entity/id id] attribute value]
;;; identity values for enums
[?status :db/ident ?status-name]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment