DVSqlRecordAdapter class

The record operations compiled to SQL, for SQLite, PostgreSQL, MySQL and the in-memory development database.

Every name is checked to be an identifier and every value is a parameter, so nothing a record holds can become SQL.

Implemented types

Constructors

DVSqlRecordAdapter([DVDatabaseAdapter? database])
Over database, or DV.Database -- with its tenant checks -- when none is given.

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

count(String collection, {DVFilter? where}) → Future<int>
How many records where picks.
override
delete(String collection, {required DVFilter where}) → Future<int>
Removes the records where picks, and answers how many.
override
ensure(DVRecordShape shape) → Future<void>
The collection exists with shape's fields.
override
find(String collection, {DVFilter? where, List<DVSort> orderBy = const <DVSort>[], int? limit, int? offset, List<String>? fields}) → Future<List<Map<String, Object?>>>
The records where picks, in orderBy, at most limit of them after skipping offset, with only fields when given.
override
insert(String collection, Map<String, Object?> record) → Future<void>
Adds one record.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited
update(String collection, Map<String, Object?> changes, {required DVFilter where}) → Future<int>
Applies changes to the records where picks, and answers how many.
override

Operators

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