aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firestore/Source/API
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
* Allowing field deletes using merge fields (#1389)Gravatar Sebastian Schmidt2018-06-07
|
* Remove nearly all usages of WrapNSStringNoCopy (#1351)Gravatar Gil2018-05-30
|
* 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
* 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
* Directly validate collection and document paths (#1316)Gravatar Gil2018-05-22
| | | | | | ... instead of relying on HARD_ASSERTS in resource_path.cc to catch them. This fixes an integration test broken in #1304.
* Remove extraneous braces (#1315)Gravatar Gil2018-05-22
|
* Add a HARD_ASSERT C++ assertion macro (#1304)Gravatar Gil2018-05-22
| | | | | | * Add HARD_ASSERT * Use HARD_ASSERT * Remove FIREBASE_ASSERT * Remove StringPrintf
* b/79432277: Limit Queries to only a single array-contains clause. (#1286)Gravatar Michael Lehenbauer2018-05-16
|
* 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.
* Backport array contains / transform improvements from Web. (#1242)Gravatar Michael Lehenbauer2018-05-08
|
* Make BasePath hash directly as a range (#1232)Gravatar Gil2018-05-06
| | | | | Remove BasePath.Hash() Objective-C compatibility method Make DocumentKey's hasher use BasePath's segment-based hash code.
* Eliminate duplicate symbol in CocoaPods -all_load build (#1223)Gravatar Paul Beusterien2018-05-03
|
* 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
* 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
|
* 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.
* 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)`
* 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.
* Port FieldTransform to C++ (#1033)Gravatar zxu2018-04-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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` * address changes * fix lint * address changes
* Add lint checking for Objective-C++ sources (#1048)Gravatar Gil2018-04-09
| | | | | | | | | | | | | | | | * lint.sh now lints Objective-C++ too * cpplint checks system-style includes that should be user-style This prevents it from recognizing project sources as if they were C system headers and then complaining that they're in the wrong place. * cpplint checks #imports and #includes * cpplint checks that C++ system headers aren't #imported * cpplint checks for C system headers that could be C++ system headers * cpplint checks that Objective-C sources include their headers
* Port transform operations to C++ (#1020)Gravatar zxu2018-04-05
| | | | | | | | | | | | | | | | | | | | | | * 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 * address change
* port FieldMask to C++ (#998)Gravatar zxu2018-04-04
| | | | | | | | | | | | | | | | | | | | * port FieldMask to C++ * address changes * address changes * fix test * address change * fix lint * address changes * Revert "address changes" This reverts commit c75bb42851b785ab0838bb23679f87dfad9df4bb.
* Add a flag to control whether DocumentSnapshots return Dates or Timestamps ↵Gravatar Konstantin Varlamov2018-03-30
| | | | | | | | for timestamp fields (#831) * add a new property `timestampsInSnapshotsEnabled` to `FirestoreSettings`, `false` by default; * add a verbose warning message urging users to opt into the new behavior; * set `timestampsInSnapshotsEnabled` to true in the integration tests to reduce the verbose console spam during the test run and make sure the flag won't break anything once it's flipped.
* port C++ DocumentKey to the rest of Firestore code (#977)Gravatar zxu2018-03-27
| | | | | | | | | | * port C++ DocumentKey to API's and Core's * address changes * address changes * fix Hash return types
* port C++ `DocumentKey` to `Remote/*` (#965)Gravatar zxu2018-03-24
| | | | | | | | | | | | * port C++ DocumentKey to Remote's * port C++ DocumentKey to Remote's * address changes * address changes * address changes
* grand PR to port the remaining paths (FieldPath and ResourcePath). (#865)Gravatar zxu2018-03-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * naively remove FSTPath import and source/test files. * port FieldPath, part I * port FieldPath, part II * port ResourcePath, part I * port ResourcePath, part II * the grand commit to fix build errors * use testutil:: helper instead of those from FSTHelpers * fix test and lint * use c_str in errmsg directly * fix * fix * make code clean * fix integration test I missed * fix to avoid naming collision in preprocessor * address changes * address changes * address changes * fix: fieldMask are actually shared with different context. * address changes * address changes
* port paths to FSTDocumentKey (#877)Gravatar zxu2018-03-06
| | | | | | | | * replace path with C++ implementation in FSTDocumentKey.{h,mm} only * address changes * address changes
* add converters and port paths to FSTQuery (#869)Gravatar zxu2018-03-05
| | | | | | | | | | * add converters and fix FSTQuery.{h,m} only * address changes * a change forget to address * add a dummy function to make inline-only-library buildable
* replacing Auth by C++ auth implementation (#802)Gravatar zxu2018-02-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lazy replacing FST(Firebase)CredentialsProvider by (Firebase)CredentialsProvider * lazy replacing FSTUser by User * adding error-code parameter to TokenListener * actually use const user& instead of pointer; also add an error util * add HashUser and pass into the unordered_map * use User in test * use c++ CredentialsProvider and subclass in test * fix unit test * use explicit capture in lambda instead of capture all by reference * cache currentUser explicitly when reset sync engineer test driver * objc object should be captured by value in lambda * replacing Auth/FSTUser by C++ auth implementation * address changes * replacing FSTGetTokenResult by C++ Token implementation * address changes * fix unintentional change in merging * patch the change in objc Auth up-stream * somehow, the lambda-version of set-user-change-listener does not work... fallback to block * address changes * fix another const& v.s. dispatch bug * fix more const& v.s. dispatch bug zxu123 committed * fix a bad sync line * address changes * address change * address change * fix upstream change from merge * fix upstream changes * Suggested fixes for cpp/port_auth (#846) * Get rid of MockDatastore factory This avoids the need to statically allocate (and leak) a credentials provider * Use absl::make_unique std::make_unique technically does not exist until C++14. * #include <utility> for std::move * Use std::future for the initial user * fix style
* Avoid wrapping and rewrapping NSStrings when constructing DatabaseId (#833)Gravatar Gil2018-02-22
| | | | | | * Avoid wrapping and rewrapping NSStrings when constructing DatabaseId * Shorten DatabaseId::kDefaultDatabaseId
* Accept FIRTimestamp where NSDate is currently accepted as a parameter (#823)Gravatar Konstantin Varlamov2018-02-21
|
* Make FSTTimestamp into a public Firestore class (#698)Gravatar Konstantin Varlamov2018-02-20
| | | | - FSTTimestamp is now FIRTimestamp, under Firestore/Source/{Public,API}. This is a temporary solution; eventually, FIRTimestamp is supposed to live somewhere under Firebase; - move most internal Timestamp methods to the public header (the only exception is ISOString).
* Delete stale Firestore instances after FIRApp is deleted. (#809)Gravatar Ryan Wilson2018-02-16
|
* replacing Auth/FSTUser by C++ auth implementation (#804)Gravatar zxu2018-02-15
| | | | | | * replacing Auth/FSTUser by C++ auth implementation * address changes
* Implement Firestore DatabaseInfo and port both Database{Id,Info} C++ to the ↵Gravatar zxu2018-02-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | iOS code (#738) * implement Firestore DatabaseInfo in C++ * temporary stash changes; blocking on the massive renaming of .m to .mm * add database_info_test to project * finish port DatabaseId and fix style, modular fixing DatabaseInfo * port DatabaseInfo * remove FSTDatabase{ID,Info} and their tests from project * fix unit test * use namespace alias * use namespace alias, leftover * address more changes * refactoring to use raw pointer instead of value for property * address changes * remove self-> * fix style * remove the name suffix Alloc * fix a bug
* Move all Firestore Objective-C to Objective-C++ (#734)Gravatar Gil2018-01-31
| | | | | | | | | | | | | | * Move all Firestore files to Objective-C++ * Update project file references * Don't use module imports from Objective-C++ * Use extern "C" for C-accessible globals * Work around more stringent type checking in Objective-C++ * NSMutableDictionary ivars aren't implicitly casted to NSDictionary * FSTMaybeDocument callback can't be passed a function that accepts FSTDocument * NSComparisonResult can't be multiplied by -1 without casting * Add a #include <inttypes.h> where needed * Avoid using C++ keywords as variables * Remove #if __cplusplus guards
* Cleanup imports and isEqual (#685)Gravatar Gil2018-01-21
| | | | | | | | | | * Fix headers * Fix isEqual verbosity * Fix isEqual for nullable properties * Fix nullability on FSTTestDocSnapshot
* Port comparison to C++ (#678)Gravatar Gil2018-01-19
| | | | | | | | | | | | | | | This reimplements our comparison functions as C++ Comparators and then provides compatibility shims for interoperating with existing Objective-C usage. A few specialized comparators aren't suitable for porting but only have a single usage (e.g. CompareBytes for comparing NSData * instances). In these cases I've moved them into the caller. * Use int32_t for typeof(ID) in FSTDocumentReference * Migrate callers of FSTComparison.h to Objective-C++ * Port comparison to C++ * Migrate usages of FSTComparison.h to C++ equivalents * Remove FSTComparison
* Fix issue @morganchen12 discovered where we weren't properly creating ↵Gravatar Michael Lehenbauer2018-01-12
| | | | | | FIRQueryDocumentSnapshot instances. (#662)
* Fixing potential race in ServerTimestamp testsGravatar Sebastian Schmidt2018-01-05
|