which returns {:x/places [{:db/id 01110010}] ..some-other-kvs}
Is there an idiomatic way to get only eid’s for an attr while others keep their spec?
we can obviously transform after getting data from the pull but is there something that can be done on the query level itself?
Also consider that these type of query will be used more commonly and would love to keep the code simple.
I felt the need for this quite often, especially in tests or interactive exploration sessions.
Since the introduction of the :xform option to the pull syntax (https://docs.datomic.com/on-prem/pull.html#xform) I can imagine providing a helper function for this purpose or simply allowing any keyword (or vector of keywords?) to be the parameter of :xform. Then you can simply write pull patterns like this: [[:some.ref/attr :xform :db/id]].
Another idea, which can ease this pain would be to use https://github.com/redplanetlabs/specter to retouch the returned data by raising the :db/ids out of their maps. It’s more compact and easier to extend than a pure, clojure.core based logic.