ColumnDefinition class

Column definition for Blueprint.

Represents a single column in a table schema with its type, constraints, and modifiers.

Constructors

ColumnDefinition(String name, String type)
Create a new column definition.

Properties

defaultVal ↔ dynamic
Default value for the column.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
isAutoIncrement bool
Whether this column auto-increments.
getter/setter pair
isNullable bool
Whether the column can be null.
getter/setter pair
isPrimaryKey bool
Whether this is a primary key.
getter/setter pair
isUnique bool
Whether this column must be unique.
getter/setter pair
name String
The column name.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type String
The SQLite column type.
final

Methods

defaultValue(dynamic value) ColumnDefinition
Set a default value for this column.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
nullable() ColumnDefinition
Mark this column as nullable.
toAddColumnSql(String tableName) String
Generate ALTER TABLE ADD COLUMN SQL.
toSql() String
Generate the SQL for this column.
toString() String
A string representation of this object.
inherited
unique() ColumnDefinition
Mark this column as unique.

Operators

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