DatabaseAdapter class abstract interface

Backend contract used by generated clients and low-level query delegates.

Implementers

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

Adds an implicit many-to-many link for relation.
aggregate(AggregateQuery query) Future<AggregateQueryResult>
Computes aggregate values for query.
close() FutureOr<void>
Releases resources owned by the adapter.
count(CountQuery query) Future<int>
Counts records matched by query.
create(CreateQuery query) Future<Map<String, Object?>>
Creates and returns a single record described by query.
createMany(CreateManyQuery query) Future<int>
Inserts multiple records described by query.
delete(DeleteQuery query) Future<Map<String, Object?>>
Deletes and returns a single record described by query.
deleteMany(DeleteManyQuery query) Future<int>
Deletes every record matched by query.
findFirst(FindFirstQuery query) Future<Map<String, Object?>?>
Returns the first record matched by query, if any.
findMany(FindManyQuery query) Future<List<Map<String, Object?>>>
Returns every record that matches query.
findUnique(FindUniqueQuery query) Future<Map<String, Object?>?>
Returns the single record uniquely matched by query, if any.
groupBy(GroupByQuery query) Future<List<GroupByQueryResultRow>>
Groups records according to query and returns aggregate rows.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
rawExecute(String sql, [List<Object?> parameters = const <Object?>[]]) Future<int>
Executes a raw SQL statement and returns the number of affected rows.
rawQuery(String sql, [List<Object?> parameters = const <Object?>[]]) Future<List<Map<String, Object?>>>
Executes a raw SQL query and returns the result rows.
Removes implicit many-to-many links for relation.
toString() String
A string representation of this object.
inherited
transaction<T>(Future<T> action(DatabaseAdapter tx)) Future<T>
Runs action inside a backend transaction.
update(UpdateQuery query) Future<Map<String, Object?>>
Updates and returns a single record described by query.
updateMany(UpdateManyQuery query) Future<int>
Updates every record matched by query.
upsert(UpsertQuery query) Future<Map<String, Object?>>
Creates or updates a single record described by query.

Operators

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