Fork me on GitHub

I understand that Datoms are stored in segments, how does Datomic know which segments to fetch for a given eid or attr?


is there a mechanism for pulling just the raw db/ident value instead of #db{:id 123 :ident :my.custom/ident}?


it’s not that huge a deal, i just figured before i go speccing some stuff (which is kind of difficult to think about wrt (s/keys :req [:db/ident])), i should make sure there’s not something obvious i’m overlooking from the docs

Dustin Getz23:11:55

@bhurlow This helped me understand what's going on under the hood

Dustin Getz23:11:51

@bhurlow omg i want db/ident to come down instead of db/id when available too! 100% of cases it is what i want. The entity api does this, but i think it surprised beginners

Dustin Getz23:11:20

@bhurlow I have a function "smart-lookup-ref" that takes "what i've got" and turns it into the most idiomatic lookup ref, e.g. db/ident when available, but it's not really that much of an improvement, you still need to ensure that each pull follows the same idioms