Liking cljdoc? Tell your friends :D

eva.entity-id

Namespace responsible for the creation, interpretation, and packing of entity ids.

Namespace responsible for the creation, interpretation, and packing of entity ids.
raw docstring

*id-info*clj

source

->tx-eidclj

(->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
sourceraw docstring

->tx-numclj

(->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
sourceraw docstring

allocate-temp-idclj

(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
sourceraw docstring

base-tx-eidclj

source

eid->longclj

(eid->long eid)

Inputs: [eid :- EntityID]

Inputs: [eid :- EntityID]
sourceraw docstring

entid-strictclj

(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.
sourceraw docstring

entity-id?clj

(entity-id? x)
source

entity-id?*clj

(entity-id?* x)
source

genned-tempid?clj

(genned-tempid? tid)
source

id-info-baseclj

source

IEntityIDcljprotocol

->EIDclj

(->EID eid)

->Longclj

(->Long eid)

added?clj

(added? eid)

nclj

(n eid)

partitionclj

(partition eid)

retracted?clj

(retracted? eid)

temp?clj

(temp? eid)
source

max-eclj

max value of 'e' passed to pack-entity-id <= (2^42)-1

max value of 'e' passed to pack-entity-id
<= (2^42)-1
sourceraw docstring

max-pclj

max value of 'p' passed to pack-entity-id <= (2^20)-1

max value of 'p' passed to pack-entity-id
<= (2^20)-1
sourceraw docstring

max-tx-eidclj

source

min-idclj

(min-id id1 id2)
source

pack-entity-idclj

(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
sourceraw docstring

perm?clj

source

permify-idclj

(permify-id eid)
source

permify-id*clj

(permify-id* id-info eid)
source

select-exemplar-idclj

(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
sourceraw docstring

set-max-allocated-id!clj

(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
sourceraw docstring

strict-map->EntityIDclj

(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->
sourceraw docstring

tagged-tempid?clj

(tagged-tempid? tid)
source

tempidclj

(tempid partition)
(tempid partition n)
source

tx-eid?clj

(tx-eid? num)
source

tx-num?clj

(tx-num? num)
source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close