DatabaseContext class abstract

Interface for performing operations / running queries on the database.

A DatabaseContext is usually received by initiating a transaction via a DatabaseConnection.

Available Extensions

Constructors

DatabaseContext()

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

delete<TDao extends PrimaryKeyDao>(TDao object) Future<void>
deleteId<TPrimaryKey>(PrimaryKeyDataBean<dynamic, TPrimaryKey> bean, TPrimaryKey id) Future<void>
deleteWhere(DataBean bean, Filter filter) Future<int>
Returns number of affected rows.
idExists<TPrimaryKey>(PrimaryKeyDataBean<dynamic, TPrimaryKey> bean, TPrimaryKey id) Future<bool>
insert<TDao extends BaseDao>(TDao object) Future
Returns primary key of inserted object.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
query<TDao>(QuerySource<TDao> bean, {Filter filter = Filter.empty, List<QuerySelect> distinct = const <QuerySelect>[], Sort sort = Sort.empty, int offset = 0, int limit = -1, bool forUpdate = false}) Future<List<TDao>>
queryId<TDao, TPrimaryKey>(PrimaryKeyDataBean<TDao, TPrimaryKey> bean, TPrimaryKey id) Future<TDao?>
select(QuerySource bean, List<QuerySelect> select, {List<QuerySelect> distinct = const <QuerySelect>[], Filter filter = Filter.empty, Sort sort = Sort.empty, int offset = 0, int limit = -1, bool forUpdate = false}) Future<List<Map<String, dynamic>>>
toString() String
A string representation of this object.
inherited
update<TDao extends PrimaryKeyDao>(TDao object) Future<void>
updateId<TPrimaryKey>(PrimaryKeyDataBean<dynamic, TPrimaryKey> bean, TPrimaryKey id, Map<String, dynamic> values) Future<void>
updateWhere(QuerySource source, Map<String, dynamic> values, Filter filter) Future<int>
Returns number of affected rows.

Operators

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