Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@staypufd
Created October 22, 2015 01:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save staypufd/3d246e33051e583de09a to your computer and use it in GitHub Desktop.
Save staypufd/3d246e33051e583de09a to your computer and use it in GitHub Desktop.
Print out Datomic Query Results Nicely in REPL
;; Assumes a Datomic DB where an Entity is defined that has attribute
;; :park.amenity/label of type string. Subsitute your query in place
;; of this example.
(let [vec-str (->>
(d/q '[:find ?amenity-name
:where [?e :park.amenity/label ?amenity-name]]
(db))
(sort-by first))]
(doseq [x vec-str]
(println (first x))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment