Liking cljdoc? Tell your friends :D

xitdb.util.operations


array-kv-reduceclj

(array-kv-reduce ral read-from-cursor f init)

Efficiently reduces over index-value pairs in a ReadArrayList.

Efficiently reduces over index-value pairs in a ReadArrayList.
sourceraw docstring

array-list-append-value!clj

(array-list-append-value! wal v)

Appends a value to a WriteArrayList. Converts the value to an appropriate XitDB representation using v->slot!.

Appends a value to a WriteArrayList.
Converts the value to an appropriate XitDB representation using v->slot!.
sourceraw docstring

array-list-assoc-value!clj

(array-list-assoc-value! wal i v)

Associates a value at index i in a WriteArrayList. Appends the value if the index equals the current count. Replaces the value at the specified index otherwise. Throws an IllegalArgumentException if the index is out of bounds.

Associates a value at index i in a WriteArrayList.
Appends the value if the index equals the current count.
Replaces the value at the specified index otherwise.
Throws an IllegalArgumentException if the index is out of bounds.
sourceraw docstring

array-list-empty!clj

(array-list-empty! wal)

Empties a WriteArrayList by replacing its contents with an empty array. Returns the modified WriteArrayList.

Empties a WriteArrayList by replacing its contents with an empty array.
Returns the modified WriteArrayList.
sourceraw docstring

array-list-pop!clj

(array-list-pop! wal)

Removes the last element from a WriteArrayList. Throws IllegalStateException if the array is empty. Returns the array list with the last element removed.

Removes the last element from a WriteArrayList.
Throws IllegalStateException if the array is empty.
Returns the array list with the last element removed.
sourceraw docstring

array-seqclj

(array-seq ral read-from-cursor)

Creates a lazy sequence from a ReadArrayList. Uses the provided read-from-cursor function to convert cursors to values. Returns a lazy sequence of the array elements.

Creates a lazy sequence from a ReadArrayList.
Uses the provided read-from-cursor function to convert cursors to values.
Returns a lazy sequence of the array elements.
sourceraw docstring

linked-array-list-append-value!clj

(linked-array-list-append-value! wlal v)

Appends a value to a WriteLinkedArrayList. Converts the value to an appropriate XitDB representation using v->slot!.

Appends a value to a WriteLinkedArrayList.
Converts the value to an appropriate XitDB representation using v->slot!.
sourceraw docstring

linked-array-list-assoc-value!clj

(linked-array-list-assoc-value! wlal i v)

Associates a value at index i in a WriteLinkedArrayList. Appends the value if the index equals the current count. Replaces the value at the specified index otherwise. Throws an IllegalArgumentException if the index is out of bounds.

Associates a value at index i in a WriteLinkedArrayList.
Appends the value if the index equals the current count.
Replaces the value at the specified index otherwise.
Throws an IllegalArgumentException if the index is out of bounds.
sourceraw docstring

linked-array-list-insert-value!clj

(linked-array-list-insert-value! wlal pos v)

Inserts a value at position pos in a WriteLinkedArrayList. Converts the value to an appropriate XitDB representation using v->slot!.

Inserts a value at position pos in a WriteLinkedArrayList.
Converts the value to an appropriate XitDB representation using v->slot!.
sourceraw docstring

linked-array-list-pop!clj

(linked-array-list-pop! wlal)

Removes the first element from a WriteLinkedArrayList. This is a stack-like operation (LIFO) for linked lists. Returns the modified WriteLinkedArrayList.

Removes the first element from a WriteLinkedArrayList.
This is a stack-like operation (LIFO) for linked lists.
Returns the modified WriteLinkedArrayList.
sourceraw docstring

linked-array-list-remove-value!clj

(linked-array-list-remove-value! wlal pos)

Removes a value at position pos in a WriteLinkedArrayList.

Removes a value at position pos in a WriteLinkedArrayList.
sourceraw docstring

linked-array-seqclj

(linked-array-seq rlal read-from-cursor)

Creates a lazy sequence from a ReadLinkedArrayList. Uses the provided read-from-cursor function to convert cursors to values. Returns a lazy sequence of the linked array elements.

Creates a lazy sequence from a ReadLinkedArrayList.
Uses the provided read-from-cursor function to convert cursors to values.
Returns a lazy sequence of the linked array elements.
sourceraw docstring

map-assoc-value!clj

(map-assoc-value! whm k v)

Associates a key-value pair in a WriteHashMap.

Args: whm - The WriteHashMap to modify k - The key to associate (converted to XitDB representation) v - The value to associate (converted to XitDB representation)

Returns the modified WriteHashMap.

Throws IllegalArgumentException if attempting to associate an internal key. Updates the internal count if fast counting is enabled.

