Liking cljdoc? Tell your friends :D

datomic-compound-index.core


->binary-strclj

(->binary-str key)
source

->humanclj

(->human key)

Debugging/repl utility. Returns a human-readable representation of the key.

Debugging/repl utility. Returns a human-readable representation of the key.
sourceraw docstring

attr-meta-col-nameclj

(attr-meta-col-name attr)
source

classmapclj

source

concat-bytesclj

(concat-bytes arrs)
source

conj-metasclj

(conj-metas metas)
source

deserialize!clj

(deserialize! db e attr)

Given an eid and the a compound-indexed attr, return the deserialized value

Given an eid and the a compound-indexed attr, return the deserialized value
sourceraw docstring

from-bytescljmultimethod

source

from-bytes-dispatchclj

(from-bytes-dispatch type bytes)
source

index-keyclj

(index-key args)

Create an index key. Can be used for querying. For inserting, see insert-index-key

key is a vector of datomic values

Create an index key. Can be used for querying. For inserting, see insert-index-key

key is a vector of datomic values
sourceraw docstring

insert-index-keyclj

(insert-index-key attr args)

Returns a map of data to transact. Returned data is missing a :db/id, so merge it into the entity map when transacting. i.e.

(d/transact conn [(merge {:db/id id, :user/foo x, :user/bar y} (insert-index-key :user/foo-bar [x y]))])

Arguments:

attr - the compound index attribute. Should be indexed, of type :bytes. A second attribute named <attr>-metadata should also exist, of type :bytes, but not indexed. args - a vector of values

Returns a map of data to transact. Returned data is missing a :db/id, so merge it into the entity map when transacting. i.e.

(d/transact conn [(merge {:db/id id, :user/foo x, :user/bar y} (insert-index-key :user/foo-bar [x y]))])

Arguments:

attr - the compound index attribute. Should be indexed, of type :bytes. A second attribute named <attr>-metadata should also exist, of type :bytes, but not indexed.
args - a vector of values
sourceraw docstring

int->binary-strclj

(int->binary-str i)
source

int->bytesclj

(int->bytes x)

Due to JVM stupidity about all bytes being signed, we can't use the 8th bit of every byte, or else the byte array comparison will break.

Due to JVM stupidity about all bytes being signed, we can't use the
8th bit of every byte, or else the byte array comparison will
break. 
sourceraw docstring

key-compareclj

(key-compare a b)

Compare two keys. Behaves like clojure.core/compare, returning -1,0,1, but also returns :subkey-a when a is a subkey of b, and :subkey-b when b is a subkey of a

Compare two keys. Behaves like clojure.core/compare, returning -1,0,1, but also returns :subkey-a when a is a subkey of b, and :subkey-b when b is a subkey of a
sourceraw docstring

pad-str-bytesclj

(pad-str-bytes str len)
source

(search db attr key)

Search a compound index. attr is the attribute to search. Returns a seq of datoms. key is a vectors that will be passed to index-key.

(search db :event/user-at-type [1234 (Date.)])

Search a compound index. attr is the attribute to search. Returns a seq of datoms. key is a vectors that will be passed to index-key.

(search db :event/user-at-type [1234 (Date.)])
sourceraw docstring

search-rangeclj

(search-range db attr key1 key2)

Search a compound index. Returns a seq of datoms.

Uses d/index-range to find all datoms between key1 and key2, inclusive

Search a compound index. Returns a seq of datoms.

Uses d/index-range to find all datoms between key1 and key2, inclusive
sourceraw docstring

serializeclj

(serialize x)
source

Serializecljprotocol

to-bytesclj

(to-bytes x)

Given a value that can be stored in datomic, returns a byte array representation of the value for use in a compound-index. to-bytes should be designed such that for two values x,y, if (< x y) then (< (to-bytes x) (to-bytes y))

Given a value that can be stored in datomic, returns a byte array
representation of the value for use in a compound-index. to-bytes
should be designed such that for two values x,y, if (< x y)
then (< (to-bytes x) (to-bytes y))
source

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

× close