aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firestore/core
Commit message (Collapse)AuthorAge
...
* 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).
* Refactor serializer (#1250)Gravatar rsgowman2018-05-11
| | | | | Moved Tag, Reader, Writer from serializer.cc's anon namespace to firebase::firestore::nanopb This should be bug-for-bug compatible. No changes were made to the moved methods.
* Firestore C++: quick fix for flaky tests in AsyncQueue and Executor (#1245)Gravatar Konstantin Varlamov2018-05-10
|
* Firestore C++: add missing tests for Executor (#1247)Gravatar Konstantin Varlamov2018-05-10
|
* 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
* Remove final vestiges of FSTSnapshotVersion (#1253)Gravatar Gil2018-05-09
|
* [De]serialize Timestamps via the remote Serializer (#1233)Gravatar rsgowman2018-05-09
|
* Firestore C++: in AsyncQueue, use steady_clock instead of system_clock. (#1246)Gravatar Konstantin Varlamov2018-05-09
| | | | | This should prevent weird bugs due to system time readjustments. Because operations are scheduled relative to now, the fact that the resulting timepoint isn't in Unix epoch shouldn't matter.
* Firestore C++: compile ExecutorLibdispatch in Objective-C++ mode (#1237)Gravatar Konstantin Varlamov2018-05-08
| | | | | | | | dispatch_queue_t is defined differently in libdispatch depending on whether the library header is being include from Objective-C (or Objective-C++) code, or else from C or C++ code. Make sure that all source files in Firestore that include executor_libdispatch.h are compiled in the same mode (Objective-C++) to avoid linker errors.
* Backport array contains / transform improvements from Web. (#1242)Gravatar Michael Lehenbauer2018-05-08
|
* C++ migration: add AsyncQueue, the C++ version of FSTDispatchQueue (#1176)Gravatar Konstantin Varlamov2018-05-07
| | | | | | | | | | | | AsyncQueue is a queue that executes given operations asynchronously, enforcing that only a single operation is executing at any given time, and that in-progress operations don't spawn more operations. The actual execution is delegated to a platform-specific executor. Executor is an interface for a FIFO queue that executes given operations serially. Two implementations of Executor, one using libdispatch and the other using C++11 standard library, are provided. AsyncQueue is not used anywhere in the code base at this point.
* 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.
* 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
* [De]serialize DocumentKeys via the remote Serializer (#1212)Gravatar rsgowman2018-05-04
|
* Add Immutable SortedSet in C++ (#1206)Gravatar Gil2018-05-02
| | | | | | | * Add SortedSet * Add document_key_set.h * Add equality to SortedSet
* Minor test naming fixup (#1209)Gravatar rsgowman2018-05-02
|
* Adding mergeFields support (#1141)Gravatar Sebastian Schmidt2018-05-02
|
* Add error handler for serializer (for deserializing cases) (#1181)Gravatar rsgowman2018-05-01
| | | | | This is more interesting than the serializing case, as we should expect to see occasional corruption of our input byte vector.
* 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
* Define a general hashing utility in C++ (#1195)Gravatar Gil2018-05-01
| | | | | This is good enough to make it possible for the new C++ code to interoperate with existing Objective-C code where `-hash` is required if you override `-isEqual:`.
* 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
* Add key-only projections to immutable C++ maps (#1166)Gravatar Gil2018-04-24
| | | | | | * Add a simple range adapter. * Add SortedMap::keys * Add SortedMap::keys_from * Add SortedMap::keys_in
* fix a bug caught by asan failure (#1173)Gravatar zxu2018-04-24
|
* Implement erase in C++ immutable maps (#1158)Gravatar Gil2018-04-24
| | | | * Add SortedMap::min * Add SortedMap::erase
* Adjust serializer test to verify via libprotobuf. (#1039)Gravatar rsgowman2018-04-24
| | | | | | Previously, the tests would compare serialization results against a precomputed (via protoc) array of bytes. Now they serialize via our nanopb based class and deserialize via libprotobuf (and vice versa) and then ensure the result is the same as the input
* Update `FieldValue` For Porting `Mutation`s to C++ (#1144)Gravatar zxu2018-04-23
| | | | | | | | | | * update FieldValue for Mutation implementation * address changes * address changes * address change
* Implement find-related methods on C++ immutable maps (#1145)Gravatar Gil2018-04-20
| | | | | | * Standardize method ordering across sorted maps * Add SortedMap::find * Add SortedMap::find_index * Add SortedMap::contains
* Fix build breakages under linux (gcc) (#1154)Gravatar rsgowman2018-04-20
| | | | * fix multiline comments by subst /* ... */ for // * fix unreachable case in a switch statement
* Clean up warnings in Firestore (#1146)Gravatar Gil2018-04-19
|
* Implement iterators for our immutable maps (#1132)Gravatar Gil2018-04-19
| | | | | | | | | | * Add a minimal LlrbNodeIterator * Remove fixed_size type parameter from FixedArray The parameter wasn't that useful and caused problems in trying to define dependent iterator types. * Add begin()/end() to SortedMap.
* Serialize array transform mutations. (#1107)Gravatar Michael Lehenbauer2018-04-17
| | | | * Serialize array transform mutations. * Improve ArrayTransform constructor to avoid extra copying.
* Implement TreeSortedMap::insert (#1081)Gravatar Gil2018-04-17
| | | | | | | | | * Make LlrbNode Rep more explicit, share empty node * SortedMap::insert converts implementations * Implement LlrbNode::insert * Remove TestPolicy<SortedMap>
* Implement local and server application of arrayUnion and arrayRemove ↵Gravatar Michael Lehenbauer2018-04-16
| | | | transforms. (#1101)
* Fix iteration past end in LevelDBTransaction::Iterator (#1105)Gravatar Gil2018-04-16
| | | | | | | | | | | Change Next() to avoid advancing past the end of either iterator by only advancing if !advanced and if the iterator is still valid. If Next() is called after the last entry is deleted, SyncToTransaction() returns false indicating it hasn't advanced but at that point is_valid_ is false. Previously Next() would then attempt to advance one of the underlying iterators and if it was the mutations_iter_ would advance past the end, which would cause the next UpdateCurrent() to dereference random memory.
* 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
* Add clang-tidy checks for Firestore (#1078)Gravatar Gil2018-04-12
| | | | | | | | | | | | | | | | | | | | * Add a .clang-tidy configuration for Firestore C++ * Fix clang-tidy warnings * typedef -> using * const ref + rvalue ref -> pass by value * NULL -> nullptr * remove useless default initializations * remove useless const value-type parameter declarations (definitions can still use them) * use auto instead of repeating types in a cast * Fix typos * Address use of static method through instance warnings * Address use after move warnings
* Refactor deserialization methods (#1038)Gravatar rsgowman2018-04-11
|
* Make it easier to consume sub-libraries within util (#1065)Gravatar Gil2018-04-10
|
* Minor cleanups to firebase_assert.h (#1051)Gravatar Gil2018-04-10
| | | Remove a duplicate macro definition and clean up an extra const clang-tidy complains about.
* 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
* FIREBASE_DEV_ASSERT -> FIREBASE_ASSERT within serializer.cc (#1062)Gravatar rsgowman2018-04-10
|
* Fix build on linux due to isnan not being present. (#1063)Gravatar rsgowman2018-04-10
| | | | Since we now include cmath rather than math.h, isnan is now named std::isnan.
* 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
* Fix build breakage on linux (#997)Gravatar rsgowman2018-04-05
|
* Add error handling for serializer (for serializing case only) (#991)Gravatar rsgowman2018-04-05
| | | | | | | | Deserializing not handled yet. Note that the serializing case is fairly uninteresting, as assuming valid input is passed in, there's no real reason why it should fail (and if it does fail, it indicates a gross violation of our understanding of the system.)
* 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.
* Fix optimized build missing symbol issue (#1009)Gravatar Paul Beusterien2018-03-30
|