SchemaSnapshot class
The schema of every table and index reachable from a set of schemas, rendered for one dialect.
This describes the schema itself. It carries no identity and no format version: those belong to whatever document embeds it, such as the CLI's migration snapshots.
- Annotations
-
- @immutable
Constructors
-
SchemaSnapshot({required String dialect, required Map<
String, TableSnapshot> tables, Map<String, IndexSnapshot> indexes = const {}}) -
Creates a snapshot of a complete schema.
const
-
SchemaSnapshot.fromMap(Map<
String, dynamic> data) -
Creates a schema snapshot from a map.
factory
Properties
- dialect → String
-
The SQL dialect this schema was rendered for, such as
sqlite.final - hashCode → int
-
The hash code for this object.
no setterinherited
-
indexes
→ Map<
String, IndexSnapshot> -
Map of index name to index snapshot.
final
-
indexInfos
→ List<
IndexInfo> -
The indexes as the IndexInfo the DDL generators consume.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
tableInfos
→ List<
TableInfo> -
The tables as the TableInfo the DDL generators consume.
no setter
-
tables
→ Map<
String, TableSnapshot> -
Map of table name to table snapshot.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toMap(
) → Map< String, dynamic> - Converts the schema snapshot to a map.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited