Fork me on GitHub
#datomic
<
2017-05-01
>
nooga11:05:12

Is there a way to change ids into keywords while querying? so I don’t have to [?e :blah/enumattr ?x] [?x :db/ident ?xi] ?

augustl11:05:11

enumattr, as in something with cardinality "many"?

nooga11:05:51

something like that

nooga11:05:01

so when I have [?e :artist/country ?c] i want to get ?c as :country/GB from the query instead of 108

favila12:05:13

[(datomic.api/ident $ ?x) ?xi] is equivalent (and you can do it outside the query too), but it's shorter and clearer to just do what you are doing

nooga12:05:44

i was trying (ident ?x)

nooga12:05:56

that’s why it didn’t work :F

souenzzo15:05:13

In my experience with datomic: It's almost always was "Simpler than expected"