NativeEngine class final

The offline_first_core library (Rust + LMDB 1.0) as an Engine.

The library that bundles the binary builds it from the addresses of its functions:

final engine = NativeEngine(
  NativeSymbols(
    open: Native.addressOf(Bindings.open),
    execute: Native.addressOf(Bindings.execute),
    freeString: Native.addressOf(Bindings.freeString),
    close: Native.addressOf(Bindings.close),
    abiV2: AbiV2Symbols(...), // offline_first_core 0.7.6 and later
  ),
);

Every call runs on the library's NativeWorker isolate, through the ABI v2 when NativeSymbols.abiV2 is given (handles the library validates), and through the ABI v1 otherwise.

Implemented types

Constructors

NativeEngine(NativeSymbols symbols)
The engine of the library whose functions are symbols.
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
symbols → NativeSymbols
The functions of the library.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
open(String path, DbOptions options) → Future<Result<EngineConnection, DbError>>
Opens (or creates) the database at path.
override
toString() → String
A string representation of this object.
inherited

Operators

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