struct Stamp Fields
value | UInt64 | The position, growing with every commit. |
|---|
Values
Written | Stamp |
|---|
Conforms to
Answer, Copyable, Defaultable, Deinitable, Equatable, ImplicitlyCopyable, MovableStampA position in the order commits apply in, ustore_stamp_t: where a commit landed, or the newest commit a transaction or a snapshot reads.1struct Stamp value | UInt64 | The position, growing with every commit. |
|---|
Written | Stamp |
|---|
Answer, Copyable, Defaultable, Deinitable, Equatable, ImplicitlyCopyable, Movable__init__Stamp zero, which a failed call leaves.def __init__(out self) def __init__(out self, arena: Int, generation: Int, written: Self, count: Int) Adopts the stamp a call wrote.
WatchWhether a transaction records the keys a call touches for conflicts, ustore_watch_t.struct Watch code | c_int | The raw ustore_watch_t value the ABI exchanges. |
|---|
KEYS | Watch(Int32(0)) | Records the keys, so a concurrent change to any of them fails the commit. |
|---|---|---|
NONE | Watch(Int32(1)) | Records nothing. |
Copyable, Deinitable, Equatable, ImplicitlyCopyable, Movable, RegisterPassable, TrivialRegisterPassableIsolationHow the transactions of the in-memory engine see each other's writes, ustore_isolation_t.struct Isolation code | c_int | The raw ustore_isolation_t value the ABI exchanges. |
|---|
STRICT_SERIALIZABLE | Isolation(Int32(0)) | Every transaction appears to run alone at one moment. |
|---|---|---|
SNAPSHOT | Isolation(Int32(1)) | Every transaction reads the state its start saw and conflicts only over what it writes. |
Copyable, Deinitable, Equatable, ImplicitlyCopyable, Movable, RegisterPassable, TrivialRegisterPassableTransactionAn optimistic transaction grouping operations across collections and modalities, freed when it goes out of scope. It holds its database open, and serves one call at a time.5struct Transaction Verbs called on it run on the calling thread, read through it and write into it, recording the keys
they touch; txn.unwatched() records nothing, and txn.on(executor) and txn.deferred(executor)
route the same verbs to an executor.
library | Library | The loaded engine. |
|---|---|---|
database | Address | The ustore_database_t it belongs to. |
address | Address | The opaque ustore_transaction_t. |
BlobsVerbs, DatabaseVerbs, Deinitable, DocsVerbs, GraphVerbs, Movable, PagesVerbs, StringsVerbs__init__Adopts a transaction the engine just began.def __init__(out self, *, library: Library, database: Int, address: Int) __deinit__Resets and frees the transaction. Calls ustore_transaction_free.def __deinit__(deinit self) unwatchedThe same verbs on the calling thread, recording nothing for conflicts. Binding-only.def unwatched(ref self) -> On[origin_of(self)] onThe same verbs, blocking on executor. Binding-only.deferredThe same verbs, each submitted to executor and answering a Deferred at once. Binding-only.def deferred(
ref self,
ref executor: Executor,
watch: Watch = Watch.KEYS
) -> DeferredOn[origin_of(executor, self)]