ColumnSnapshot class

Represents a snapshot of a single column.

Annotations
  • @immutable

Constructors

ColumnSnapshot({required String name, required String type, required bool isNullable, bool primaryKey = false, bool autoIncrement = false, String? defaultValue, ForeignKeySnapshotRef? foreignKey})
Creates a snapshot of a single column.
const
ColumnSnapshot.fromMap(String name, Map<String, dynamic> data)
Creates a column snapshot from a map.
factory

Properties

autoIncrement bool
Whether this column auto-increments.
final
defaultValue String?
The default value expression.
final
foreignKey ForeignKeySnapshotRef?
Foreign key reference 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 ('INTEGER', 'TEXT', 'TIMESTAMP').
final

Methods

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

Operators

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