Results

Result types returned by Lightweight Transactions and paginated queries.

class coodie.results.LWTResult(applied: bool, existing: dict[str, Any] | None = None)

Bases: object

Typed result for Lightweight Transaction (LWT) operations.

Cassandra returns an [applied] boolean column for conditional writes (IF NOT EXISTS, IF EXISTS, IF <conditions>). This wrapper gives callers a convenient way to inspect the outcome.

applied: bool
existing: dict[str, Any] | None
class coodie.results.PagedResult(data: list[Any] = <factory>, paging_state: bytes | None = None)

Bases: object

Result of a paged query.

Holds the documents for the current page and an opaque paging_state that can be passed back to QuerySet.page() to fetch the next page. When paging_state is None there are no more pages.

data: list[Any]
paging_state: bytes | None