DeferredWebQueryProvider class
A test-only WebQueryProvider that defers writes during an open transaction and applies them on commit. See file-level docs.
- Implemented types
- Available extensions
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isOpen → bool
-
Whether the underlying connection is still
alive.
falseafter disposeAsync has been called. TheDb.isOpengetter proxies to this. Useful for "is this handle reusable?" checks at the call site.no setteroverride - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
beginTransactionAsync(
) → Future< void> -
Begins a transaction. The caller is responsible for
calling commitAsync or rollbackAsync exactly once.
override
-
commitAsync(
) → Future< void> -
Commits the current transaction. No-op if there is
no active transaction.
override
-
disposeAsync(
) → Future< void> -
Closes the provider and releases its resources. After
disposeAsync, the provider is unusable.override -
executeAsync(
String sql, [List< Object?> ? binds]) → Future<void> -
Executes a statement that returns no rows (e.g.
CREATE TABLE,INSERT,UPDATE,DELETE).override -
executeDeleteAsync(
{required String table, String? where, List< Object?> ? whereBinds}) → Future<int> -
Available on AsyncQueryProvider, provided by the BulkOpsAsync extension
(bulk delete): runs a singleDELETE FROM <table> [WHERE ...]statement. -
executeUpdateAsync(
{required String table, required Map< String, Object?> setters, String? where, List<Object?> ? whereBinds}) → Future<int> -
Available on AsyncQueryProvider, provided by the BulkOpsAsync extension
: runs a singleUPDATE <table> SET col1 = ?, col2 = ? [WHERE ...]. -
lastInsertRowIdAsync(
) → Future< int> -
Returns the
ROWIDof the last successfulINSERT. Only meaningful for SQLite (per-connection property) and Postgres (via theRETURNINGclause orlastval). Throws if the provider doesn't support it.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
rollbackAsync(
) → Future< void> -
Rolls back the current transaction. No-op if there is
no active transaction.
override
-
selectAsync(
String sql, [List< Object?> ? binds]) → Future<List< Object?> > -
Executes a
SELECTand returns the raw rows. The runtime does not interpret the row format; theEntityMeta.fromRow(provided by codegen) does.override -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
open(
WebEngineConfig config) → Future< DeferredWebQueryProvider> -
Opens a deferred provider against
the in-memory shim (the only
factory that benefits from the
deferred semantics — the real
browser's
tx.abort()works correctly).