Fork me on GitHub
#datascript
<
2016-03-21
>
isaac06:03:39

How use enumerators in datascript

isaac06:03:28

[:db/add :my/keyword :my/attr “enum/value”] not supported

dm306:03:49

just use keywords @isaac

dm306:03:01

[:db/add eid :some/attr :my/enum]

isaac06:03:22

I enum value has additional attribute

isaac06:03:29

such as :db/doc

isaac06:03:38

:repr/cn-name

dm306:03:20

then you'll have to have an entity {:db/id -1, :repr/cname "cname", :repr/type :my/enum}

dm306:03:59

then you may add an indexed attr to schema, so that you could [:db/add [:db/id :my/enum] :repr/more "another attr"]

isaac06:03:19

Yeah, I’m using this way now. IMO, it’s more convenient for sync data with datomic if datascript support idents

isaac08:03:29

How’s the performance of re-render when connection changed in complicated pages?

isaac08:03:04

rum + datascript