SchemaSnapshot.fromJson constructor
Implementation
factory SchemaSnapshot.fromJson(Map<String, Object?> json) => SchemaSnapshot(
schemas: (json['schemas'] as List)
.map(
(entry) =>
SchemaNamespace.fromJson(Map<String, Object?>.from(entry as Map)),
)
.toList(),
tables: (json['tables'] as List)
.map(
(entry) =>
SchemaTable.fromJson(Map<String, Object?>.from(entry as Map)),
)
.toList(),
views: (json['views'] as List)
.map(
(entry) =>
SchemaView.fromJson(Map<String, Object?>.from(entry as Map)),
)
.toList(),
columns: (json['columns'] as List)
.map(
(entry) =>
SchemaColumn.fromJson(Map<String, Object?>.from(entry as Map)),
)
.toList(),
indexes: (json['indexes'] as List)
.map(
(entry) =>
SchemaIndex.fromJson(Map<String, Object?>.from(entry as Map)),
)
.toList(),
foreignKeys: (json['foreignKeys'] as List)
.map(
(entry) => SchemaForeignKey.fromJson(
Map<String, Object?>.from(entry as Map),
),
)
.toList(),
);