This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-03-07
Channels
- # admin-announcements (5)
- # aws (2)
- # boot (313)
- # cider (69)
- # cljsfiddle (18)
- # cljsrn (17)
- # clojars (6)
- # clojure (121)
- # clojure-austin (4)
- # clojure-bangladesh (4)
- # clojure-colombia (2)
- # clojure-dusseldorf (17)
- # clojure-japan (1)
- # clojure-russia (65)
- # clojure-sg (4)
- # clojurescript (94)
- # community-development (6)
- # core-matrix (2)
- # cursive (2)
- # data-science (6)
- # datomic (28)
- # hoplon (4)
- # jobs (1)
- # jobs-discuss (1)
- # keechma (15)
- # ldnclj (2)
- # off-topic (6)
- # om (140)
- # om-next (1)
- # onyx (47)
- # parinfer (11)
- # re-frame (13)
- # reagent (4)
- # spacemacs (7)
- # specter (7)
- # yada (18)
there is two problem confuse me about Datomic:
1. Should I prefer enumerated value than keyword. db.type/ref
OR db.type/keyword
2. I have an entity (a user) which created old thant t
.
Is this user will recycle when I call (gc-storage conn t)
if this user never updated after created?
Hi @isaac - see my reply here: https://groups.google.com/d/msg/datomic/m2aVI9IY9Ms/o7CI0AnMAAAJ
@bkamphaus: there is no reply
@isaac: there definitely is one, but Google Groups always had bad delays for update/refresh - it may take a couple of minutes to show up in your view. File under “eventually consistent” I guess.
@bkamphaus: I seen your reply. thanks
(defn sample-n [db n]
(d/q '[:find (sample ?n ?a) .
:in $ ?n
:where [?a :account/uuid]]
db n))
you could stick the number in the quoted form, which is how I've seen it done in the examples
but my experience with datomic is limited, so I am not sure if you'll run in to issues using syntax-quote there
like this?
(defn sample-n [db n]
(d/q `[:find (sample ~n ?a) .
:in $
:where [?a :account/uuid]]
db))
That results in :db.error/invalid-data-source Nil or missing data source. Did you forget to pass a database argument?
when called
you could try building the expression using regular quote, in case the namespace qualifying that syntax quote does is screwing it up