PostgresqlDataRepository<TService extends Service, TData extends DataObject<TData>> mixin
Methods
-
any({Filter filter = Filter.empty, bool locked = false, bool skipLocked = false})
→ Future<bool>
-
Returns true if any element matches the
filter.
-
atomic<R>(Future<R> delegate())
→ Future<R>
-
Runs all calls to this repository from inside
delegate inside an
atomic transaction.
-
count({Filter filter = Filter.empty})
→ Future<int>
-
Returns the count of all elements that match
filter.
-
create(TData object)
→ Future<TData>
-
Creates a new element.
-
deleteAll({required Filter filter})
→ Future<int>
-
Deletes all elements matching the
filter.
-
deleteById(dynamic id)
→ Future<bool>
-
Find and delete an element by its
DataBean.idField value.
-
dispose()
→ Future<void>
-
inherited
-
find<T>(Find<T> finder)
→ T
-
inherited
-
first({Filter filter = Filter.empty, Sort sort = Sort.empty, int offset = 0, bool locked = false, bool skipLocked = false})
→ Future<TData?>
-
Returns the first element that matches the
filter.
-
inInstanceZone<R>(R action())
→ R
-
Runs
action in instanceZone, e.g. to start timers, connections or
listeners that keep running after the caller (like a request) is done.
inherited
-
initialize()
→ Future<void>
-
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
read<T>(Config<T> config)
→ T
-
inherited
-
readAll({Filter filter = Filter.empty, Sort sort = Sort.empty, int? offset, int? limit, bool locked = false, bool skipLocked = false})
→ Future<List<TData>>
-
Read all elements respecting
filter, sort, offset and limit values.
-
readById(dynamic id, {bool locked = false, bool skipLocked = false})
→ Future<TData?>
-
Find and read an element by its
DataBean.idField value.
-
toString()
→ String
-
A string representation of this object.
inherited
-
updateAll({required Filter filter, required Map<DataField<TData, dynamic>, dynamic> values})
→ Future<int>
-
Updates the given
values of all elements matching the filter.
-
updateById(TData element)
→ Future<bool>
-
Find and update an element by its
DataBean.idField value.