TetherColumnInfo class

Represents details about a single column within a database table.

Constructors

TetherColumnInfo({required String name, required String originalName, String? localName, required String type, required bool isNullable, required bool isPrimaryKey, required bool isUnique, String? defaultValue, String? comment, bool isIdentity = false})
Creates an instance of TetherColumnInfo.
TetherColumnInfo.fromJson(Map<String, dynamic> json)
Creates a TetherColumnInfo instance from a JSON map (deserialization). Handles missing fields from older data formats with default values.
factory
TetherColumnInfo.fromRow(List row, String nameConverter(String))
Creates a TetherColumnInfo instance from a raw SQL query result row.
factory

Properties

comment → String?
The comment associated with the column in the database, if any.
final
defaultValue → String?
The default value of the column, if any, as a string representation. Example: CURRENT_TIMESTAMP, \'active\'::character varying.
final
hashCode → int
The hash code for this object.
no setterinherited
isIdentity → bool
Indicates whether the column is an identity column (e.g., auto-incrementing). For PostgreSQL, this corresponds to is_identity = \'YES\'.
final
isNullable → bool
Indicates whether the column can store NULL values.
final
isPrimaryKey → bool
Indicates whether this column is part of the table's primary key.
final
isUnique → bool
Indicates whether this column has a unique constraint.
final
localName → String
A Dart-safe identifier name for the column, avoiding keyword conflicts. If originalName is a Dart keyword (e.g., is), localName might be isField.
final
name → String
The name of the column, converted to camelCase for Dart conventions. Example: user_name becomes userName.
final
originalName → String
The original database name of the column. Example: user_name.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
type → String
The data type of the column as defined in the database (e.g., TEXT, INTEGER, TIMESTAMPZ).
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
Converts this TetherColumnInfo instance to a JSON map for serialization.
toString() → String
A string representation of this object.
override

Operators

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