DatabaseDefinition class abstract

Defines the structure of the database used by Serverpod.

Constructors

DatabaseDefinition({String? name, required String moduleName, required List<TableDefinition> tables, required List<DatabaseMigrationVersion> installedModules, required int migrationApiVersion})
factory
DatabaseDefinition.fromJson(Map<String, dynamic> jsonSerialization, SerializationManager serializationManager)
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
installedModules List<DatabaseMigrationVersion>
Modules installed in the database, together with their version. Only set if known.
getter/setter pair
migrationApiVersion int
The version of the database definition.
getter/setter pair
moduleName String
The name of the module that defines the database.
getter/setter pair
name String?
The name of the database. Null if the name is not available.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tables List<TableDefinition>
The tables of the database.
getter/setter pair

Methods

allToJson() → dynamic
Returns a serialized JSON structure of the model which also includes fields used by the database.
inherited
copyWith({String? name, String? moduleName, List<TableDefinition>? tables, List<DatabaseMigrationVersion>? installedModules, int? migrationApiVersion}) DatabaseDefinition
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Returns a serialized JSON structure of the model, ready to be sent through the API. This does not include fields that are marked as database only.
toString() String
A string representation of this object.
inherited

Operators

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