PagedBTree class

Out-of-core B+-tree index.

Properties

file PagedFile
final
hashCode int
The hash code for this object.
no setterinherited
length int
Number of entries in the tree.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

commit() Future<void>
Persist pending mutations.
get(Uint8List key) Future<int?>
Look up key. Returns its value, or null if absent.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
put(Uint8List key, int value) Future<bool>
Insert (or replace) a (key, value) pair. Returns true if a new entry was added, false if an existing one was updated in place.
range({Uint8List? lower, bool lowerInclusive = true, Uint8List? upper, bool upperInclusive = false}) Stream<({Uint8List key, int value})>
Yield every (key, value) entry whose key falls in [lower?, upper?). Either bound may be null for an open side. Order is ascending by key.
remove(Uint8List key) Future<bool>
Delete key. Returns true if it existed.
rollback() Future<void>
Discard pending mutations on the underlying file and reload the in-memory header fields (_rootPage, _entryCount) from the (now-restored) header page. Safe to call when there is nothing to roll back.
scan() Stream<({Uint8List key, int value})>
Yield every (key, value) in ascending key order. Streaming.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

open(PagedFile file) Future<PagedBTree>