ResultSetImplementation<Tbl, Row> class
abstract
Interface for schema entities that have a result set.
Tbl
is the generated Dart class which implements ResultSetImplementation
and the user-defined Table class. Row
is the class used to hold a result
row.
- Inheritance
-
- Object
- DatabaseSchemaEntity
- ResultSetImplementation
- Implementers
- Available extensions
Constructors
Properties
-
$columns
→ List<
GeneratedColumn< Object> > -
All columns from this table or view.
no setter
- aliasedName → String
-
The (potentially aliased) name of this table or view.
no setter
- asDslTable → Tbl
-
Type system sugar. Implementations are likely to inherit from both
TableInfo and
Tbl
and can thus just return their instance.no setter - attachedDatabase → DatabaseConnectionUser
-
The generated database instance that this view or table is attached to.
no setter
-
columnsByName
→ Map<
String, GeneratedColumn< Object> > -
Gets all $columns in this table or view, indexed by their (non-escaped)
name.
no setter
- entityName → String
-
The (unalised) name of this entity in the database.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- tableWithAlias → String
-
Available on ResultSetImplementation, provided by the NameWithAlias extension
The table name, optionally suffixed with the alias if one exists. This can be used in select statements, as it returns something like "users u" for a table called users that has been aliased as "u".no setter
Methods
-
all(
) → Selectable< Row> -
Available on ResultSetImplementation<
Selects all rows that are in this table.Tbl, Row> , provided by the TableOrViewStatements extension -
count(
{Expression< bool> where(Tbl row)?}) → Selectable<int> -
Available on ResultSetImplementation<
Counts the rows in this table.Tbl, Row> , provided by the TableOrViewStatements extension -
createAlias(
String alias) → ResultSetImplementation< Tbl, Row> -
Creates an alias of this table or view that will write the name
alias
when used in a query. -
map(
Map< String, dynamic> data, {String? tablePrefix}) → FutureOr<Row> - Maps the given row returned by the database into the fitting data class.
-
mapFromRow(
QueryRow row, {String? tablePrefix}) → Future< D> -
Available on ResultSetImplementation<
Like map, but from aTableDsl, D> , provided by the TableInfoUtils extensionrow
instead of the low-level map. -
mapFromRowOrNull(
QueryRow row, {String? tablePrefix}) → Future< D?> -
Available on ResultSetImplementation<
Like mapFromRow, but returns null if a non-nullable column of this table is null inTableDsl, D> , provided by the TableInfoUtils extensionrow
. -
mapFromRowWithAlias(
QueryRow row, Map< String, String> alias) → Future<D> -
Available on ResultSetImplementation<
Like mapFromRow, but maps columns from the result throughTableDsl, D> , provided by the TableInfoUtils extensionalias
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
select(
{bool distinct = false}) → SimpleSelectStatement< Tbl, Row> -
Available on ResultSetImplementation<
Composes aTbl, Row> , provided by the TableOrViewStatements extensionSELECT
statement on the captured table or view. -
selectOnly(
{bool distinct = false}) → JoinedSelectStatement< Tbl, Row> -
Available on ResultSetImplementation<
Composes aTbl, Row> , provided by the TableOrViewStatements extensionSELECT
statement only selecting a subset of columns. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited