TableStatements<Tbl extends Table, Row> extension

Easily-accessible methods to compose common operations or statements on tables.

on

Methods

delete() DeleteStatement<Tbl, Row>
Creates a statement to compose a DELETE from the database.
deleteAll() Future<int>
Deletes ALL rows from the table.
deleteOne(Insertable<Row> row) Future<bool>
Deletes the row from the captured table.
deleteWhere(Expression<bool> filter(Tbl tbl)) Future<int>
Deletes all rows matching the filter from the table.
insert() InsertStatement<Tbl, Row>
Creates an insert statment to be used to compose an insert on the table.
insertAll(Iterable<Insertable<Row>> rows, {InsertMode? mode, UpsertClause<Tbl, Row>? onConflict}) Future<void>
Atomically inserts all rows into the table.
insertOnConflictUpdate(Insertable<Row> row) Future<int>
Inserts one row into this table table, replacing an existing row if it exists already.
insertOne(Insertable<Row> row, {InsertMode? mode, UpsertClause<Tbl, Row>? onConflict}) Future<int>
Inserts one row into this table.
insertReturning(Insertable<Row> row, {InsertMode? mode, UpsertClause<Tbl, Row>? onConflict}) Future<Row>
Inserts one row into this table and returns it, along with auto-generated fields.
insertReturningOrNull(Insertable<Row> row, {InsertMode? mode, UpsertClause<Tbl, Row>? onConflict}) Future<Row?>
Inserts one row into this table and returns it, along with auto-generated fields.
replaceOne(Insertable<Row> row) Future<void>
Replaces a single row with an update statement.
update() UpdateStatement<Tbl, Row>
Creates a statement to compose an UPDATE into the database.