Commit Graph
819 Commits
Author SHA1 Message Date
Mila 3f5972f920 Firestore: Optimize local cache sync when resuming a query that had docs deleted (#11457) 2023-06-20 12:10:39 -04:00
Tom Andersen f2194c8a3c Allow initializing FIRLocalCacheSettings with unlimited size. (#11405)
* Allow initializing FIRLocalCacheSettings with unlimited size.

* Add changelog.

* Add test

* Fix bug

* Add import

* Add import

* Exercise db with CacheSizeUnlimited

* Fix
2023-06-07 19:53:52 -04:00
wu-hui 8066d190fc Suppress warning from boringssl (#11281)
* Suppress warning from boringssl

* Try out target exclusion

* Skip a failed tsan test

* Add todo
2023-05-18 19:32:56 -04:00
Mark Duckworth 52ebbbf19d Sum and average (#11108)
This is implementation but not public release of sum and average. The sum/avg API is not made public. There are no API changes in this PR.
2023-05-12 13:56:16 -06:00
Denver Coneybeare cead23010b Sync spec tests with changes from https://github.com/firebase/firebase-js-sdk/pull/7285 (#11245) 2023-05-08 18:10:21 -04:00
Tom Andersen f669bcf947 Add equality operator on aggregate query. (#11200)
* Add equality operator on aggregate query.

* Revert file not to have been included in previous commit.

* Add AggregateQuery tests

* Pretty

* Copyright

* Undo

* Improve aggregate query tests.

* Pretty

* Add test to Xcode
2023-05-08 11:43:04 -04:00
Denver Coneybeare a00925f7eb FIRQueryTests.mm: improve the test that resumes a query with existence filter to actually validate the existence filter (#11209) 2023-05-05 14:58:26 -04:00
Denver Coneybeare 0c58855437 Firestore: FIRQueryTests.mm: add a test that resumes a query with existence filter (#10974) 2023-05-02 11:32:33 -04:00
Tom Andersen bb89505e46 Add TARGET_BACKEND environment variable. #no-changelog (#11182)
* Add TARGET_BACKEND environment variable.

* Add TARGET_BACKEND environment variable.
2023-04-27 16:21:15 -04:00
Denver Coneybeare a50209c3ac Firestore Spec Tests: Port JS PR 7257 (use strings for targetPurpose) (#11191) 2023-04-26 14:54:14 -04:00
Denver Coneybeare 36ac6fe33d Firestore Spec Tests: Port JS PR 7229 (optimized query resumption using bloom filter) (#11185) 2023-04-26 14:30:04 -04:00
Denver Coneybeare 82f253406e Firestore Spec Tests: Port JS PR 7021 (bundle the readTime and resumeToken) (#11183) 2023-04-26 14:22:48 -04:00
wu-hui 15a38d32c8 Lru Memory GC (#10905)
Adds LRU gc for memory cache.
2023-04-18 13:00:05 -04:00
wu-hui 7c8becdbba New Cache Config API (#11057) 2023-04-13 20:52:14 -04:00
Mila 3d077ea661 Validate QueryPurpose in spec test (#10954) 2023-03-16 15:00:41 -07:00
cherylEnkidu b2383a9d3c Reorganize OR query test (#10902)
* Reorganize OR query test

* Address comments

* Change message
2023-03-14 22:48:51 -04:00
cherylEnkiduandEhsan Nasiri c0e6ac1cf2 Add Public API for Or Query (#10352)
* Add Public API for Or Query

* Add Or query swift tests

* Add Swift tests for IN

* Adding back FIRFirestore+Internal as include file

* Add Documentation

* Address feedback

* Update the changelog.

---------

Co-authored-by: Ehsan Nasiri <ehsann@google.com>
2023-03-06 09:43:06 -08:00
cherylEnkidu 6d9f33435a Remove some query restrictions and add integration tests (#10449)
* Adding test

* Remove more restrictions
2023-02-17 11:18:34 -05:00
cherylEnkidu 10295bad6b Fix double free bug inside IN Filter (#10535) 2022-11-30 12:52:59 -08:00
Tom Andersen 68628ef4e3 Implement MultiDB Support and Tests (#10465) 2022-11-24 10:52:38 -05:00
Denver Coneybeare 92e269c34e Fix Firestore failing to return empty results from the local cache (#10437) 2022-11-08 20:50:01 -05:00
Denver Coneybeare e9ba9eb8d0 Firestore: Fix FAILED_PRECONDITION when writing to a deleted document in a transaction (#10431) 2022-11-03 15:02:16 -04:00
Denver Coneybeare 9c6cbf7de5 Firestore: Update spec tests (#10445) 2022-11-02 15:19:35 -04:00
cherylEnkidu da7f1dd986 Replace OrderByList by std::vector<OrderBy> (#10402)
* Replace OrderByList by std::vector<OrderBy>

* Remove unordered_set

* Revert "Remove unordered_set"

This reverts commit f9df4691ef62897e48ec6ce80761396e7bdc12ca.
2022-10-26 21:24:29 -04:00
cherylEnkidu d25c83caf1 Update project file (#10409) 2022-10-26 21:23:10 -04:00
Mila e4ef6b0e2d sync spec tests from web SDK to iOS SDK (#10391) 2022-10-25 10:06:36 -07:00
cherylEnkidu 6d24463357 Update Limit and OrderBy filtering mechanism for Or Query (#10307)
* Update Limit and OrderBy filtering mechanism for Or Query

* Remove TODO
2022-10-13 10:47:51 -04:00
cherylEnkidu 36cbf43300 Support DNF transform for Or Query Support (#10290)
* Support DNF transform

* Replace with actual proto

* Address feedback
2022-10-11 19:17:24 -04:00
Denver Coneybeare a15469ead5 Enable COUNT integration tests, now that backend support has rolled out (#10299) 2022-10-04 11:37:44 -04:00
Morgan Chen 5af4ae2967 Fix missing aggregate query headers in umbrella (#10301)
* Fix missing aggregate query headers in umbrella

* remove duplicate import in test
2022-10-03 19:41:40 -07:00
8866b22f89 Firestore: Make @DocumentID value setter private (#10167)
* Firestore: Make @DocumentID value setter private

Updated the `DocumentID` Swift property wrapper's `value` property to be private(set) since it is ignored in the methods that write to Firestore.

* Make initializer private

* Fix formatting

* Fix tests

Made the setter internally accessible and imported FirebaseFirestoreSwift with @testable.

* Add a changelog entry and formatting fixes

* Documentation fixes

* [skip ci] Add runtime warnings to `@DocumentID` setter and initializer (#10275)

* [Firestore] Mark `@DocumentID` setter deprecated and add log statement in init

* Fix typo in import

* Update CHANGELOG

* Review and remove deprecation

* Review and add FIRLogWarningSwift

* Add FirebaseCorExtension to Firestore's Podfile

* [skip ci] Fix merged comment

Co-authored-by: Nick Cooke <36927374+ncooke3@users.noreply.github.com>
Co-authored-by: Nick Cooke <nickcooke@google.com>
2022-09-28 01:42:30 -04:00
4232ac1d2e Public count (#10254)
* Revert "Revert "Public count (#10246)" (#10252)"

This reverts commit b695d99e91.

* Firestore: Re-write API docs for COUNT API (#10258)

* Add isEqual and hash for aggregate classes (#10261)

Co-authored-by: Denver Coneybeare <dconeybe@google.com>
Co-authored-by: Ehsan <ehsannas@gmail.com>
2022-09-27 18:01:22 -07:00
Nick Cooke 43c62f0526 [Infra] Remove CoreDiagnostics library and references (#10259)
* [Infra] Remove CoreDiagnostics library and references

* Style localize_podfile.swift

* Add GDT to SharedTestUtils

* Update GoogleUtilities.cmake config

* Run all CI

* Update GoogleUtilities.cmake config (2)

* Resolve FIRApp.m TODO

* [skip ci] Revert Gemfile
2022-09-26 00:03:55 -04:00
af1201c8a3 [Firebase 10] Bump versions for 10.0.0 (#10244)
* [Firebase 10] Bump 9.X versions to 10.0.0

* Bump min. GTMSessionFetcher dep version to 2.1

* Bump min. GDT dep version to 9.2

* Bump min. GULs dep version to 7.8

* Fix unintentional nanopb replace

* Fix unintentional nanopb replace (2)

* Fix unintentional nanopb replace (3)

* Fix unintentional nanopb replace (4)

* Fix unintentional nanopb replace (4)

* Trigger all CI

* Bump FirebaseCombineSwift to 10

* Fix FirebaseStorage.podspec
I'm not sure what happened here. I had committed it during the rebase but guess not?

* Fix unintentional nanopb replace (5)

* Disable two tests to unblock staging

* Fix and re-enable FIROptions tests

* Update deployment targets in Firebase.podspec

* Add CHANGELOG entry for GTMSessionFetcher

* Fix AppCheck iOS availability

* Fix inadvertent API change (#10245)

* Docs update for Extensions and putFile (#10248)

* App google domain support (#10249)

Adding new 1p domain "app.google" support in FDL SDK.

* Remote Config Dynamic Property Wrapper (#10155)

* Separate GoogleUtilities Carthage build (#10250)

* Public count (#10246)

* Public Count

* Swift Test Commit

* Swift Format

* No extra whitespace

* Hopefully formatted.

* Change log and feedback.

* Revert "Public count (#10246)" (#10252)

This reverts commit 8aae6bee27.

* Make Firestore use FirebaseDataEncoder and FirebaseDataDecoder (re-implementation of #8858) (#9465)

* Bump tvOS minimum support version to 12.0

* [skip ci] Revert Gemfile

Co-authored-by: Paul Beusterien <paulbeusterien@google.com>
Co-authored-by: Eldhose M Babu <eldhosembabu@google.com>
Co-authored-by: Charlotte Liang <chliang@google.com>
Co-authored-by: wu-hui <53845758+wu-hui@users.noreply.github.com>
Co-authored-by: Morten Bek Ditlevsen <bek@termestrup.dk>
2022-09-24 07:06:20 -04:00
Morten Bek Ditlevsen 65f6cfa0bf Make Firestore use FirebaseDataEncoder and FirebaseDataDecoder (re-implementation of #8858) (#9465) 2022-09-23 09:09:39 -07:00
wu-hui b695d99e91 Revert "Public count (#10246)" (#10252)
This reverts commit 8aae6bee27.
2022-09-23 11:22:05 -04:00
wu-hui 8aae6bee27 Public count (#10246)
* Public Count

* Swift Test Commit

* Swift Format

* No extra whitespace

* Hopefully formatted.

* Change log and feedback.
2022-09-23 11:06:06 -04:00
Nick Cooke 6e0fda7a24 [Firebase 10] Update minimum supported versions across Firebase (#10233)
* Bump Package.swift minimum support versions

* Update iOS minimum versions

* Bump Crashlytics to min. support iOS 11

* Bump macOS support from 10.12 to 10.13

* Bump tvOS support from 10 to 11

* Add CHANGELOG entry

* Improve CHANGELOG entry

* Fix CI

* Improve CHANGELOG entry (2)

* Improve CHANGELOG entry (3)

* Update FirePerf test app deployment target

* Update Mac test apps's deployment target

* Update iOS test apps's deployment target

* Update release tooling project's iOS deployment target

* Misc platform min support bumps

* Update FBSDK API usage to FBSDK 13.0+

* Fix Auth dep on FBSDK
2022-09-21 16:48:11 -04:00
wu-hui 84a8b5030c Count from server (#10193)
* Proto serialization

* Wire up api

* End to end functional

* Linting

* Add aggregate source

* Fix cmake and style

* Comments, emulators and lints

* Feedback.

* More feedback.
2022-09-14 15:43:35 -07:00
Denver Coneybeare 44a4c7cb0f Add protos for COUNT (#10175)
* add proto changes for COUNT

* add compiled COUNT protos

* Firestore/Protos/CMakeLists.txt: add aggregation_result.proto to PROTO_FILE_ROOTS

* fields_array.h update for new COUNT proto messages

* project.pbxproj: add new count proto files

* fields_array_test.cc added
2022-09-06 14:02:27 -04:00
cherylEnkidu 3512851cf6 Implement the Composite Filter class (#9734)
* Implement the Composite Filter class

* Polish code

* add tests for composite filter

* fix broken test

* Improve the implementation of flattern filters

* change the flatten_filters implementation with some other things

* Change the implementation of Filter in Composite Filter

* Address feedback

* Match Android Tests
2022-08-19 14:44:00 -04:00
cherylEnkiduandWu-Hui cc9c626501 Add setIndexConfiguration for client side indexing (#10090)
* Add setIndexConfiguration for client side indexing

* Address feedback

* Templates in headers

Co-authored-by: Wu-Hui <wu.hui.github@gmail.com>
2022-08-18 10:51:08 -04:00
cherylEnkidu 9b4c200afd Add IndexBackfiller to Support Client Side Indexing (#10021)
* Add IndexBackfiller

* Address feedback

* Address more feedback
2022-07-29 17:05:34 -07:00
1e6a3f3358 Port QueryEngine and LocalDocumentView (#9772)
* Plumb through DocumentOverlayCache instance variables in LocalStore and LocalDocumentsView

* Fixed Mutation and subclasses

* LocalDocumentsView: use the DocumentOverlayCache

* mutation squashing

* Complete implementation and add manual tests

* permutatioins and combinations

* Fixes

* Fix test failures

* Fix build error

* Initial checkin

* ALL TESTS PASS

* Port more tests

* Fix CI

* Try fixing TSAN

* Some polishing

* Fix documentation

* Address feedback

* Format

* Revert grpc generated

* Fix xcodebuild error

* More feedback

* LValue

* Style

* overlayed_document.h: fix rvalue ref-qualified overload of document()

See the "member functions with ref-qualifier" section of https://en.cppreference.com/w/cpp/language/member_functions for details.

* Temp commit

* Porting QueryEngine and LocalDocumentView

* Add QueryEngineTest and address feedback

* Refactor query_engine_test, add leveldb_query_engine_test and memory_query_engine_test.
Address feedbacks.

* Change tests name

* use pointer in GetMinOffset

Co-authored-by: Denver Coneybeare <dconeybe@google.com>
Co-authored-by: Wu-Hui <wu.hui.github@gmail.com>
Co-authored-by: Hui Wu <wuandy@google.com>
2022-06-16 07:57:03 -04:00
Denver Coneybeare 585b4c83db Firestore TransactionOptions added, to specify maxAttempts (#9838) 2022-05-30 12:41:09 -04:00
wu-hui b63819219d Overlays integrate with mutations and queries, and migration (#9731) 2022-05-23 20:47:53 -04:00
Denver Coneybeare c0df0d4ab1 Enable Snappy compression support in LevelDb in cmake builds (#9596) 2022-05-20 13:55:21 -04:00
Denver Coneybeare 41e0d85d3d Fix build errors in Xcode 13.3.1 (#9705) 2022-04-26 11:06:54 -04:00
wu-hui 939f1318ca Fix a bug with limitToLast and cursors (#9675) 2022-04-20 13:07:26 -04:00
Denver Coneybeare caac2ceeed Add FIRESTORE_INCLUDE_OBJC cmake cache variable to provide a way to avoid building the Firestore Objective-C layer. (#9658) 2022-04-15 12:41:44 -04:00