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:
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.