Tuples index with blocks
Tuples index with blocks
(add-single-tuple! tuple node block pos tuple-count byte-pos byte-len)
Performs the operation necessary to add a single tuple from a node/block. tuple: the tuple to be added node: the node to be modified block: the tuples block to be modified pos: the tuple position within the block tuple-count: the number of tuples in the block byte-pos: the byte position representing the pos byte-len: the bytes from the byte position to the end of the block
Performs the operation necessary to add a single tuple from a node/block. tuple: the tuple to be added node: the node to be modified block: the tuples block to be modified pos: the tuple position within the block tuple-count: the number of tuples in the block byte-pos: the byte position representing the pos byte-len: the bytes from the byte position to the end of the block
Maximum number of tuples in a block
Maximum number of tuples in a block
Name of the block statement file
Name of the block statement file
(count-index-tuples index blocks tuple)
Finds and counts a tuple seq in an index
Finds and counts a tuple seq in an index
The mask to apply for the count bits
The mask to apply for the count bits
(create-tuple-index name order-name)
(create-tuple-index name order-name root-id)
Creates a tuple index for a name
Creates a tuple index for a name
(create-tuple-index-for-managers label index-manager tuple-block-manager)
(create-tuple-index-for-managers label
index-manager
tuple-block-manager
root-id)
Creates a tuple index for a provided pair of block managers.
Creates a tuple index for a provided pair of block managers.
One less than the number of values in a tuple
One less than the number of values in a tuple
(delete-single-tuple! node block pos tuple-count byte-pos byte-len)
Performs the operation necessary to remove a single tuple from a node/block. node: the node to be modified block: the tuples block to be modified pos: the tuple position within the block tuple-count: the number of tuples in the block byte-pos: the byte position representing the pos byte-len: the bytes from the byte position to the end of the block
Performs the operation necessary to remove a single tuple from a node/block. node: the node to be modified block: the tuples block to be modified pos: the tuple position within the block tuple-count: the number of tuples in the block byte-pos: the byte position representing the pos byte-len: the bytes from the byte position to the end of the block
(find-coord index blocks tuple)
Retrieves the coordinate of a tuple. A coordinate is a structure of node/pos for the node and offset in the node's block. If the tuple is found, then returns a coordinate. If the tuple is not found, then return a pair of coordinates that the tuple appears between. A nil coordinate in a pair indicates the end of the range of the index.
Retrieves the coordinate of a tuple. A coordinate is a structure of node/pos for the node and offset in the node's block. If the tuple is found, then returns a coordinate. If the tuple is not found, then return a pair of coordinates that the tuple appears between. A nil coordinate in a pair indicates the end of the range of the index.
(find-index-tuples index blocks tuple)
Finds a tuple seq in an index
Finds a tuple seq in an index
(first-coord index)
Finds the very first tuple in the index
Finds the very first tuple in the index
(get-block-ref node)
Gets the ID of the block that contains the tuples
Gets the ID of the block that contains the tuples
(get-count node)
Returns the number of tuples in the block
Returns the number of tuples in the block
(get-high-tuple node)
Returns the high tuple value from the node's range
Returns the high tuple value from the node's range
(get-low-tuple node)
Returns the low tuple value from the node's range
Returns the low tuple value from the node's range
Half the maximum number of tuples in a block
Half the maximum number of tuples in a block
Number of bytes in a full block
Number of bytes in a full block
(insert-tuple! {:keys [index blocks root-id] :as this} tuple short-tuple)
Inserts a tuple into an index. tuple: the data to be inserted. short-tuple: a possibly shortened tuple to search on. This allows searching for tuples that don't share every element (such as a statement ID)
Inserts a tuple into an index. tuple: the data to be inserted. short-tuple: a possibly shortened tuple to search on. This allows searching for tuples that don't share every element (such as a statement ID)
(last-coord index)
Finds the very first tuple in the index
Finds the very first tuple in the index
(modify-node-block! {:keys [index blocks] :as tuples-store}
{:keys [node pos] :as coord}
op!)
Modifies a node and associated block, using the provided operation
Modifies a node and associated block, using the provided operation
(next-populated index node)
Returns the next node with tuples, starting with the provided node.
Returns the next node with tuples, starting with the provided node.
(partial-equal [t1 & r1] [t2 & r2])
Compares tuples. If one is only partial, then they are allowed to compare equal
Compares tuples. If one is only partial, then they are allowed to compare equal
(search-block block len tuple)
Returns the tuple offset in a block that matches a given tuple. If no tuple matches exactly, then returns a pair of positions to insert between.
Returns the tuple offset in a block that matches a given tuple. If no tuple matches exactly, then returns a pair of positions to insert between.
(set-block-ref! node block-ref)
Sets the ID of the block that contains the tuples
Sets the ID of the block that contains the tuples
(set-count! node count*)
Sets the number of tuples in the block
Sets the number of tuples in the block
(set-high-tuple! node tuple)
Sets the high tuple value of the node's range
Sets the high tuple value of the node's range
(set-low-tuple! node tuple)
Sets the low tuple value of the node's range
Sets the low tuple value of the node's range
(set-tuple-at! block offset tuple)
Retrieves the tuple found at a particular tuple offset
Retrieves the tuple found at a particular tuple offset
(split-block! {:keys [index blocks root-id] :as tuples-store}
{node :node pos :pos :as coord})
Updates a node and associated block to split them into 2 nodes and 2 blocks. Returns the new insertion coordinate
Updates a node and associated block to split them into 2 nodes and 2 blocks. Returns the new insertion coordinate
All the node data, plus overhead normally managed by the tree
All the node data, plus overhead normally managed by the tree
Number of bytes used in the index nodes
Number of bytes used in the index nodes
(tuple-at block offset)
Retrieves the tuple found at a particular tuple offset
Retrieves the tuple found at a particular tuple offset
(tuple-at-coord blocks {:keys [node pos]})
Retrieves the tuple at a coordinate
Retrieves the tuple at a coordinate
(tuple-node-compare tuple node)
Compare the contents of a tuple to the range of a node
Compare the contents of a tuple to the range of a node
(tuple-seq index blocks tuple node offset)
Create a lazy sequence of tuples. This iterates through the block associated with the given node, until reaching the size of the block. Then moves to the next node, and starts iterating through the block associated with it. Continues as long as the provided tuple matches the tuple in the block. index: the tree index with the nodes blocks: the block manager for tuples blocks tuple: the tuple being searched for. Every returned tuple with match this one by prefix offset: the starting point of iteration
Create a lazy sequence of tuples. This iterates through the block associated with the given node, until reaching the size of the block. Then moves to the next node, and starts iterating through the block associated with it. Continues as long as the provided tuple matches the tuple in the block. index: the tree index with the nodes blocks: the block manager for tuples blocks tuple: the tuple being searched for. Every returned tuple with match this one by prefix offset: the starting point of iteration
The number of bytes in a tuple
The number of bytes in a tuple
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close