getPendingUpSync method
Future<List<OpLogEntry<PgrServiceModel> > >
getPendingUpSync(
- DataModelType type, {
- required String createdBy,
override
Implementation
@override
Future<List<OpLogEntry<PgrServiceModel>>> getPendingUpSync(
DataModelType type, {
required String createdBy,
}) async {
final pendingEntries = await isar.opLogs
.filter()
.entityTypeEqualTo(type)
.operationEqualTo(DataOperation.create)
.serverGeneratedIdIsNull()
.syncedUpEqualTo(false)
.syncedDownEqualTo(false)
.createdByEqualTo(createdBy)
.sortByCreatedAt()
.findAll();
final entriesList = pendingEntries.map((e) {
return OpLogEntry.fromOpLog<PgrServiceModel>(e);
}).toList();
return entriesList;
}