This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-09-28
Channels
- # announcements (2)
- # beginners (19)
- # calva (8)
- # cider (5)
- # cljsrn (13)
- # clojure (35)
- # clojure-conj (3)
- # clojure-spain (1)
- # clojure-uk (2)
- # clojurescript (4)
- # clojutre (4)
- # cursive (13)
- # data-science (2)
- # datascript (1)
- # datomic (5)
- # duct (4)
- # fulcro (76)
- # funcool (5)
- # jobs (5)
- # off-topic (10)
- # remote-jobs (7)
- # rewrite-clj (8)
- # spacemacs (3)
- # sql (2)
- # xtdb (25)
Anyone know why query for 2-element tuple fails, but hardwiring the value in works?
(db/q '[:find ?e
:in [$ ?idc]
:where
[?e :nsm.entity/idc ?idc]]
(db/db a)
[#uuid "bac0858c-46a6-4ae1-8f18-060f197b95e9"
#uuid "00000000-0000-0000-0000-000000000000"])
> Error: Cannot parse binding, expected (bind-scalar | bind-tuple | bind-coll | bind-rel)
at new cljs$core$ExceptionInfo
at Function.cljs$core$IFn$_invoke$arity$3
at Function.cljs$core$IFn$_invoke$arity$2
at datascript$parser$parse_binding
at datascript$parser$parse_tuple_el
contrast with working
(db/q '[:find ?e
:where
[?e :nsm.entity/idc [#uuid "bac0858c-46a6-4ae1-8f18-060f197b95e9"
#uuid "00000000-0000-0000-0000-000000000000"]]]
(db/db a))
> #{[1]}
schema of :nsm.entity/idc
is unique tuple of UUIDs
{:db/ident :nsm.entity/idc
:db/valueType :db.type/tuple
:db/tupleTypes [:db.type/uuid :db.type/uuid]
:db/cardinality :db.cardinality/one
:db/unique :db.unique/identity}