Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(firestore): count() feature for counting documents without retrieving documents. #9699

Merged
merged 30 commits into from
Oct 18, 2022
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
1f2ffc0
feat(firestore): count feature. Dart implementation
russellwheatley Oct 10, 2022
bb0a9f5
feat(firestore): count feature. Dart implementation.
russellwheatley Oct 10, 2022
0e23ec0
feat(firestore): reverted iOS firestore change
russellwheatley Oct 10, 2022
7735485
feat(firestore): count(). Wire up user facing code
russellwheatley Oct 10, 2022
4dc2547
feat(firestore): count(). Wire up web implementation
russellwheatley Oct 10, 2022
1d130f7
feat(firestore): count(). clean up method channel & PI
russellwheatley Oct 10, 2022
e58846e
feat(firestore): count(). e2e test.
russellwheatley Oct 10, 2022
926cf58
feat(firestore): remove static.
russellwheatley Oct 10, 2022
1f25a58
feat(firestore): correct init of data
russellwheatley Oct 10, 2022
371ed9d
feat(firestore): count() API. licenses and inline documentation
russellwheatley Oct 10, 2022
467ce69
feat(firestore): expose Query on AggregateQuery
russellwheatley Oct 10, 2022
d25bca7
feat(firestore): count(). add unit test for user code
russellwheatley Oct 10, 2022
0a4f218
feat(firestore): count(). universal code unit test
russellwheatley Oct 10, 2022
36a1c99
feat(firestore): count(). unit tests
russellwheatley Oct 10, 2022
4c71036
feat(firestore): update code comment
russellwheatley Oct 10, 2022
93f612f
feat(firestore): count() API. iOS implementation
russellwheatley Oct 11, 2022
e5a860e
feat(firestore): count() API. format.
russellwheatley Oct 11, 2022
68c2137
feat(firestore): count() API e2e skip android
russellwheatley Oct 11, 2022
3fe511d
feat(firestore): count() API. expose query on snapshot
russellwheatley Oct 11, 2022
585c82a
feat(firestore): count() API. format
russellwheatley Oct 11, 2022
2893c80
feat(firestore): count() API. wording
russellwheatley Oct 11, 2022
bdc6889
feat(firestore): count() API. remove Firestore from test project
russellwheatley Oct 11, 2022
3c87ec5
feat(ios): update swiftformat and add back curly brace
russellwheatley Oct 11, 2022
b312ec8
fix(firestore): add nanopb pod to example
russellwheatley Oct 12, 2022
0a90db2
feat(firestore): implement android
russellwheatley Oct 13, 2022
6343092
feat(firestore): update iOS count()
russellwheatley Oct 13, 2022
4723bc7
test(firestore): update unit test
russellwheatley Oct 13, 2022
958db10
Merge branch 'master' into @russell/firestore-count
russellwheatley Oct 18, 2022
dd93f0f
chore: rm nanopb from example app
russellwheatley Oct 18, 2022
8f36e58
chore: rm foundation import
russellwheatley Oct 18, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions packages/cloud_firestore/cloud_firestore/example/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ end

post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
end
flutter_additional_ios_build_settings(target)
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import 'dart:math';

import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:firebase_core/firebase_core.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter_test/flutter_test.dart';

void runQueryTests() {
Expand Down Expand Up @@ -1807,6 +1808,29 @@ void runQueryTests() {
},
timeout: const Timeout.factor(3),
);

test(
'count()',
() async {
final collection = await initializeTest('count');

await Future.wait([
collection.add({'foo': 'bar'}),
collection.add({'bar': 'baz'})
]);

AggregateQuery query = collection.count();

AggregateQuerySnapshot snapshot = await query.get();

expect(
snapshot.count,
2,
);
// TODO(russellwheatley): remove when android code implemented
},
skip: defaultTargetPlatform == TargetPlatform.android,
);
});
});
}