SqlSelectBloc constructor
SqlSelectBloc({})
Create a select bloc with the specified options. The select bloc will fire a query on creation
Implementation
SqlSelectBloc(
{required this.database,
required this.table,
this.offset,
this.limit,
this.where,
this.columns = "*",
this.joinTable,
this.joinOn,
this.orderBy,
this.reactive = false,
this.verbose = false})
: assert(database != null),
assert(database.isReady) {
_getItems();
if (reactive) {
_changefeed = database.changefeed.listen((change) {
if (table != null && change.table == table) {
_getItems();
}
if (verbose) {
print("CHANGE IN THE DATABASE: $change");
}
});
}
}