DbColumn class

A database column representation

Constructors

DbColumn({@required String name, @required DbColumnType type, bool unique = false, bool nullable = false, String check, String defaultValue, bool isForeignKey = false, String reference, OnDelete onDelete})
Provide a name and a type
const

Properties

check String
A check constraint
final
defaultValue String
The column-s default value
final
hashCode int
The hash code for this object. [...]
read-only, inherited
isForeignKey bool
If the column is a foreign key
final
name String
The column name
final
nullable bool
Is the column nullable
final
onDelete OnDelete
The on delete constraint on a foreign key
final
reference String
A foreign key table name reference
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
type DbColumnType
The data type of the column
final
unique bool
Is the column unique
final

Methods

describe({String spacer = "", bool isPrint = true}) String
print a description of the schema
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
A string representation of this object. [...]
override
typeToString() String
convert a column type to a string

Operators

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