A portable representation of a database column.
Instances of this type contain the database-only details of a ManagedPropertyDescription.
Static Methods
-
deleteRuleForDeleteRuleString(
String rule) → ManagedRelationshipDeleteRule -
Returns inverse of deleteRuleStringForDeleteRule.
-
deleteRuleStringForDeleteRule(
ManagedRelationshipDeleteRule rule) → String -
Returns string representation of ManagedRelationshipDeleteRule.
-
typeFromTypeString(
String type) → ManagedPropertyType -
Returns inverse of typeStringForType.
-
typeStringForType(
ManagedPropertyType type) → String -
Returns string representation of ManagedPropertyType.
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, ManagedRelationshipDeleteRule rule: ManagedRelationshipDeleteRule.nullify })
-
A convenience constructor for properties that represent foreign key relationships.
Properties
- autoincrement → bool
-
Whether or not this column is autoincremented.
read / write - defaultValue → String
-
The default value for this column when inserted into a database.
read / write - deleteRule → ManagedRelationshipDeleteRule
-
The delete rule for this column if it is a foreign key column.
read / write - isForeignKey → bool
-
Whether or not this column is a foreign key column.
read-only - isIndexed → bool
-
Whether or not this column is indexed.
read / write - isNullable → bool
-
Whether or not this column is nullable.
read / write - isPrimaryKey → bool
-
Whether or not this column is the primary key of its table.
read / write - isUnique → bool
-
Whether or not this column is unique.
read / write - name → String
-
The name of this column.
read / write -
The related column if this column is a foreign key column.
read / write -
The related table name if this column is a foreign key column.
read / write - source → String
-
Returns Dart code to create this instance again in a script.
read-only - table → SchemaTable
-
The SchemaTable this column belongs to.
read / write - type → ManagedPropertyType
-
The type of this column in a
ManagedDataModel
.read / write - typeString → String
-
The
String
representation of this column's type.read-only - hashCode → int
-
The hash code for this object.
read-only, inherited - runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Operators
-
operator ==(
other) → bool -
The equality operator.
inherited
Methods
-
asMap(
) → Map<String, dynamic> -
Returns portable representation of this instance.
-
differenceFrom(
SchemaColumn column) → SchemaColumnDifference -
The differences between two columns.
-
toString(
) → String -
Returns a string representation of this object.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited