Skip to content

Commit

Permalink
feat(sembast): add getDb method to SembastHelper
Browse files Browse the repository at this point in the history
Signed-off-by: Vatsal Gandhi <[email protected]>
  • Loading branch information
vatsal201 committed May 23, 2024
1 parent b32afdb commit 333608c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/src/fa_flutter_sembast/base/sembast_app_db.dart
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,8 @@ abstract class SembastHelper {

/// Delete records
Future<List<K?>> deleteList<K, V>(RecordsRef<K, V> recordsRef);

/// Get the database instance.
@Deprecated("Temporary fix to get the database instance.")
Database getDb();
}
5 changes: 5 additions & 0 deletions lib/src/fa_flutter_sembast/client/sembast_app_db_impl.dart
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,9 @@ class SembastHelperImpl implements SembastHelper {
final values = await recordsRef.delete(_db);
return values;
}

@override
Database getDb() {
return _db;
}
}

0 comments on commit 333608c

Please sign in to comment.