M7Dao<T extends M7Table> class abstract

Constructors

M7Dao(Database database, String tableName)
constructor

Properties

database → Database
database instance to make transaction above it
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tableName String
the table name to do transaction of it
final

Methods

delete(T object) Future
delete an object from the database
deleteAll() Future
dispose() → void
to close all the streams hold by _streamsMap
fromDB(Map<String, dynamic> map) → T
used by methods want to return values from database in known way
getAll() Future
return the whole table
getById(dynamic id) Future<T?>
get the wanted object by id from database
insert(T object) Future
insert an object to the database
insertAll(List<T> objects) Future
insert all objects to the database
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListener() Future
update all streams with the new values
toString() String
A string representation of this object.
inherited
update(T object) Future
update an object to the database
watch(StreamController streamController, M7Query<M7Table> query) → void
to add a new listener to _streamsMap to notified when changes happened to the table
watchAll() Stream<List<T>>
to return the whole table and the stream saved in _stream

Operators

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