Clojurians
#datomic
<
2016-08-24
>

This page is not created by, affiliated with, or supported by Slack Technologies, Inc.

nxqd01:08:48

@yonatanel the default expression doesn't seem to support '[* (default :something/a "na")]. I have to write my function to get all keys, mapping to default value and merge back to current one.

hans04:08:24

@nxqd: why does that bother you? merging the defaults into the entity returned by datomic can be done succinctly in clojure.

magnars06:08:17

can I use pull syntax to get the count of a :db.cardinality/many attr?

robert-stuttaford06:08:55

i don't believe so, no, @magnars

magnars06:08:30

I guess it wouldn't compose well

nxqd09:08:57

@hans yeah, I thought having default expression would solve the problem cleanly but it doesn't.

hans09:08:36

@nxqd It is not really unclean to do it the way I suggested. Datomic has a very broad data model and what you're describing is narrow in comparison. If you want to restrict Datomic's open data model to something closer to your application, implementing a layer between your application and Datomic is the right thing to do.

hans09:08:20

@nxqd I personally think it is not good practice to let database queries leak into the application anyway, but there are different opinions regarding that.

nxqd09:08:17

true, I agree. I support that idea also