DVRecordAdapter class abstract interface

The operations every database engine implements.

Framework code persists through these rather than through SQL strings, so that a project on a document database gets the same Studio, models and stores as one on PostgreSQL. DV.Database.records is the one for the configured database.

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.
delete(String collection, {required DVFilter where}) → Future<int>
Removes the records where picks, and answers how many.
ensure(DVRecordShape shape) → Future<void>
The collection exists with shape's fields.
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.
insert(String collection, Map<String, Object?> record) → Future<void>
Adds one record.
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.

Operators

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

Static Methods

over(DVDatabaseAdapter database) → DVRecordAdapter
The record operations for database: itself when it is a record engine, as a document database is, and otherwise compiled to SQL for it.