TableDefinition class abstract

The definition of a (desired) table in the database.

Constructors

TableDefinition({required String name, String? dartName, String? module, required String schema, String? tableSpace, required List<ColumnDefinition> columns, required List<ForeignKeyDefinition> foreignKeys, required List<IndexDefinition> indexes, bool? managed})
factory
TableDefinition.fromJson(Map<String, dynamic> jsonSerialization, SerializationManager serializationManager)
factory

Properties

columns List<ColumnDefinition>
All the columns of this table.
getter/setter pair
dartName String?
The name of the serializable class in Dart.
getter/setter pair
foreignKeys List<ForeignKeyDefinition>
All the foreign keys.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
indexes List<IndexDefinition>
All the indexes of this table.
getter/setter pair
managed bool?
Indicates if the table should be managed by Serverpod. Null, if this is unknown.
getter/setter pair
module String?
The name of the module this table belongs to, if available.
getter/setter pair
name String
The table name.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
schema String
The schema this table is in.
getter/setter pair
tableSpace String?
The tablespace this table is stored in. If null, the table is in the databases default tablespace.
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? dartName, String? module, String? schema, String? tableSpace, List<ColumnDefinition>? columns, List<ForeignKeyDefinition>? foreignKeys, List<IndexDefinition>? indexes, bool? managed}) TableDefinition
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