ViewInfo<Self extends HasResultSet, Row> class abstract

A sqlite view.

In drift, views can only be declared in .drift files.

For more information on views, see the CREATE VIEW documentation from sqlite, or the entry on sqlitetutorial.net.

Implemented types
Available extensions

Constructors

ViewInfo()

Properties

$columns List<GeneratedColumn<Object>>
All columns from this table or view.
no setterinherited
aliasedName String
The (potentially aliased) name of this table or view.
no setterinherited
asDslTable → Self
Type system sugar. Implementations are likely to inherit from both TableInfo and Tbl and can thus just return their instance.
no setterinherited
columnsByName Map<String, GeneratedColumn<Object>>
Gets all $columns in this table or view, indexed by their (non-escaped) name.
no setteroverride
createViewStatements Map<SqlDialect, String>?
The CREATE VIEW sql statement that can be used to create this view, depending on the dialect used by the current database.
no setter
createViewStmt String?
The CREATE VIEW sql statement that can be used to create this view.
no setter
entityName String
The (unalised) name of this entity in the database.
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
query Query<HasResultSet, dynamic>?
Predefined query from View.as()
no setter
readTables Set<String>
All tables that this view reads from.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

all() Selectable<Row>

Available on ResultSetImplementation<Tbl, Row>, provided by the TableOrViewStatements extension

Selects all rows that are in this table.
count({Expression<bool> where(Tbl row)?}) Selectable<int>

Available on ResultSetImplementation<Tbl, Row>, provided by the TableOrViewStatements extension

Counts the rows in this table.
createAlias(String alias) ResultSetImplementation<Self, Row>
Creates an alias of this table or view that will write the name alias when used in a query.
inherited
map(Map<String, dynamic> data, {String? tablePrefix}) FutureOr<Row>
Maps the given row returned by the database into the fitting data class.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
select({bool distinct = false}) SimpleSelectStatement<Tbl, Row>

Available on ResultSetImplementation<Tbl, Row>, provided by the TableOrViewStatements extension

Composes a SELECT statement on the captured table or view.
selectOnly({bool distinct = false}) JoinedSelectStatement<Tbl, Row>

Available on ResultSetImplementation<Tbl, Row>, provided by the TableOrViewStatements extension

Composes a SELECT 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