VirtualTableInfo<TableDsl extends Table, D> mixin Null safety

Additional interface for tables in a drift file that have been created with an CREATE VIRTUAL TABLE STATEMENT.

Superclass Constraints

Constructors

VirtualTableInfo()

Properties

moduleAndArgs String
Returns the module name and the arguments that were used in the statement that created this table. In that sense, CREATE VIRTUAL TABLE <name> USING <moduleAndArgs>; can be used to create this table in sql.
read-only
asDslTable → TableDsl
Type system sugar. Implementations are likely to inherit from both TableInfo and Tbl and can thus just return their instance.
read-only, inherited
$primaryKey Set<GeneratedColumn>
The primary key of this table. Can be empty if no custom primary key has been specified. [...]
read-only, inherited
primaryKey Set<Column>
Override this to specify custom primary keys: [...]
read-only, inherited
$tableName String
The table name in the sql table. This can be an alias for the actual table name. See actualTableName for a table name that is not aliased.
@Deprecated('Use aliasedName instead'), read-only, inherited
aliasedName String
The (potentially aliased) name of this table or view. [...]
read-only, inherited
actualTableName String
The name of the table in the database. Unless $tableName, this can not be aliased.
read-only, inherited
entityName String
The (unalised) name of this entity in the database.
read-only, inherited
columnsByName Map<String, GeneratedColumn>
Gets all $columns in this table, indexed by their (non-escaped) name.
read-only, inherited
hashCode int
The hash code for this object. [...]
read-only, inherited
tableName String?
The sql table name to be used. By default, drift will use the snake_case representation of your class name as the sql table name. For instance, a Table class named LocalSettings will be called local_settings by default. You can change that behavior by overriding this method to use a custom name. Please note that you must directly return a string literal by using a getter. For instance @override String get tableName => 'my_table'; is valid, whereas @override final String tableName = 'my_table'; or @override String get tableName => createMyTableName(); is not.
@visibleForOverriding, read-only, inherited
withoutRowId bool
Whether to append a WITHOUT ROWID clause in the CREATE TABLE statement. This is intended to be used by generated code only.
read-only, inherited
dontWriteConstraints bool
Drift will write some table constraints automatically, for instance when you override primaryKey. You can turn this behavior off if you want to. This is intended to be used by generated code only.
read-only, inherited
customConstraints List<String>
Custom table constraints that should be added to the table. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
$columns List<GeneratedColumn>
All columns from this table or view.
read-only, inherited

Methods

validateIntegrity(Insertable<D> instance, {bool isInserting = false}) VerificationContext
Validates that the given entity can be inserted into this table, meaning that it respects all constraints (nullability, text length, etc.).
inherited
mapFromCompanion(Insertable<D> companion) → D
Converts a companion to the real model class, D. [...]
inherited
createAlias(String alias) TableInfo<TableDsl, D>
Creates an alias of this table or view that will write the name alias when used in a query.
inherited
integer() ColumnBuilder<int>
Use this as the body of a getter to declare a column that holds integers. Example (inside the body of a table class): [...]
@protected, inherited
intEnum<T>() ColumnBuilder<int>
Creates a column to store an enum class T. [...]
@protected, inherited
text() ColumnBuilder<String>
Use this as the body of a getter to declare a column that holds strings. Example (inside the body of a table class): [...]
@protected, inherited
boolean() ColumnBuilder<bool>
Use this as the body of a getter to declare a column that holds bools. Example (inside the body of a table class): [...]
@protected, inherited
dateTime() ColumnBuilder<DateTime>
Use this as the body of a getter to declare a column that holds date and time. Note that DateTime values are stored on a second-accuracy. Example (inside the body of a table class): [...]
@protected, inherited
blob() ColumnBuilder<Uint8List>
Use this as the body of a getter to declare a column that holds arbitrary data blobs, stored as an Uint8List. Example: [...]
@protected, inherited
real() ColumnBuilder<double>
Use this as the body of a getter to declare a column that holds floating point numbers. Example [...]
@protected, inherited
toString() String
A string representation of this object. [...]
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
map(Map<String, dynamic> data, {String? tablePrefix}) → D
Maps the given row returned by the database into the fitting data class.
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited