aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firestore/core/src/firebase
Commit message (Collapse)AuthorAge
...
* 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
* 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
|
* Drop FSTWriteGroup (#986)Gravatar Greg Soltis2018-03-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Drop write group from remote document change buffer * Unwind some group dependendencies in local store * Write group dropped from local store * Drop write group from mutation queue tests * Drop write group usage from query cache tests * Drop write groups from remote document cache tests * Drop write groups from remote document change buffer tests * Drop write groups and the write group tracker * Style * Put the action in transaction * Merge master, fix test * Fix some compiler warnings but mostly trigger travis * Responses to feedback
* Clean up usages of std::make_unique that crept in (#996)Gravatar Gil2018-03-29
| | | | | | | | * Add std::make_unique rule * Clean up usages of std::make_unique that crept in This fails to build under Xcode 8.2
* Initial TreeSortedMap and SortedMap in C++ (#980)Gravatar Gil2018-03-29
| | | | | | | | | | * Prepare for TreeSortedMap * Factor out SortedMapBase * Move ArraySortedMap to impl * Factor out SortedMap testing utilities * Add a minimal TreeSortedMap * Add the public SortedMap type
* Add ObjectValue::Map alias (#967)Gravatar rsgowman2018-03-27
|
* 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
* C++ migration: make Timestamp class a part of public API (#944)Gravatar Konstantin Varlamov2018-03-27
| | | | | | | | | | | * move Timestamp from model/ to the root directory; * move Timestamp to top-level firebase namespace and update all references; * add conversions to and from native date types; * add a specialization of std::hash; * add comments to public member functions; * rename nanos -> nanoseconds; * add public headers, including Timestamp, to CMake; * increase test coverage.
* Switch LevelDB MutationQueue and RemoteDocumentCache to use transactions (#968)Gravatar Greg Soltis2018-03-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Start work on leveldb transactions * Style * Working API. Not plumbed in yet * Move files into correct place * Wrangling file locations and associations * Tests pass * Add some comments * style * Fix copyright * Rewrite iterator internals to handle deletion-while-iterating. Also add tests for same * Switch to strings instead of slices * Style * More style fixes * Start switching writegroup over * Swap out write group tracking for transaction usage * Style * Response to feedback before updating docs * Style * Add comment * Initialize version_ * Satisfy the linter * Start switching writegroup over * Swap out write group tracking for transaction usage * Style * Checkpoint before implementing BatchDescription * Style * Initial plumbing for leveldb local parts * Add model::BatchId * Port leveldb_key.{h,cc} * Add string StartsWith * Add leveldb_key_test.cc to the project * Revert back to using leveldb::Slice for read/describe These operations universally operate on keys obtained from leveldb so it's actually unhelpful to force all the callers to make absl::string_views from them. * Everything passing * Drop unused function * Style * STart work on reads * Swap reads in queryCache to use transactions * Fix up tests of querycache * Drop commented out code * Cleanup * Style * Fix up for passing tests * style * Renaming * Style * Start work on ToString for transactions * Add ToString() method to LevelDbTransaction * Style * lint * Fix includes, drop runTransaction * current_transaction -> currentTransaction * LevelDbTransaction::NewIterator now returns a unique_ptr * Style * Revert addition of util::StartsWith * Add log line * Style * Add log line * Style * Add debug log line for commits, drop unused BatchDescription * STart work on reads * Swap reads in queryCache to use transactions * Start on remote documents * Transition mutation queue and remote documents to use transactions * Style * Make everything pass * Make everything pass * Make it compile * Style * Style * Revert name change, use DefaultReadOptions() * Style * Handle iterators returning bad statuses
* Rewrite leveldb_key to use a Reader/Writer class (#960)Gravatar Gil2018-03-24
|