Associates a key-value pair in a WriteHashMap.

Args:
  whm - The WriteHashMap to modify
  k   - The key to associate (converted to XitDB representation)
  v   - The value to associate (converted to XitDB representation)

Returns the modified WriteHashMap.

Throws IllegalArgumentException if attempting to associate an internal key.
Updates the internal count if fast counting is enabled.
sourceraw docstring

map-contains-key?clj

(map-contains-key? whm key)

Checks membership, treating unsupported keys as absent. Native and Java map equality call containsKey with keys the database cannot store: a key the file cannot hold has no lookup hash (see conversion/db-lookup-hash), and a key type no file can hold throws, which is suppressed here. Only encoding errors are suppressed; storage failures still propagate.

Checks membership, treating unsupported keys as absent. Native and Java
map equality call containsKey with keys the database cannot store: a key the
file cannot hold has no lookup hash (see `conversion/db-lookup-hash`), and a
key type no file can hold throws, which is suppressed here. Only encoding
errors are suppressed; storage failures still propagate.
sourceraw docstring

map-dissoc-key!clj

(map-dissoc-key! whm k)

Removes a key-value pair from a WriteHashMap. Throws IllegalArgumentException if attempting to remove an internal key. A key the file cannot hold is absent, so removing it does nothing (see conversion/db-lookup-hash). Updates the internal count if fast counting is enabled.

Removes a key-value pair from a WriteHashMap.
Throws IllegalArgumentException if attempting to remove an internal key.
A key the file cannot hold is absent, so removing it does nothing (see
`conversion/db-lookup-hash`).
Updates the internal count if fast counting is enabled.
sourceraw docstring

map-empty!clj

(map-empty! whm)

Empties a WriteHashMap by replacing its contents with an empty map of the same kind, counted or plain, because whm keeps expecting that kind afterwards. Returns the modified WriteHashMap.

Empties a WriteHashMap by replacing its contents with an empty map of the same
kind, counted or plain, because `whm` keeps expecting that kind afterwards.
Returns the modified WriteHashMap.
sourceraw docstring

map-item-countclj

(map-item-count rhm)

Returns the number of key/vals in the map.

Returns the number of key/vals in the map.
sourceraw docstring

map-item-count-iteratedclj

(map-item-count-iterated rhm)

Returns the number of keys in the map by iterating. The count includes internal keys if any.

Returns the number of keys in the map by iterating.
The count includes internal keys if any.
sourceraw docstring

map-kv-reduceclj

(map-kv-reduce rhm read-from-cursor f init)

Efficiently reduces over key-value pairs in a ReadHashMap, skipping hidden keys.

Efficiently reduces over key-value pairs in a ReadHashMap, skipping hidden keys.
sourceraw docstring

map-read-cursorclj

(map-read-cursor rhm key)

Gets a read cursor for the specified key in a ReadHashMap. Returns the cursor if the key exists, nil otherwise, which includes a key the file cannot hold (see conversion/db-lookup-hash).

Gets a read cursor for the specified key in a ReadHashMap.
Returns the cursor if the key exists, nil otherwise, which includes a key
the file cannot hold (see `conversion/db-lookup-hash`).
sourceraw docstring

map-seqclj

(map-seq rhm read-from-cursor)

Return a lazy seq of key-value MapEntry pairs, or nil if empty.

Return a lazy seq of key-value MapEntry pairs, or nil if empty.
sourceraw docstring

set-assoc-value!clj

(set-assoc-value! whs v)

Adds a value to a set.

Adds a value to a set.
sourceraw docstring

set-contains?clj

(set-contains? rhs v)

Returns true if v is in the set. A value the file cannot hold is not (see conversion/db-lookup-hash).

Returns true if `v` is in the set. A value the file cannot hold is not (see
`conversion/db-lookup-hash`).
sourceraw docstring

set-disj-value!clj

(set-disj-value! whs v)

Removes a value from a set. A value the file cannot hold is absent, so removing it does nothing (see conversion/db-lookup-hash).

Removes a value from a set. A value the file cannot hold is absent, so
removing it does nothing (see `conversion/db-lookup-hash`).
sourceraw docstring

set-empty!clj

(set-empty! whs)

Replaces the whs value with an empty set of the same kind, counted or plain, because whs keeps expecting that kind afterwards.

Replaces the whs value with an empty set of the same kind, counted or plain,
because `whs` keeps expecting that kind afterwards.
sourceraw docstring

set-item-countclj

(set-item-count rhs)

Returns the number of values in the set.

Returns the number of values in the set.
sourceraw docstring

set-seqclj

(set-seq rhm read-from-cursor)

Return a lazy seq values from the set, or nil if empty.

Return a lazy seq values from the set, or nil if empty.
sourceraw 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