Created
October 22, 2015 01:56
-
-
Save staypufd/3d246e33051e583de09a to your computer and use it in GitHub Desktop.
Print out Datomic Query Results Nicely in REPL
This file contains 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
;; 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