class ScanMode(IntEnum) Values
ORDERED | 0 | |
|---|---|---|
UNORDERED | 1 |
ScanModeIn what order a scan hands its keys over, valued as ustore_scan_mode_t.ScanDirectionWhich way a scan, a cursor or a measurement walks its range from the start key.PatternKindWhat the patterns of a scan or a cursor are matched as, valued as ustore_pattern_kind_t.CaseSensitivityWhether patterns compare bytes as they are or after Unicode case folding, valued as ustore_case_sensitivity_t.PredicateCostWhere a scan asks its predicate: before patterns and filters read values, or last, valued as ustore_predicate_cost_t.ChangeKindWhat one committed change did to its key.PredicateCalled with the keys one page of a scan or a pull listed, from whichever thread runs it, answering one truthy item per key kept; a raise rejects the rest and re-raises once the call is final.type Predicate = Callable[[tuple[UUID, ...]], Sequence[object]] KeysThe keys one batch scan or sample wrote into an Arena, viewing it until it rewinds.4class Keys __dlpack__*__dlpack__× 2A DLPack capsule over the memory the buffer protocol exports, pinning the arena until its consumer deletes it, so numpy.from_dlpack reads it in place.def __dlpack____dlpack__(
*,
stream: object | None = None,
max_version: tuple[int, int] | None = None,
dl_device: tuple[int, int] | None = None,
copy: bool | None = None,
) -> object __dlpack_device__*__dlpack_device__× 2The DLPack device of the arena: (1, 0) for host pages, (2, ordinal) for NVIDIA, (10, ordinal) for AMD.def __dlpack_device____dlpack_device__() -> tuple[int, int] countscounts: tuple[int, ...] scoresscores: tuple[float, ...] | None PageThe keys one pull of a Cursor wrote into an Arena, viewing it until it rewinds; empty, so falsy, once the walk ends.2class Page __buffer__The keys as an array of shape (keys, 16) bytes, pinning the arena until released.def __buffer__(flags: int) -> memoryview valuesThe values of the keys, every one present, when the pull asked for them, and None otherwise.values: Values | None CursorA walk over the keys of one collection, which every pull resumes past the last key the one before it handed out, so a key written behind the walk never comes and one written ahead of it does.2class Cursor A page shorter than wanted exhausts the walk for good, whatever is written since.
nextThe next page of up to wanted keys in arena, with their values when asked, blocking on the executor the cursor was opened through.def next(
wanted: int,
arena: Arena,
/,
*,
values: bool = False,
progress: Progress | None = None,
) -> Page Calls ustore_blobs_cursor_next.
closeFrees the walk with the holds it kept on its database and the transaction or snapshot it reads through.def close() -> None ChangesCursorA feed of the changes committed to one collection after a stamp, oldest first, which pins that stamp and resumes every pull past the last change the pull before it handed out.2class ChangesCursor nextThe next up to wanted changes in arena, with the bytes every one carries when asked; an empty pull reached the newest commit.def next(
wanted: int,
arena: Arena,
/,
*,
values: bool = False,
) -> Changes closeFrees the feed, releasing the stamp it pinned and the hold it kept on its database.def close() -> None ChangesThe changes one pull of a ChangesCursor answers, oldest first.4class Changes(structseq[Any], tuple[Page, Values | None, tuple[int, ...], tuple[ChangeKind, ...]]) keysThe Page of the key of every change, oldest change first.keys: Page valuesThe Values of the bytes every change carries when the pull asked for them, or None.values: Values | None stampsThe stamp every change was committed at.stamps: tuple[int, ...] kindsWhat every change did.kinds: tuple[ChangeKind, ...] MeasurementThe bounds on what a key range holds, as measure() estimates them without walking it.6class Measurement(structseq[int], tuple[int, int, int, int, int, int]) min_cardinalityThe fewest entries the range may hold.min_cardinality: int max_cardinalityThe most entries the range may hold.max_cardinality: int min_value_bytesThe fewest bytes the values in the range may take.min_value_bytes: int max_value_bytesThe most bytes the values in the range may take.max_value_bytes: int min_space_usageThe fewest bytes the range may take on disk.min_space_usage: int max_space_usageThe most bytes the range may take on disk.max_space_usage: int