SerializableModelFieldDefinition class
Describes a single field of a ClassDefinition.
Constructors
-
SerializableModelFieldDefinition({required String name, required TypeDefinition type, required ModelFieldScopeDefinition scope, required bool shouldPersist, RelationDefinition? relation, List<
String> ? documentation}) - Create a new SerializableModelFieldDefinition.
Properties
-
documentation
→ List<
String> ? -
The documentation of this field, line by line.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
indexes
↔ List<
SerializableModelIndexDefinition> -
Indexes that this field is part of.
getter/setter pair
- isSymbolicRelation → bool
-
Returns true, if this field has a relation pointer to/from another field
with relation type
ForeignRelationDefinition
. This means that this field relation does not propagate to the database, but instead is managed by the other field.no setter - name → String
-
The name of the field.
final
- relation ↔ RelationDefinition?
-
If set the field is a relation to another table. The type of the relation
ForeignRelationDefinition
,ObjectRelationDefinition
orListRelationDefinition
determines where and how the relation is stored.getter/setter pair - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scope → ModelFieldScopeDefinition
-
The scope of the field.
It tells us if the field should only be present
in a certain context.
final
- shouldPersist → bool
-
final
- type ↔ TypeDefinition
-
The type of the field.
getter/setter pair
Methods
-
Returns true, if this is serialized field that should be hidden.
serverCode
specifies if it's code on the server or client side. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
shouldIncludeField(
bool serverCode) → bool -
Returns true, if classes should include this field.
serverCode
specifies if it's a code on the server or client side. -
shouldSerializeField(
bool serverCode) → bool -
Returns true, if this field should be added to the serialization.
serverCode
specifies if it's code on the server or client side. -
shouldSerializeFieldForDatabase(
bool serverCode) → bool -
Returns true, if this field should be added to the serialization for the
database.
serverCode
specifies if it's code on the server or client side. This method should only be called for server side code. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited