Liking cljdoc? Tell your friends :D

xitdb.util.collection

Collection lookups, equality and hashing shared by database views. Work streams over the view; no materialization or mutable-view hash caching is needed.

Collection lookups, equality and hashing shared by database views. Work streams over
the view; no materialization or mutable-view hash caching is needed.
raw docstring

xitdb.util.db-context

Reader and writer handles access the same storage but have different identities. Linking them lets the wrapper reuse stored pointers within one database, reject pointers from other databases, and route frozen values through the reader so they can be shared across threads without using the writer's mutable file state.

Reader and writer handles access the same storage but have different identities.
Linking them lets the wrapper reuse stored pointers within one database, reject
pointers from other databases, and route frozen values through the reader so
they can be shared across threads without using the writer's mutable file state.
raw docstring

xitdb.util.key-hash

Canonical hashes for collection-valued and double keys. Sequence order matters; map and set order does not. Native and database-backed collections share the same encoding. Printer settings and collection hashCode are never consulted.

Canonical hashes for collection-valued and double keys. Sequence order
matters; map and set order does not. Native and database-backed collections
share the same encoding. Printer settings and collection hashCode are never
consulted.
raw docstring

xitdb.util.sorted-key

Order-preserving, reversible key codec for on-disk sorted maps/sets.

Unlike hash maps (which SHA-1-hash their keys), sorted collections store the real key bytes so they can be recovered on read and compared by the engine's unsigned lexicographic byte comparison (Arrays.compareUnsigned). The codec must therefore be:

  1. reversible - decode-key (encode-key k) == k
  2. order-preserving - sign(compareUnsigned (encode a) (encode b)) == sign(compare a b) for any two keys.

Every encoding carries a leading 1-byte type tag. The tag both identifies the type on decode and establishes a total order across types, so heterogeneous keys never throw.

Supported key types: string, keyword, boolean, char, long, double, UUID, Instant and Date. Strings encode as their UTF-8 bytes (already code-point ordered); keywords use a flag + namespace + name layout so they sort like Clojure's default comparator (see keyword->bytes); numeric/temporal/UUID keys use order-preserving big-endian encodings.

Order-preserving, reversible key codec for on-disk sorted maps/sets.

Unlike hash maps (which SHA-1-hash their keys), sorted collections store the
real key bytes so they can be recovered on read and compared by the engine's
unsigned lexicographic byte comparison (`Arrays.compareUnsigned`). The codec
must therefore be:

  1. reversible  - `decode-key (encode-key k)` == k
  2. order-preserving - `sign(compareUnsigned (encode a) (encode b))`
                        == `sign(compare a b)` for any two keys.

Every encoding carries a leading 1-byte type tag. The tag both identifies the
type on decode and establishes a total order across types, so heterogeneous
keys never throw.

Supported key types: string, keyword, boolean, char, long, double, UUID,
Instant and Date. Strings encode as their UTF-8 bytes (already code-point
ordered); keywords use a flag + namespace + name layout so they sort like
Clojure's default comparator (see `keyword->bytes`); numeric/temporal/UUID
keys use order-preserving big-endian encodings.
raw docstring

xitdb.util.sorted-operations

Bridges the XITDBSorted* wrapper types to the Java Read/WriteSortedMap. Keys are encoded/decoded through xitdb.util.sorted-key (order-preserving, reversible) rather than hashed, so the real key is recoverable on read.

Bridges the XITDBSorted* wrapper types to the Java Read/WriteSortedMap.
Keys are encoded/decoded through `xitdb.util.sorted-key` (order-preserving,
reversible) rather than hashed, so the real key is recoverable on read.
raw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close