DataAccessObject<T> class

Implemented types

Constructors

DataAccessObject(String sql, {required Converter<T?> converter, List<Relation<DataAccessObject>> relations = const []})

Properties

all Future<List<T?>>
alias for toList
no setteroverride
converter Converter<T?>
final
database → Database?
no setter
first Future<T?>
first gets the first entry on database
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
ids Future<List>
ids gets id list of a table
no setteroverride
isEmpty Future<bool>
no setter
isLogger bool?
no setter
isNotEmpty Future<bool>
no setter
last Future<T?>
last gets the last entry on database
no setteroverride
relations List<Relation<DataAccessObject>>
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
schema Schema
final
type Type
no setter

Methods

average(String column) Future<double?>
Calculations
override
clear() → void
count([String column = '*']) Future<int?>
count count of all num column
override
create(T? item) Future
Persistence
override
createAll(List<T?> items) Future
Method createAll but add a list of entries
override
delete(T? item) Future
Method delete deletes entry on database
override
destroy(dynamic id) Future
Method destroy deletes entry on database based on id
override
destroyAll() Future<int>
Method destroyAll deletes all entries on database
override
distinct([bool value = true]) QueryMethod<T?>
distinct method
override
find(dynamic id) Future<T?>
find gets an entry based by id
override
findBy(Map<String, dynamic> args) Future<T?>
findBy looks for an entry based on map
override
group(List<String> args) QueryMethod<T?>
group method
override
having(String opts) QueryMethod<T?>
having method
override
includes(List args) QueryMethod<T?>
includes method
override
insert(Map<String?, Object?> values) Future
Method insert same as create but expects a map entry
override
insertAll(List<Map<String?, dynamic>> items) Future
Method insertAll same as insert but expects a map entry List
override
isExists(Map<String, dynamic> args) Future<bool>
Finders
override
joins(List<Type> args) QueryMethod<T?>
joins method
override
limit(int value) QueryMethod<T?>
limit method
override
maximum(String column) Future<int?>
maximum gets maximum value of a num column in table
override
minimum(String column) Future<int?>
minimum gets minimum value of a num column in table
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
not(Map<String, dynamic> args) QueryMethod<T>
not method
override
offset(int value) QueryMethod<T?>
offset method
override
or(Map<String, dynamic> args) QueryMethod<T?>
or method
override
order(List<String> columns, String type) QueryMethod<T?>
The order command is used to sort the data returned in ascending order. SELECT * FROM tasks ORDER BY name ASC;
override
pick(List<String> columns) Future<List>
pick pick
override
pluck(List<String> columns) Future<List>
pluck pluck
override
select(List<String> args) QueryMethod<T?>
select method
override
sum(String column) Future<int?>
sum gets sum value of a num column in table
override
take([int limit = 1]) Future<List<T?>>
take limits result based on passed int value
override
toList() Future<List<T?>>
toList returns items list
override
toMap() Future<List<Map<String?, dynamic>>>
toMap returns a map
override
toSql() String
toSql gets the sequel value of a query
override
toString() String
A string representation of this object.
inherited
update(T? item) Future
Method update updates entry on database
override
updateAll(Map<String, dynamic> values) Future
Relation
override
where(Map<String?, dynamic> args) QueryMethod<T?>
where method
override

Operators

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