PostgrestPartialRow<Row> class
final
A row of a select list, as returned by
PostgrestTypedQueryBuilder.selectOnly and
PostgrestTypedTransformBuilder.selectOnly.
Values are read through the entries of the list, so the entry's type types the read and an entry of another table does not compile:
final books = await client
.table(Books.table)
.selectOnly([
Books.id,
Books.title,
Books.author.select([Authors.name]),
]);
for (final book in books) {
final int id = book.read(Books.id);
final String? authorName = book.read(Books.author)?.read(Authors.name);
}
Reading an entry the list did not ask for throws a StateError naming it, instead of the null cast a getter of the full row type would fail with.
- Annotations
-
- @experimental
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
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
read<
Output> (PostgrestReadable< Row, Output> entry) → Output -
The value of
entryin this row. -
toJson(
) → Map< String, dynamic> - The row as decoded from the response.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited