MoorTable class Null safety

A parsed table, declared in code by extending Table and referencing that table in @UseMoor or @UseDao.

Inheritance
Available Extensions

Constructors

MoorTable({ClassElement? fromClass, List<MoorColumn> columns = const [], required String sqlName, required String dartTypeName, Set<MoorColumn>? primaryKey, List<Set<MoorColumn>>? uniqueKeys, String? overriddenName, bool? overrideWithoutRowId, List<String>? overrideTableConstraints, bool? overrideDontWriteConstraints, TableDeclaration? declaration, ExistingRowClass? existingRowClass, String? customParentClass, bool isStrict = false})

Properties

columns List<MoorColumn>
The columns declared in this table.
final
converters Iterable<UsedTypeConverter>
Finds all type converters used in this tables.
read-only
createVirtual String?
If this table isVirtualTable, returns the CREATE VIRTUAL TABLE statement to create this table. Otherwise returns null.
read-only
customParentClass String?
Class that added to data class as implementation
final
dartTypeName String
The name for the data class associated with this table
final
dbGetterName String
The getter name used for this table in a generated database or dao class.
read-only, override
declaration TableDeclaration?
Gets the declaration of this element, if set.
final
displayName String
A human readable name of this entity, like the table name.
read-only, override
dslName String
The name of the Dart class storing the right column getters for this type.
read-only, override
entityInfoName String
The name of the Dart class storing additional properties like type converters.
read-only, override
existingRowClass ExistingRowClass?
The existing class designed to hold a row, if there is any.
final
fromClass ClassElement?
The ClassElement for the class that declares this table or null if the table was inferred from a CREATE TABLE statement.
final
fullPrimaryKey Set<MoorColumn>
The primary key for this table.
read-only
hasExistingRowClass bool
Whether this table has an existing row class, meaning that moor doesn't have to generate one on its own.
read-only, inherited
hashCode int
The hash code for this object.
read-only, inherited
isFromSql bool
Whether this table was created from an CREATE TABLE statement instead of a Dart class.
read-only
isStrict bool
Whether this table is defined as STRICT. Support for strict tables has been added in sqlite 3.37.
final
isVirtualTable bool
Returns whether this table was created from a CREATE VIRTUAL TABLE statement in a moor file
read-only
overrideDontWriteConstraints bool?
When non-null, the generated table class will override the dontWriteConstraint getter on the table class with this value.
final
overrideTableConstraints List<String>?
When non-null, the generated table class will override the customConstraints getter in the table class with this value.
final
overrideWithoutRowId bool?
When non-null, the generated table class will override the withoutRowId getter on the table class with this value.
final
parserTable Table?
The associated table to use for the sqlparser package when analyzing sql queries. Note that this field is set lazily.
read / write
primaryKey Set<MoorColumn>?
The set of primary keys, if they have been explicitly defined by overriding primaryKey in the table class. null if the primary key has not been defined that way.
final
references Set<MoorTable>
All entities that have to be created before this entity can be created.
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
sqlName String
The (unescaped) name of this table when stored in the database
final
uniqueKeys List<Set<MoorColumn>>?
The set of unique keys if they have been explicitly defined by overriding uniqueKeys in the table class.
final

Methods

dartTypeCode([GenerationOptions options = const GenerationOptions()]) String
The type name of the Dart row class for this result set.
override
getNameForCompanionClass(MoorOptions options) String
isColumnRequiredForInsert(MoorColumn column) bool
Determines whether column would be required for inserts performed via companions.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

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