PlatformPostRepository class

Repository to manage post objects.

Constructors

PlatformPostRepository()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

countAll() int
Counts all posts that exist in database.
create(PlatformPost post) Future<void>
When post is created also embedded objects are persisted and created.
createAll(List<PlatformPost> posts) Future<void>
When posts are created also embedded objects are persisted and created.
exists(String id) bool
Checks if post exists in database.
get(String id) PlatformPost?
Sync get call (should not be used in context with async create).
getAll({bool? sort = false}) List<PlatformPost>
Sync getAll call (should not be used in context with async create).
getAsync(String id) Future<PlatformPost?>
Async get call.
getByConversationId(String id) List<PlatformPost>
Returns posts filtered by conversation id.
getByIds(List<String> ids) Future<List<PlatformPost?>>
Async getAll call.
getByUserId(String userId) List<PlatformPost>
Returns posts filtered by author id.
getByUserIdAsync(String userId) Future<List<PlatformPost>>
Returns posts filtered by author id.
getByUserIds(List<String> userIds) List<PlatformPost>
Returns posts filtered by author ids.