QdrantEdgeClient class

High-level Dart wrapper over QdrantEdgeBindings.

Manages:

  • One-time native library load (cross-platform).
  • One opaque *mut EdgeShard handle per client instance, with a Finalizer safety net in case the caller forgets close.
  • Marshalling Dart values to/from the C-FFI surface, including JSON payloads and the Pointer<Pointer<Char>> error_out convention.

Not intended for direct use by application code — sits behind QdrantVectorStoreRepository, which adapts to the VectorStoreRepository interface used by the rest of flutter_gemma.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

close() Future<void>
Close the shard. Idempotent — safe to call more than once.
count() Future<int>
Exact total number of points currently in the shard.
delete(List<String> ids) Future<void>
Delete points by IDs. No-op for IDs that don't exist.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
Top-K nearest-neighbour search. Pass filterJson (encoded via FilterCodec.encode) to constrain results by payload; pass null to run unfiltered.
toString() String
A string representation of this object.
inherited
upsert({required String id, required List<double> vector, Map<String, dynamic>? payload}) Future<void>
Upsert one point. payload may be omitted (null) or any JSON-encodable Map.
upsertBatch(List<({String id, Map<String, dynamic>? payload, List<double> vector})> points) Future<void>
Bulk upsert. The shim accepts a JSON array of point objects; this method composes that JSON internally so callers stay in Dart-land.
version() String
Library version string. Reads from the shim's compiled-in constant.

Operators

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

Static Properties

debugOverrideDylibPath String?
Test-only: override the dylib path that _ensureBindings uses on the first call. Set this from unit tests that run in a plain Dart VM (no Native Assets framework bundle); leave null in production.
getter/setter pair

Static Methods

open({required String path, required int dim, Distance distance = Distance.cosine}) Future<QdrantEdgeClient>
Open (or create) a shard on disk.