MvccTable class
MVCC-aware in-memory version store for one table.
Properties
- chainCount → int
-
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- nextRowId → int
-
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- tableName → String
-
final
Methods
-
delete(
TxnContext ctx, bool predicate(Map< String, dynamic> ), Set<int> activeTransactions) → int -
Delete rows matching
predicateunderctx. Returns count of deleted rows. -
insert(
TxnContext ctx, Map< String, dynamic> values) → int -
Insert a new row with
valuesunder transactionctx. Returns the assigned row ID. -
loadBaseRows(
List< Map< baseRows) → voidString, dynamic> > - Populate the version store from base rows returned by the page layer. All loaded rows are assigned txnId = 0 (pre-MVCC; always visible).
-
materialize(
TxnContext ctx) → List< Map< String, dynamic> > - Materialise visible rows using an autocommit read context (sees all committed data — used for checkpoint/persist).
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
rollbackTxn(
int txnId) → void -
Undo all changes made by
txnId: • New versions (createdByTxn == txnId): remove from chain. • Deleted versions (deletedByTxn == txnId): restore. -
scan(
TxnContext ctx) → List< Map< String, dynamic> > -
Return all rows visible to
ctx(snapshot isolation). -
scanWhere(
TxnContext ctx, bool predicate(Map< String, dynamic> )) → List<Map< String, dynamic> > -
Return rows matching
predicate, visible toctx. -
snapshotAll(
TxnContext ctx) → List< Map< String, dynamic> > - Get the current visible snapshot as a plain list (for savepoint/rollback).
-
toString(
) → String -
A string representation of this object.
inherited
-
update(
TxnContext ctx, bool predicate(Map< String, dynamic> ), Map<String, dynamic> updates, Set<int> activeTransactions) → int -
Update rows matching
predicatewithupdatesunderctx. Returns count of updated rows. -
vacuum(
int threshold) → void -
Remove version chains for rows permanently deleted before
threshold. Remove old links inside chains for rows still alive.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited