Skip to content

Commit

Permalink
feat: fix export
Browse files Browse the repository at this point in the history
  • Loading branch information
alextekartik committed Aug 23, 2023
1 parent 173ea04 commit c64215c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion firestore_sembast/lib/utils/export_utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export 'package:sembast/utils/sembast_import_export.dart'
extension TekartikSembastUtils on Firestore {
/// Export the database as a list of json encodable lines
Future<List<Object>> exportLines(
{required List<CollectionReference>? collections,
{List<CollectionReference>? collections,
List<DocumentReference>? documents}) async {
if (this is! FirestoreSembast) {
if (!service.supportsListCollections) {
Expand Down
4 changes: 4 additions & 0 deletions firestore_sembast/test/export_utils_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ void main() {
expect(export, [
{'sembast_export': 1, 'version': 1}
]);
export = await firestore.exportLines();
expect(export, [
{'sembast_export': 1, 'version': 1}
]);
await firestore.doc('test/doc').set({'test': 1});
export = await firestore
.exportLines(collections: [firestore.collection('test')]);
Expand Down

0 comments on commit c64215c

Please sign in to comment.