Quantcast
Channel: tech – Zolo Labs
Viewing all articles
Browse latest Browse all 17

datomic – demonic transforms – to do or not to do?

$
0
0

While working with the new Datomic database, we’re having to get used to using ns-qualified keywords in our maps. To make day-1 go faster, I wrote these versions of the demonic insert and load functions:

and also:

The idea was to use them as follows (for instance):

where datomic-key->regular-key is something like:

The idea behind all this was that a map like:

Could become something like:

This initially seemed to be more usable and familiar. However, we’ve since moved away from it, seeing some value in having keys that are indeed namespaced to the entity they belong to (for example user entity has keys called :user/first-name and :user/last-name).

Just thought we’d share.


Tagged: clojure, code, database, datomic, demonic, tech

Viewing all articles
Browse latest Browse all 17

Trending Articles