MoorColumn class

A column, as specified by a getter in a table.

Implemented types
Available Extensions

Constructors

MoorColumn({required ColumnType type, required String dartGetterName, required ColumnName name, String? overriddenJsonName, String? customConstraints, bool nullable = false, List<ColumnFeature> features = const [], String? defaultArgument, String? clientDefaultCode, UsedTypeConverter? typeConverter, ColumnDeclaration? declaration, String? documentationComment, ColumnGeneratedAs? generatedAs})

Properties

clientDefaultCode String?
Dart code for the clientDefault expression, or null if it hasn't been set.
final
customConstraints String?
If this columns has custom constraints that should be used instead of the default ones.
final
dartGetterName String
The getter name of this column in the table class. It will also be used as getter name in the TableInfo class (as it needs to override the field) and in the generated data class that will be generated for each table.
final
declaration ColumnDeclaration?
The declaration of this column, contains information about where this column was created in source code.
final
declaredInMoorFile bool
Whether this column was declared inside a moor file.
no setter
defaultArgument String?
Dart code that generates the default expression for this column, or null if there is no default expression.
final
documentationComment String?
The documentation comment associated with this column
final
dslColumnTypeName String
The column type from the dsl library. For instance, if a table has declared an IntColumn, the matching dsl column name would also be an IntColumn.
no setter
features List<ColumnFeature>
final
generatedAs ColumnGeneratedAs?
final
hasAI bool
Whether this column has auto increment.
no setter
hashCode int
The hash code for this object.
no setterinherited
isArray bool
Whether this type is an array in sql.
no setteroverride
isGenerated bool
no setter
name ColumnName
The name of this column, as chosen by the user
final
nullable bool
Whether the user has explicitly declared this column to be nullable, the default is false
final
overriddenJsonName String?
An (optional) name to use as a json key instead of the dartGetterName.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
table MoorTable?
Parent table
getter/setter pair
type ColumnType
The sql type of this column
final
typeConverter UsedTypeConverter?
The UsedTypeConverter, if one has been set on this column.
final

Methods

getJsonKey([MoorOptions options = const MoorOptions.defaults()]) String
innerColumnType([GenerationOptions options = const GenerationOptions()]) String
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sqlType() → SqlType
toString() String
A string representation of this object.
inherited

Operators

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