Namespace responsible for the creation, interpretation, and packing of entity ids.
Namespace responsible for the creation, interpretation, and packing of entity ids.
(->tx-eid tx-foo)
Takes a tx-num or tx-eid and returns the equivalent tx-eid
Takes a tx-num or tx-eid and returns the equivalent tx-eid
(->tx-num tx-foo)
Takes a tx-num or tx-eid and returns the equivalent tx-num
Takes a tx-num or tx-eid and returns the equivalent tx-num
(allocate-temp-id)
Allocates and returns a new temporary id.
If we are in a peer context, will count down from :cur-n. If we are in a transactor context, will count up from :tx-n.
Context is determined by the existence of the :tx-n key
Allocates and returns a new temporary id. If we are in a peer context, will count down from :cur-n. If we are in a transactor context, will count up from :tx-n. Context is determined by the existence of the :tx-n key
(entid-strict db e)
Like (.entid db e), but throws if the resulting output is not an entity-id.
Like (.entid db e), but throws if the resulting output is not an entity-id.
(->EID eid)
(->Long eid)
(added? eid)
(n eid)
(partition eid)
(retracted? eid)
(temp? eid)
max value of 'e' passed to pack-entity-id <= (2^42)-1
max value of 'e' passed to pack-entity-id <= (2^42)-1
max value of 'p' passed to pack-entity-id <= (2^20)-1
max value of 'p' passed to pack-entity-id <= (2^20)-1
(pack-entity-id op packed-id)
(pack-entity-id p e retracted temp)
A packed entity ID is 64 bits in the shape: [1 1 20 42 ].
The first bit is a temp-id flag The next bit is an added / removed flag The next 20 are the partition id The next 42 are the entity id
Arguments: p = partition-id e = entity-id retracted = true if entity is retracted temp = true if entity-id is temporary
A packed entity ID is 64 bits in the shape: [1 1 20 42 ]. The first bit is a temp-id flag The next bit is an added / removed flag The next 20 are the partition id The next 42 are the entity id Arguments: p = partition-id e = entity-id retracted = true if entity is retracted temp = true if entity-id is temporary
(select-exemplar-id id1 id2)
Select an exemplar id between the two ids given the following priority: permid > user-tagged tempid > user-genned tempid > tx-genned tempid
Select an exemplar id between the two ids given the following priority: permid > user-tagged tempid > user-genned tempid > tx-genned tempid
(set-max-allocated-id! max-id prev-tx-eid)
resets the max allocated id to the passed value. NOTE: also resets the perm-id mapping
resets the max allocated id to the passed value. NOTE: also resets the perm-id mapping
(strict-map->EntityID m7283 & [drop-extra-keys?__5380__auto__])
Factory function for class EntityID, taking a map of keywords to field values. All keys are required, and no extra keys are allowed. Even faster than map->
Factory function for class EntityID, taking a map of keywords to field values. All keys are required, and no extra keys are allowed. Even faster than map->
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close