aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firestore/Example/Tests
Commit message (Collapse)AuthorAge
* Move creation of FSTFilter objects to static create method on FSTFilter. (#1512)Gravatar rsgowman2018-07-11
| | | | | | | Rather than previously inlining it in the calling code. This is to unify filter creation across platforms. (This change involves altering FSTFilter from a protocol to an abstract class.)
* Expose array transforms and array contains queries. (#1514)Gravatar Michael Lehenbauer2018-07-10
| | | | | Also remove test code that was combining multiple array contains queries since those were disallowed in https://github.com/firebase/firebase-ios-sdk/commit/0ec836f9ca71b27fa54a11ae9e07e60b8c5cc002
* Eliminate unnecessary DocumentKey->FSTDocumentKey conversions (#1507)Gravatar Konstantin Varlamov2018-07-10
|
* In FSTLocalDocumentsView, search for all batches affecting a set of keys in ↵Gravatar Konstantin Varlamov2018-07-10
| | | | | | one go (#1505) This uses the newly-added allMutationBatchesAffectingDocumentKeys to find/deserialize all such batches in one go and then reuse the batches while processing a set of keys.
* Add allMutationsAffectingDocumentKeys to FSTMutationQueue (#1479)Gravatar Gil2018-07-09
| | | | | * Pod updates for Cocapods 1.5.3 * Add allMutationsAffectingDocumentKeys
* Add spec test support for target-scoped resume tokens (#1498)Gravatar Sebastian Schmidt2018-07-06
|
* Removing the target state on stream error (#1420)Gravatar Sebastian Schmidt2018-06-20
|
* Minor LevelDB cleanups (#1401)Gravatar Gil2018-06-13
| | | | | | * Add leveldb_transaction* to the CMake build * Use std::unique_ptr for leveldb::DB pointers
* Refactor Remote Event (#1396)Gravatar Sebastian Schmidt2018-06-12
|
* Allowing field deletes using merge fields (#1389)Gravatar Sebastian Schmidt2018-06-07
|
* Force refresh token if RPC fails with "Unauthenticated" error (#1373)Gravatar Konstantin Varlamov2018-06-07
| | | "Unauthenticated" is presumed to mean that token is expired (which might happen if local clock is wrong) and retried, subject to the usual backoff logic.
* Replace Objective-C assertions with C++ assertions (#1327)Gravatar Gil2018-05-24
| | | | | | | | * Migrate FSTFail to HARD_FAIL * FSTCFail -> HARD_FAIL * FSTCAssert -> HARD_ASSERT * FSTAssert -> HARD_ASSERT * Replace FSTAssert with NSAssert in dead Objective-C code * Remove FSTAssert.h
* Fix Objective-C logging (#1322)Gravatar Gil2018-05-23
|
* Reimplement C++ logging (#1313)Gravatar Gil2018-05-23
| | | | | | | * Add direct support for formatting Objective-C objects * Rewrite log.h * Convert FSTWarn to LOG_WARN * Convert FSTLog to LOG_DEBUG * Remove FSTLogger
* Remove extraneous braces (#1315)Gravatar Gil2018-05-22
|
* Firestore project fixes (#1301)Gravatar Gil2018-05-22
| | | | | | * Move GoogleTest.podspec out of the Tests tree * Rename GoogleTests to CoreTests * Move CoreTests to the top-level * Move FSTGoogleTestTests.mm into core/test
* b/79432277: Limit Queries to only a single array-contains clause. (#1286)Gravatar Michael Lehenbauer2018-05-16
|
* More macOS/static library prep (#1280)Gravatar Gil2018-05-15
| | | | | | | | | | * Avoid direct use of generated umbrella headers These: * don't exist in static library builds * have different names in multi-platform builds * Only iOS targets depend upon Firebase/Core
* Firestore C++: make FSTDispatchQueue delegate to C++ implementation (#1240)Gravatar Konstantin Varlamov2018-05-11
| | | | | FSTDispatchQueue now doesn't contain any logic of its own and instead just passes through all method calls to AsyncQueue (backed by an ExecutorLibdispatch).
* Firestore: use C++ Executor for user queue. (#1238)Gravatar Konstantin Varlamov2018-05-10
| | | | | | | FSTDispatchQueue enforces serial execution, which is inappropriate for user queue, because a user may configure usage of a concurrent queue in settings, breaking FSTDispatchQueue invariants. Instead, use C++ ExecutorLibdispatch directly.
* Add remaining tests to Xcode (#1256)Gravatar Gil2018-05-10
| | | | | | | | | | | | | | | | | | | * Add classes in testutil and util to the project * Exclude util/iterator_adaptors_test which requires gmock * Exclude remote/serializer_test which is missing some paths * Add iterator_adaptors_test and add gmock support * Add gmock support to the GoogleTest podspec we vendor * Add iterator_adaptors_test.cc to the Xcode project * Add a script that verifies all tests are referenced in the project * Add a travis check that all tests are referenced in the project * Review feedback * Moar feedback
* Add missing tests to the Firestore project (#1254)Gravatar Gil2018-05-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix order of project elements * Add immutable container tests to the Firestore project * Fix style problems in TransformOperations * Method names should have an initial upper case character (except getters/setters) * Pointers bind to the type not the name in C++ * Fix unsigned/signed comparison warning * Make transform_operations.h Objective-C++ only It turns out that you can't conditionally define virtual methods. This causes multiple versions of the vtable to be emitted and when the linker resolves all the vtable definitions for a class it picks one arbitrarily causing failures for callers that expect some of the conditional methods to be present. * Add precondition_test and field_mask_test to the project * Add field_transform_test and transform_operations_test to the project * Clean up missing newline/excess comments * Use braced initialization to avoid linter false positive on std::transform
* Backport array contains / transform improvements from Web. (#1242)Gravatar Michael Lehenbauer2018-05-08
|
* Migrate FSTDocumentVersionDictionary to C++ DocumentVersionMap (#1231)Gravatar Gil2018-05-05
|
* Port FSTDocumentKeySet to C++ DocumentKeySet (#1229)Gravatar Gil2018-05-05
| | | | | | | | | * Define a Comparator for DocumentKey * Automated migration from FSTDocumentKeySet to DocumentKeySet * Manual fixups for DocumentKeySet * Delete FSTDocumentKeySet
* Bump sequence numbers when receiving a new resume token (#1214)Gravatar Greg Soltis2018-05-03
| | | | | | | | * Bump sequence number on resume token refresh * Style * Fix comment formatting
* b/78539022: Fix test at risk of range violation errors depending on ↵Gravatar Michael Lehenbauer2018-05-02
| | | | | time-of-day. (#1213) micros could underflow or overflow if the test was run at the wrong time... Replaced with hardcoded timestamps as I don't think making it time-dependent gains us interesting additional coverage.
* Adding mergeFields support (#1141)Gravatar Sebastian Schmidt2018-05-02
|
* Port `SnapshotVersion` for the rest Firestore modulo (#1185)Gravatar zxu2018-05-01
| | | | | | | | | | | | | | * remove conversions in `Local` and `Remote` * replace `FSTSnapshotVersion` in `Model` * replace `FSTSnapshotVersion` in the rest * let test check equal with C++ equal * fix newly added code * address changes
* Port the feedback from the Java port (#1199)Gravatar Greg Soltis2018-04-30
| | | | | | * Port the feedback from the port * Fix comment grammar
* Identify limbo-only document updates (#1167)Gravatar Greg Soltis2018-04-25
| | | | | | | | | | | | | | | | | | | | | | * Filter out document updates from target association changes * Move remote-event-modifying methods onto remote event * Style * keep limbo docs in remote event * Implement identification of limbo document updates * Refactor a bit to handle removes as well * Drop newline * Handle synthesized limbo deletes * Response to feedback * Appease the style gods
* Port `SnapshotVersion` for `Remote` (#1174)Gravatar zxu2018-04-25
| | | | | | | | | | | | | | | | | | | | * no-brainer replace FSTSnapshotVersion by SnapshotVersion in `Remote` * delete `FSTSnapshotVersion` in `Remote` * fix test * partially revert RemoteEvent * Revert "partially revert RemoteEvent" This reverts commit 67e35bb6c11eaf79608df8d02a60788a40331d0f. * fix a bug * fix integration * address changes
* Port `SnapshotVersion` for `Local` (#1182)Gravatar zxu2018-04-25
| | | | | | | | | | | | * no-brainer replace `FSTSnapshotVersion` with `SnapshotVersion` * refresh code * fix LocalStore * fix LocalStore (partial revert 78e6c38) * address changes
* Array Contains Queries (not added to public headers yet). (#1138)Gravatar Michael Lehenbauer2018-04-23
|
* Move array transforms to internal header pending backend support. (#1139)Gravatar Michael Lehenbauer2018-04-20
|
* Filter out document updates from target association changes (#1122)Gravatar Greg Soltis2018-04-20
| | | | | | | | * Filter out document updates from target association changes * Move remote-event-modifying methods onto remote event * Style
* Clean up warnings in Firestore (#1146)Gravatar Gil2018-04-19
|
* fix integration test (#1134)Gravatar zxu2018-04-18
|
* Add GetOptions for controlling offline get behaviour (#655)Gravatar rsgowman2018-04-18
| | | | Add option to allow the user to control where DocumentReference.getDocument() and CollectionReference.getDocuments() fetches from. By default, it fetches from the server (if possible) and falls back to the local cache. It's now possible to alternatively fetch from the local cache only, or to fetch from the server only (though in the server only case, latency compensation is still enabled).
* Integration tests, changelog, and minor fixes for array transforms. (#1108)Gravatar Michael Lehenbauer2018-04-17
|
* Serialize array transform mutations. (#1107)Gravatar Michael Lehenbauer2018-04-17
| | | | * Serialize array transform mutations. * Improve ArrayTransform constructor to avoid extra copying.
* Implement local and server application of arrayUnion and arrayRemove ↵Gravatar Michael Lehenbauer2018-04-16
| | | | transforms. (#1101)
* Replace the `SnapshotOptions` object with the behavior enum. (#1109)Gravatar Gil2018-04-16
| | | | | | | | | Instead of calling `get(field, SnapshotOptions.serverTimestampBehavior(.estimate))` call `get(field, serverTimestampBehavior: .estimate)`
* Rewrite some LocalStore tests (#1114)Gravatar Greg Soltis2018-04-16
| | | | | | | | * Pull localstore tests from other branch * Fix up the couple of tests that expected the assertion * Style
* Replace `QueryListenOptions` with simple booleans (#1106)Gravatar Gil2018-04-15
| | | | | | | | | | | | | | | | | | | | | | | * Replace `QueryListenOptions` with simple booleans Instead of calling addSnapshotListener( options:QueryListenOptions.includeQueryMetadataChanges() .includeDocumentMetadataChanges()) call addSnapshotListener(includeMetadataChanges:true) Also change `QuerySnapshot.documentChanges()` into a method which optionally takes `includeMetadataChanges:true`. By default even when listening to a query with `inlcudeMetadataChanges:true` metadata-only document changes are suppressed because they're confusing. * Revert QuerySnapshot.documentChanges back to a property Add usage.
* Replace the `SetOptions` object with a simple boolean. (#1098)Gravatar Gil2018-04-15
| | | | | | | | | Instead of calling `setData(["a": "b"], options: SetOptions.merge())` call `setData(["a": "b"], merge: true)`
* Replace `DocumentListenOptions` with a simple boolean. (#1099)Gravatar Gil2018-04-14
| | | | | | | | | | | | | | * Replace `DocumentListenOptions` with a simple boolean. Instead of calling `addSnapshotListener(options: DocumentListenOptions.includeMetadataChanges(true))` call `addSnapshotListener(includeMetadataChanges:true)` * Style
* Array Transforms public API and parsingGravatar Michael Lehenbauer2018-04-13
| | | | | This includes the new FIRFieldValue sentinels, the FSTUserDataConverter code to parse them into internal ArrayTransform operations for use in an FSTTransformMutation, and some sanity testing in FSTMutationTests. I still need to implement FSTTransformMutation support for local application and serialization (and then integration tests).
* Port `Precondition` to C++ (#1040)Gravatar zxu2018-04-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * port FieldMask to C++ * address changes * address changes * fix test * address change * Port transform operations (FSTTransformOperation, FSTServerTimestampTransform) to C++ * address changes * address changes * address changes * implement `FieldTransform` in C++ * port `FieldTransform` * make `fieldTransforms` shared inside `context` * Implement Precondition in C++ w/o test yet * add unit test for `Precondition` * port `Precondition` * address changes * address changes * fix bugs for integration test * address changes * fix lint * address changes * address changes
* Small cleanup to UserDataConverter / FieldValue sentinel code to make adding ↵Gravatar Michael Lehenbauer2018-04-12
| | | | | more FieldValue sentinels easier. (#1077) Port of https://github.com/firebase/firebase-js-sdk/commit/b14678002bf6e8cc9ebd7561efbafe29315ceb8e and https://github.com/firebase/firebase-js-sdk/commit/b14678002bf6e8cc9ebd7561efbafe29315ceb8e.