Created
January 13, 2017 15:17
-
-
Save jdkealy/43e623f16f53711dfe6ab2f8cf269d8e to your computer and use it in GitHub Desktop.
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
(defn paginate-all-ents [page pp _db & [return-ent?]] | |
(let [_drop (* page pp)] | |
(->> (d/seek-datoms (db/_d) :avet :content/fk) | |
(drop _drop) | |
(take pp) | |
(map (fn [_datom] | |
(if return-ent? | |
(ret-rec | |
(db/by-id (nth _datom 0 ) _db)) | |
(nth _datom 0 )))) | |
vec))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment