native library
The native runtime of db_dsl: NativeEngine runs the protocol on a loaded offline_first_core (Rust + LMDB 1.0) through one worker isolate.
db_dsl bundles no binary. flutter_local_db and dart_db each bring theirs
with a build hook and hand the addresses of its functions to
NativeSymbols. Import this library only on platforms with dart:ffi
(not the web).
Classes
- AbiV2Symbols
-
The ABI v2 of offline_first_core (0.7.6 and later):
u64handles that the library validates, so a handle used after it was closed answers an error instead of undefined behaviour, and requests and responses as bytes with a length. - KeyValueSymbols
-
The key-value C ABI of offline_first_core (
push_data,update_data,get_by_id,delete_by_id,get_all,clear_all_records). - NativeConnection
- An open database of a NativeEngine.
- NativeEngine
- The offline_first_core library (Rust + LMDB 1.0) as an Engine.
- NativeKeyValueStore
-
A database opened for the key-value API of offline_first_core
(
push_data,get_by_id, ...), the API flutter_local_db 1.x shipped. - NativeSymbols
- Where the functions of a loaded offline_first_core live.
- NativeWorker
- The isolate that runs every call into one native library, alive while a database of that library is open.
Enums
- KeyValueCall
- The calls of the key-value C ABI.
Typedefs
-
LdbBufferView
= Int32 Function(Uint64, Pointer<
Pointer< , Pointer<Uint8> >Size> ) -
ldb_buffer_view(buffer, data, len) -> status. -
LdbExecute
= Int32 Function(Uint64, Pointer<
Uint8> , Size, Pointer<Uint64> ) -
ldb_execute(database, request, request_len, response) -> status. - LdbHandleCall = Int32 Function(Uint64)
-
ldb_buffer_release(buffer)andldb_close(database)-> status. -
LdbOpen
= Int32 Function(Pointer<
Uint8> , Size, Pointer<Uint8> , Size, Pointer<Uint64> , Pointer<Uint64> ) -
ldb_open(path, path_len, options, options_len, out, response) -> statusof the ABI v2. -
OfcExecute
= Pointer<
Utf8> Function(Pointer<Void> , Pointer<Utf8> ) -
ofc_execute(handle, request) -> response. -
OfcFreeString
= Void Function(Pointer<
Utf8> ) -
ofc_free_string(response). -
OfcHandleCall
= Pointer<
Utf8> Function(Pointer<Void> ) -
A call on a handle:
close_database(handle),get_all(handle),clear_all_records(handle). -
OfcHandleStringCall
= Pointer<
Utf8> Function(Pointer<Void> , Pointer<Utf8> ) -
A call on a handle with a string:
push_data,update_data,get_by_id,delete_by_id. -
OfcOpen
= Pointer<
Utf8> Function(Pointer<Utf8> , Pointer<Utf8> , Pointer<Pointer< )Void> > -
ofc_open(path, options, out) -> response.