This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-10-05
Channels
- # aleph (190)
- # bangalore-clj (4)
- # beginners (31)
- # boot (127)
- # braid-chat (2)
- # cider (2)
- # cljs-dev (79)
- # cljsrn (7)
- # clojure (81)
- # clojure-dev (1)
- # clojure-greece (40)
- # clojure-italy (3)
- # clojure-korea (8)
- # clojure-new-zealand (5)
- # clojure-russia (5)
- # clojure-spec (87)
- # clojure-uk (13)
- # clojurescript (50)
- # cloverage (10)
- # component (4)
- # core-async (37)
- # cursive (26)
- # datascript (20)
- # datomic (29)
- # editors (2)
- # emacs (12)
- # hoplon (63)
- # jobs (2)
- # lein-figwheel (1)
- # leiningen (17)
- # liberator (2)
- # off-topic (19)
- # om (31)
- # onyx (9)
- # pedestal (4)
- # proton (1)
- # re-frame (22)
- # reagent (13)
- # ring (1)
- # ring-swagger (9)
- # spacemacs (5)
- # specter (4)
- # untangled (24)
- # vim (29)
Anyone used spec with DataScript? Need tips on how to deal with the fact that entities are not maps, and specifically how to get the same functionality as clojure.spec/keys but for Datascript entities
@tonsky is there a reason you disallow any datomic's :db.type
s other than :db.type/ref
?
introduces extra schema transformation step, and reduces automatic data validation capabilities,
e.g. if I know attribute is :db.type/double
, I can enforce it to be number
in cljs by just looking inside datascript db,
w/o having to keep original datomic schema around
see https://github.com/tonsky/datascript/pull/107 and https://github.com/tonsky/datascript/issues/152
This is counter-intuitive (why else would I specify data type if it isn’t validated later?)
sort of makes sense.
on the other hand - the only schema-related validation is about isComponent=true without db.valueType=ref
, which makes this question pretty much opendo you do any values validation? I am looking at (and talking about) this: https://github.com/tonsky/datascript/blob/master/src/datascript/db.cljc#L538-L559
it's neither too strict, nor too open, which raises all those if I can use :db/fulltext=true, why not :db.valueType=long?
questions
actually, list of every meaningful-to-datascript datomic schema attributes would be helpful. https://github.com/tonsky/datascript#differences-from-datomic readme is not very straightforward or complete about "which datomic attributes actually have any effect (or required) in ds"