SchemaColumn class

A portable representation of a database column.

Instances of this type contain the database-only details of a ManagedPropertyDescription.

Constructors

SchemaColumn(String? name, ManagedPropertyType type, {bool? isIndexed = false, bool? isNullable = false, bool? autoincrement = false, bool? isUnique = false, String? defaultValue, bool? isPrimaryKey = false})
Creates an instance of this type from name, type and other properties.
SchemaColumn.empty()
Creates an empty instance of this type.
SchemaColumn.from(SchemaColumn otherColumn)
Creates a copy of otherColumn.
SchemaColumn.fromMap(Map<String, dynamic> map)
Creates an instance of this type from map.
SchemaColumn.fromProperty(ManagedPropertyDescription desc)
Creates an instance of this type to mirror desc.
SchemaColumn.relationship(String? name, ManagedPropertyType type, {bool? isNullable = true, bool? isUnique = false, String? relatedTableName, String? relatedColumnName, DeleteRule rule = DeleteRule.nullify})
A convenience constructor for properties that represent foreign key relationships.

Properties

autoincrement bool?
Whether or not this column is autoincremented.
getter/setter pair
defaultValue String?
The default value for this column when inserted into a database.
getter/setter pair
deleteRule DeleteRule?
The delete rule for this column if it is a foreign key column.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
isForeignKey bool
Whether or not this column is a foreign key column.
no setter
isIndexed bool?
Whether or not this column is indexed.
getter/setter pair
isNullable bool?
Whether or not this column is nullable.
getter/setter pair
isPrimaryKey bool?
Whether or not this column is the primary key of its table.
getter/setter pair
isUnique bool?
Whether or not this column is unique.
getter/setter pair
name String?
The name of this column.
getter/setter pair
relatedColumnName String?
The related column if this column is a foreign key column.
getter/setter pair
relatedTableName String?
The related table name if this column is a foreign key column.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
table SchemaTable?
The SchemaTable this column belongs to.
getter/setter pair
type ManagedPropertyType?
The type of this column in a ManagedDataModel.
getter/setter pair
typeString String?
The String representation of this column's type.
no setter

Methods

asMap() Map<String, dynamic>
Returns portable representation of this instance.
differenceFrom(SchemaColumn column) SchemaColumnDifference
The differences between two columns.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

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

Static Methods

deleteRuleForDeleteRuleString(String? rule) DeleteRule?
Returns inverse of deleteRuleStringForDeleteRule.
deleteRuleStringForDeleteRule(DeleteRule? rule) String?
Returns string representation of DeleteRule.
typeFromTypeString(String? type) ManagedPropertyType?
Returns inverse of typeStringForType.
typeStringForType(ManagedPropertyType? type) String?
Returns string representation of ManagedPropertyType.