This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-08-12
Channels
- # announcements (5)
- # babashka (1)
- # beginners (193)
- # calva (79)
- # cider (18)
- # clara (4)
- # clojure (38)
- # clojure-europe (12)
- # clojure-france (8)
- # clojure-nl (12)
- # clojure-sweden (1)
- # clojure-uk (50)
- # clojurescript (37)
- # conjure (30)
- # cursive (3)
- # data-science (2)
- # datalog (7)
- # datomic (12)
- # events (2)
- # expound (3)
- # figwheel-main (1)
- # fulcro (45)
- # graalvm (1)
- # jobs (1)
- # jobs-discuss (11)
- # luminus (1)
- # malli (5)
- # off-topic (32)
- # reagent (6)
- # reitit (32)
- # shadow-cljs (25)
- # spacemacs (2)
- # sql (22)
- # vim (6)
Datomic Team There is a issue/tracker for this issue?
(let [db-uri (doto (str "datomic:mem://" (d/squuid))
d/create-database)
conn (d/connect db-uri)
db (d/db conn)]
(first (d/index-pull db
{:index :avet
:start [:db/txInstant]
:reverse true
:selector '[(:db/id :as :not-id :xform clojure.edn/read-string)]})))
selector :as
do not work on :db/id
, in any context (pull, query-pull, index-pull)...
PS: :db/id
do not respect ANY param. xform
also not work with it.I opened a support ticket for this as well. I suggest doing the same so they know there’s interest in getting this fixed.
I'm trying to transact a :db/fn
via a custom client that works from javascript, but I'm struggling to get the schema right. I keep getting an error:
Value {:lang :clojure, :params [db eids pull-expr], :code "(map eids (fn [eid] (datomic.api/pull db pattern eid)))", :imports [], :requires []} is not a valid :datomic/fn for attribute :db/fn
You should show your code, but it sounds like you are transactions a map instead of a d/function object
Yes, I’m transacting a map, I assumed that’s how transit
serialized the d/function
object. The issue is that I’m doing this from a javascript library that doesn’t have access to d/function
, on the transit level how is this object serialized? (using this from javascript is obviously non-standard, but necessary for my org)
I ended up just shifting to putting the txfns in the datomic install classpath
It's not clear what's missing to correctly transact this function, using the on-prem obviously. Any ideas?