SqliteQueries mixin
Mixin to provide default query functionality.
Classes using this need to implement SqliteConnection.readLock and SqliteConnection.writeLock.
- Implemented types
- Mixin applications
Properties
- closed → bool
-
Returns true if the connection is closed
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
updates
→ Stream<
UpdateNotification> ? -
Broadcast stream that is notified of any table updates
no setter
Methods
-
close(
) → Future< void> -
inherited
-
computeWithDatabase<
T> (Future< T> compute(Database db)) → Future<T> -
See SqliteReadContext.computeWithDatabase.
override
-
execute(
String sql, [List< Object?> parameters = const []]) → Future<ResultSet> -
Execute a write query (INSERT, UPDATE, DELETE) and return the results (if any).
override
-
executeBatch(
String sql, List< List< parameterSets) → Future<Object?> >void> -
Execute a write query (INSERT, UPDATE, DELETE) multiple times with each
parameter set. This is more faster than executing separately with each
parameter set.
override
-
get(
String sql, [List< Object?> parameters = const []]) → Future<Row> -
Execute a read-only (SELECT) query and return a single result.
override
-
getAll(
String sql, [List< Object?> parameters = const []]) → Future<ResultSet> -
Execute a read-only (SELECT) query and return the results.
override
-
getOptional(
String sql, [List< Object?> parameters = const []]) → Future<Row?> -
Execute a read-only (SELECT) query and return a single optional result.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onChange(
Iterable< String> ? tables, {Duration throttle = const Duration(milliseconds: 30), bool triggerImmediately = true}) → Stream<UpdateNotification> - Create a Stream of changes to any of the specified tables.
-
readLock<
T> (Future< T> callback(SqliteReadContext tx), {Duration? lockTimeout, String? debugContext}) → Future<T> -
Takes a read lock, without starting a transaction.
inherited
-
readTransaction<
T> (Future< T> callback(SqliteReadContext tx), {Duration? lockTimeout}) → Future<T> -
Open a read-only transaction.
override
-
toString(
) → String -
A string representation of this object.
inherited
-
watch(
String sql, {List< Object?> parameters = const [], Duration throttle = const Duration(milliseconds: 30), Iterable<String> ? triggerOnTables}) → Stream<ResultSet> -
Execute a read query every time the source tables are modified.
override
-
writeLock<
T> (Future< T> callback(SqliteWriteContext tx), {Duration? lockTimeout, String? debugContext}) → Future<T> -
Takes a global lock, without starting a transaction.
inherited
-
writeTransaction<
T> (Future< T> callback(SqliteWriteContext tx), {Duration? lockTimeout}) → Future<T> -
Open a read-write transaction.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited