SqlSelectBloc class

A ready to use select bloc

Provides a stream with the rows corresponding to the query. This stream, accssible via rows, will send new data if something changes in the database if the reactive parameter is true

Join queries are possible.

Constructors

SqlSelectBloc({required SqlDb database, required String table, int? offset, int? limit, String? where, String columns = "*", String? joinTable, String? joinOn, String? orderBy, bool reactive = false, bool verbose = false})
Create a select bloc with the specified options. The select bloc will fire a query on creation

Properties

columns String
Select sql statement
getter/setter pair
database SqlDb
The database
final
hashCode int
The hash code for this object.
no setterinherited
joinOn String?
The on sql statement
getter/setter pair
joinTable String?
The join sql statement
getter/setter pair
limit int?
Limit sql statement
getter/setter pair
offset int?
Offset sql statement
getter/setter pair
orderBy String?
Order by sql statement
getter/setter pair
reactive bool
The reactivity of the bloc. Will send new values in items when something changes in the database if set to true
getter/setter pair
rows Stream<List<DbRow>>
A stream of rows returned by the query. Will return new items if something changes in the database when the reactive parameter is true
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
table String
The table name
final
verbose bool
The verbosity
getter/setter pair
where String?
Where sql statement
getter/setter pair

Methods

dispose() → void
Cancel the changefeed subscription
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
update(List<DbRow> _rows) → void
A convenience method to update the bloc items if needed by adding to the sink

Operators

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