MssqlTableSchema class

What a table or view is made of, as SQL Server reports it.

Read through MssqlSchemaReader. Public rather than private to the generator because a schema drift check and any later tooling need the same answers.

Annotations
  • @immutable

Constructors

MssqlTableSchema({required String schema, required String name, required bool isView, required List<MssqlColumnSchema> columns, required MssqlPrimaryKeySchema? primaryKey, required List<MssqlForeignKeySchema> foreignKeys, List<MssqlUniqueKeySchema> uniqueKeys = const <MssqlUniqueKeySchema>[], List<MssqlTriggerSchema> triggers = const <MssqlTriggerSchema>[]})

Properties

columns List<MssqlColumnSchema>
In column_id order, which is the order the table declares them.
final
foreignKeys List<MssqlForeignKeySchema>
final
hasEnabledInsteadOfTrigger bool
Whether an enabled INSTEAD OF trigger sits on this table.
no setter
hasEnabledTrigger bool
Whether any enabled trigger sits on this table.
no setter
hashCode int
The hash code for this object.
no setterinherited
hasPrimaryKey bool
Whether a single row can be addressed at all.
no setter
identityColumn MssqlColumnSchema?
The identity column, if the table has one.
no setter
isView bool
final
name String
final
primaryKey MssqlPrimaryKeySchema?
Null when the table has none, which a view always does.
final
qualifiedName String
schema.name, unquoted, as a configuration file would write it.
no setter
quoted String
[schema].[name].
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
schema String
final
triggers List<MssqlTriggerSchema>
Every trigger on this table, enabled or not.
final
uniqueKeys List<MssqlUniqueKeySchema>
Every unique index and constraint, the primary key included.
final

Methods

column(String name) MssqlColumnSchema?
The column called name, compared without regard to ASCII case, or null.
isUnique(List<String> columns) bool
Whether columns is covered by a unique index or constraint that holds for every row.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override
uniqueKeyFor(List<String> columns, {bool requireUnconditional = true}) MssqlUniqueKeySchema?
The unique key covering exactly columns, or null.

Operators

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