ColumnInfo class

Column information for DDL generation.

This is a simple data class that holds the information needed to generate DDL statements, decoupled from the CLI's snapshot types.

Annotations
  • @immutable

Constructors

ColumnInfo({required String name, required String type, required bool isNullable, bool primaryKey = false, bool autoIncrement = false, String? defaultValue, ForeignKeyInfo? foreignKey})
Column information for DDL generation.
const
ColumnInfo.fromMap(Map<String, dynamic> map)
Creates a ColumnInfo from a map representation.
factory

Properties

autoIncrement → bool
Whether this column auto-increments.
final
defaultValue → String?
The default value expression.
final
foreignKey → ForeignKeyInfo?
Foreign key constraint information.
final
hashCode → int
The hash code for this object.
no setteroverride
isNullable → bool
Whether the column is nullable.
final
name → String
The column name.
final
primaryKey → bool
Whether this is a primary key column.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
type → String
The SQL type (e.g., 'INTEGER', 'TEXT', 'TIMESTAMP').
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMap() → Map<String, dynamic>
Converts this column info to a map representation.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
override