[Persistence] Delete members, read data before adding new one

Signed-off-by: Sahil Kumar <[email protected]>
This commit is contained in:
Sahil Kumar
2021-01-29 19:17:07 +05:30
parent ab9266bfeb
commit e85a4326d6
6 changed files with 61 additions and 12 deletions
@@ -13,7 +13,7 @@ class ReadDao extends DatabaseAccessor<MoorChatDatabase> with _$ReadDaoMixin {
/// Creates a new read dao instance
ReadDao(MoorChatDatabase db) : super(db);
/// Get all reads where [reads.channelCid] matches [cid]
/// Get all reads where [Reads.channelCid] matches [cid]
Future<List<Read>> getReadsByCid(String cid) async {
return (select(reads).join([
leftOuterJoin(users, reads.userId.equalsExp(users.id)),