SqlSelectBloc class Null safety

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
read / write
database SqlDb
The database
final
hashCode int
The hash code for this object.
read-only, inherited
joinOn String?
The on sql statement
read / write
joinTable String?
The join sql statement
read / write
limit int?
Limit sql statement
read / write
offset int?
Offset sql statement
read / write
orderBy String?
Order by sql statement
read / write
reactive bool
The reactivity of the bloc. Will send new values in items when something changes in the database if set to true
read / write
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
read-only
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
table String
The table name
final
verbose bool
The verbosity
read / write
where String?
Where sql statement
read / write

Methods

dispose() → void
Cancel the changefeed subscription
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent 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