TableOrViewOperations<Tbl extends HasResultSet, Row> class
A capture of a table and a generated database.
Table operations can be captured with DatabaseConnectionUser.from, which may make some common operations easier to write:
- Use
from(table).select()orfrom(table).selectOnly()instead ofselect(table)orselectOnly(table), respectively. - Use
from(table).insert()instead ofinsert(table). You can also usefrom(table).insertOne, or TableOperations.insertOnConflictUpdate to insert rows directly. - Use
from(table).update()instead ofupdate(table). You can also usefrom(table).replace()to replace an existing row. - Use
from(table).delete(),from(table).deleteOne()orfrom(table).deleteWhereto delete rows easily.
- Available extensions
- Annotations
-
- @sealed
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
delete(
) → DeleteStatement< Tbl, Row> -
Available on TableOrViewOperations<
Creates a statement to compose aTbl, Row> , provided by the TableOperations extensionDELETEfrom the database. -
deleteOne(
Insertable< Row> row) → Future<bool> -
Available on TableOrViewOperations<
Deletes theTbl, Row> , provided by the TableOperations extensionrowfrom the captured table. -
deleteWhere(
Expression< bool?> filter(Tbl tbl)) → Future<int> -
Available on TableOrViewOperations<
Deletes all rows matching theTbl, Row> , provided by the TableOperations extensionfilterfrom the table. -
insert(
) → InsertStatement< Tbl, Row> -
Available on TableOrViewOperations<
Creates an insert statment to be used to compose an insert on the captured table.Tbl, Row> , provided by the TableOperations extension -
insertOnConflictUpdate(
Insertable< Row> row) → Future<int> -
Available on TableOrViewOperations<
Inserts one row into the captured table, replacing an existing row if it exists already.Tbl, Row> , provided by the TableOperations extension -
insertOne(
Insertable< Row> row, {InsertMode? mode, UpsertClause<Tbl, Row> ? onConflict}) → Future<int> -
Available on TableOrViewOperations<
Inserts one row into the captured table.Tbl, Row> , provided by the TableOperations extension -
insertReturning(
Insertable< Row> row, {InsertMode? mode, UpsertClause<Tbl, Row> ? onConflict}) → Future<Row> -
Available on TableOrViewOperations<
Inserts one row into the captured table and returns it, along with auto- generated fields.Tbl, Row> , provided by the TableOperations extension -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
replace(
Insertable< Row> row) → Future<void> -
Available on TableOrViewOperations<
Replaces a single row with an update statement.Tbl, Row> , provided by the TableOperations extension -
select(
{bool distinct = false}) → SimpleSelectStatement< Tbl, Row> -
Composes a
SELECTstatement on the captured table or view. -
selectOnly(
{bool distinct = false, bool includeJoinedTableColumns = true}) → JoinedSelectStatement< Tbl, Row> -
Composes a
SELECTstatement only selecting a subset of columns. -
toString(
) → String -
A string representation of this object.
inherited
-
update(
) → UpdateStatement< Tbl, Row> -
Available on TableOrViewOperations<
Creates a statement to compose anTbl, Row> , provided by the TableOperations extensionUPDATEinto the database.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited