PlexEntityCollection<T extends PlexEntity> class

Implemented types
Available extensions

Constructors

PlexEntityCollection(String name, Database _database, T fromJson(Map<String, dynamic> map), Map<String, dynamic> toJson(T))

Properties

collection PlexCollection
no setteroverride
fromJson ↔ T Function(Map<String, dynamic> map)
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
name String
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
toJson Map<String, dynamic> Function(T)
getter/setter pair

Methods

belongsTo<R extends PlexEntity>(PlexEntityCollection<R> related, String localForeignKey) PlexRelation<T, R>

Available on PlexEntityCollection<T>, provided by the PlexRelationExtension extension

Define a belongs-to relation: each T belongs to one R via localForeignKey on this entity.
delete(T record) Future
deleteById(int id) Future
getAll() Future<List<T>>
getById(int id) Future<T?>
hasMany<R extends PlexEntity>(PlexEntityCollection<R> related, String foreignKey) PlexRelation<T, R>

Available on PlexEntityCollection<T>, provided by the PlexRelationExtension extension

Define a has-many relation: each T has many R via foreignKey on the related collection.
insert(T record) Future
insertAll(List<T> records) Future
mapFromMaps(List<Map<String, dynamic>> maps) List<T>
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
query() PlexQuery<T>
Start a fluent query.
toString() String
A string representation of this object.
inherited
update(T record) Future
watchAll() Stream<List<T>>
Stream of all entities; emits whenever the collection changes.
watchById(int id) Stream<T?>
Stream of a single entity by id; emits whenever it changes.

Operators

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