OdbcBackend class sealed
Typed wrapper around a native ODBC connection used by the repository
layer. Replaces the historical dynamic _native field with a sealed
hierarchy so consumers can dispatch via exhaustive pattern matching
instead of repeated as casts.
Two variants are supported:
- SyncBackend wraps a NativeOdbcConnection (blocking FFI). All operations return values directly.
- AsyncBackend wraps an AsyncNativeOdbcConnection (worker isolate). All operations return Futures.
The repository does not assume value identity — it always reaches the
underlying connection through connection. Construct one via the
helper factory OdbcBackend.fromNative or directly with the variant
constructors when the type is known statically.
- Implementers
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
fromNative(
Object native) → OdbcBackend - Builds a backend from an untyped reference. Accepts only NativeOdbcConnection or AsyncNativeOdbcConnection; throws ArgumentError otherwise. Use this on FFI / DI seams where the concrete type is only known at runtime; prefer the typed constructors elsewhere.