aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firestore
Commit message (Collapse)AuthorAge
* Strawman C++ API (#763)Gravatar rsgowman2018-02-12
| | | | Incomplete, and what does exist in still slightly vague. It's expected that this will change.
* C++ port: add C++ equivalent of FSTDocumentKey. (#762)Gravatar Konstantin Varlamov2018-02-09
| | | | | Also move kDocumentKeyPath to the only point of usage - make it a static member variable of FieldPath.
* port Firestore SnapshotVersion in C++ (#767)Gravatar zxu2018-02-09
| | | * implement SnapshotVersion and test
* port Firestore Auth module in C++ (#733)Gravatar zxu2018-02-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Implement firestore/auth/user * add user to project and some fixes * implement firestore/auth/{credentials_provider,empty_credentials_provider} * implement firestore/auth/firebase_credentials_provider * refactoring firebase_credentials_provider and add (disabled but working) unit test * add auth test to project * address changes * small fix to style and project * fix the firebase_credentials_provider_test * fix style * address changes * revert the change to static mutex_ * remove my custom plist path * fix style * address changes * refactoring FirebaseCredentialsProvider to fix the issue w.r.t. auth global dispatch queue * add /*force_refresh=*/ tag to bool literal for style purpose * Use a shared_ptr/weak_ptr handoff on FirebaseCredentialsProvider (#778) * Revert "refactoring FirebaseCredentialsProvider to fix the issue w.r.t. auth global dispatch queue" This reverts commit 87175a4146267d403a774f138b85f8d3b532fa4b. * Use a shared_ptr/weak_ptr handoff on FirebaseCredentialsProvider This avoids any problems with callsbacks retaining pointers to objects destroyed by a C++ destructor
* Let Travis run for `CMake` test and `lint.sh` (#769)Gravatar zxu2018-02-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix nanopb (in cmake build) Look for binaries in the src dir (since that's where we build now.) This error would be masked if a previous build had completed prior to switching nanopb to build out of src. Also, don't patch the protoc path multiple times. This could be triggered by (eg) 'make && make clean && make'. * Add resource_path.{h,cc} to the cmake build * Fix signed/unsigned int comparison warnings * let Travis run for `CMake` test and `lint.sh` * Ensure FieldValue tag_ is initialized during cp/mv ctor. Otherwise, the assignment operator attempts to deallocate based on the (uninitialized) tag_ variable, posssibly leading to segfaults. * address change * fix trailing space * address change * moving Firestore checks closer together * Fix tests that throw exceptions. The (previous) tests checked to ensure that an abort() occurs, but if ABSL_HAVE_EXCEPTIONS is defined on non-macos (which is currently the default) then the assertions will throw a std::logic_error rather than abort()ing. On macos, an exception is thrown too, but the exception doesn't derrive from std::exception, so ASSERT_DEATH_* doesn't catch it (hence why ASSERT_DEATH_* actually works.) To resolve this, I've switched to ASSERT_ANY_THROW. * ./scripts/lint.sh * Move FieldValue::tag_ initializer to be in class. * check Travis ulimit * check travis limit * set make -j 200 instead of unlimited * use cpu core number instead of 200
* cmake build fixes (#770)Gravatar rsgowman2018-02-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix nanopb (in cmake build) Look for binaries in the src dir (since that's where we build now.) This error would be masked if a previous build had completed prior to switching nanopb to build out of src. Also, don't patch the protoc path multiple times. This could be triggered by (eg) 'make && make clean && make'. * Add resource_path.{h,cc} to the cmake build * Fix signed/unsigned int comparison warnings * Ensure FieldValue tag_ is initialized during cp/mv ctor. Otherwise, the assignment operator attempts to deallocate based on the (uninitialized) tag_ variable, posssibly leading to segfaults. * Fix tests that throw exceptions. The (previous) tests checked to ensure that an abort() occurs, but if ABSL_HAVE_EXCEPTIONS is defined on non-macos (which is currently the default) then the assertions will throw a std::logic_error rather than abort()ing. On macos, an exception is thrown too, but the exception doesn't derrive from std::exception, so ASSERT_DEATH_* doesn't catch it (hence why ASSERT_DEATH_* actually works.) To resolve this, I've switched to ASSERT_ANY_THROW.
* Update deprecation message for Firestore. (#758)Gravatar Ryan Wilson2018-02-08
| | | | | | * Update FIRFirestore.h * Provide full command to enable debugging.
* Explicitly specify the default constructor to FieldPath (#773)Gravatar Gil2018-02-08
| | | | | | | | | | | Xcode prior to 8.3 does not accept an explicitly defaulted constructor (`= default`) for the purposes of default initializing a const object. This fixes a build failure under Xcode 8.2: ``` Firestore/core/src/firebase/firestore/model/field_path.cc:144:26: error: default initialization of an object of const type 'const firebase::firestore::model::FieldPath' without a user-provided default constructor static const FieldPath empty_path; ```
* Update CHANGELOG for Firestore v0.10.1 (#768)Gravatar Gil2018-02-08
|
* C++ port: port FSTFieldPath and FSTResourcePath to C++ (#749)Gravatar Konstantin Varlamov2018-02-06
| | | Similar to Objective-C, FieldPath and ResourcePath share most of their interface (and implementation) by deriving from BasePath (using CRTP, so that factory methods in BasePath can return an instance of the derived class).
* Merge pull request #747 from firebase/rsgowman/nanopbGravatar rsgowman2018-02-06
|\ | | | | Integrate nanopb
* \ Merge pull request #757 from firebase/wilhuff/mergeGravatar Gil2018-02-06
|\ \ | | | | | | Merge updated abseil-cpp to master
* | | 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
| * | Merge branch 'abseil-mirror' into mergeGravatar Marek Gilbert2018-02-06
| |\ \ | | | | | | | | | | | | | | | | | | | | Add StrCat, StrJoin and the rest of //strings from abseil-cpp (#756) From abseil-cpp version bf7fc9986e20f664958fc227547fd8d2fdcf863e
| * | | Merge commit 'abseil-mirror' into mergeGravatar Marek Gilbert2018-02-06
|/| | | | | | | | | | | | | | | | | | | | | | | Update abseil-cpp to a new upstream (#754) Update to bf7fc9986e20f664958fc227547fd8d2fdcf863e
| | * | Add StrCat, StrJoin and the rest of //strings from abseil-cpp (#756)Gravatar Gil2018-02-06
| |/ / | | | | | | From abseil-cpp version bf7fc9986e20f664958fc227547fd8d2fdcf863e
| * | Update abseil-cpp to a new upstream (#754)Gravatar Gil2018-02-06
| | | | | | | | | Update to bf7fc9986e20f664958fc227547fd8d2fdcf863e
| | * Downgrade nanopb from 0.4.0-dev to 0.3.8.Gravatar Rich Gowman2018-02-06
| | | | | | | | | | | | Also regenerate the protos
| | * ./style.shGravatar Rich Gowman2018-02-06
| | |
| | * Hook up nanopb to firestorep projectGravatar Rich Gowman2018-02-06
| | | | | | | | | | | | | | | Use remote/serializer placeholder class as a hook for the test to ensure nanopb headers can be found, and test can be linked.
| | * Import "well-known" protos (and generated nanopb files)Gravatar Rich Gowman2018-02-06
| | | | | | | | | | | | For use by nanopb (which otherwise doesn't know what to do with these.)
| | * Add generated nanopb protos.Gravatar Rich Gowman2018-02-06
| | | | | | | | | | | | 100% machine generated (except adding of the license).
| | * Add instructions for building nanopb protosGravatar Rich Gowman2018-02-06
| |/ |/| | | | | Currently only supported on osx
* | fix null block execution crashGravatar Morgan Chen2018-02-02
| |
* | Increase expectation timeout to 25 seconds. (#744)Gravatar Michael Lehenbauer2018-02-02
| | | | | | | | | | | | | | I'm doing this to: 1) Experimentally see if it improves the flakiness we've been seeing in the Query Conformance Tests. 2) Insulate us from the fact that GRPC seems to take a /minimum/ of 10 seconds to reconnect (at least in some cases) after a connection failure. I've opened b/72864027 to revisit this in the future.
* | Align tests and integration test header search paths (#737)Gravatar Gil2018-02-01
| |
* | Remove predecessorKey,Object,Document, etc (#735)Gravatar Gil2018-02-01
| | | | | | | | | | This is dead code. I think it was probably useful in the RTDB because of the way it notified of changes, but we give changes with indexes in Firestore so I think we don't need it.
* | Start on ArraySortedMap in C++ (#721)Gravatar Gil2018-01-31
| | | | | | | | | | | | * Implement ArraySortedMap.remove * Implement ArraySortedMap.insert * Ensure ArraySortedMap.insert avoids copying on duplicates * Port more ArraySortedMapTests
* | 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
* | Schema migrations for LevelDB (#728)Gravatar Greg Soltis2018-01-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Implement schema versions * Style fixes * newlines, copyrights, assumptions * Fix nullability * Raw ptr -> shared_ptr * kVersionTableGlobal -> kVersionGlobalTable * Drop utils, move into static methods * Drop extra include * Add a few more comments * Move version constant into migrations file * formatting? * Fix comment
* | Firestore DatabaseId in C++ (#727)Gravatar zxu2018-01-29
| | | | | | | | | | | | | | | | | | | | | | | | * Implement DataBaseId in C++ * add database_id_test to project * fix project * address changes * fix style
* | Add absl_strings to firebase_firestore_util_test dependencies (#725)Gravatar rsgowman2018-01-29
| | | | | | Required to link the test on rodete.
* | Add changelog entry for my last PR (oops) and also add a few that we missed ↵Gravatar Michael Lehenbauer2018-01-29
| | | | | | | | last release. (#724)
* | Import iterator_adaptors from google3 (#718)Gravatar Gil2018-01-29
| | | | | | | | | | | | | | | | | | | | | | | | * Import iterator_adapters from google3 * Remove -Wconversion which is annoyingly hard to satisfy * Strip dependency on absl_container from iterator_adapters_test * Format and lint iterator_adaptors * More flexible copyright checking in Travis
* | Use fixed-sized types (#719)Gravatar Gil2018-01-28
| | | | | | Should have caught this during review, but cpplint caught it
* | Version updates to 4.8.2 (#722)Gravatar Paul Beusterien2018-01-27
| |
* | Fix a number of c++ build errors (#715)Gravatar rsgowman2018-01-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Move -fvisibility-inlines-hidden from common_flags to cxx_flags This option isn't supported by C (and causes the build to fail under at least rodete). Manifested error was: ``` -- Looking for include file openssl/rand.h -- Looking for include file openssl/rand.h - not found CMake Error at core/src/firebase/firestore/util/CMakeLists.txt:94 (message): No implementation for SecureRandom available. -- Configuring incomplete, errors occurred! ``` which is completely misleading. :( * Fix exception include for std::logic_error Was causing compiler error on (at least) rodete. (http://en.cppreference.com/w/cpp/error/logic_error suggests that stdexcept is the correct header.) * Remove 'const' from vector contents. vectors cannot contain const objects as the contained objects are required to be assignable and copy constructable. (Not *quite* strictly true; since c++11, this requirement now depends on the operations performed on the container. But my compiler objects at any rate.) http://en.cppreference.com/w/cpp/container/vector https://stackoverflow.com/questions/8685257/why-cant-you-put-a-const-object-into-a-stl-container * Add brackets as suggested (required) by my compiler. * Add missing include For LLONG_MIN, etc. * Enable gnu extension to c++11 for firestore/util *test*. We disable them by default (in cmake/CompilerSetup.cmake) but our tests requires hexidecimal floating point, which is not supported in c++11 (though is supported in C++17, gnu++11, and others). http://en.cppreference.com/w/cpp/language/floating_literal https://bugzilla.redhat.com/show_bug.cgi?id=1321986 * Fix printf format for uint64_t http://en.cppreference.com/w/cpp/types/integer https://stackoverflow.com/questions/9225567/how-to-print-a-int64-t-type-in-c * Allow 0 length printf template strings in tests. * Get rid of a multi line comment. The backslash is apparently interpreted by the compiler cause the next line to be ignored too. In this case, the next line is (currently) a comment, and would be ignored anyways. (But that doesn't stop the compiler from yelling.) * Run ./scripts/style.sh
* | travis: check for copyright in sources (#717)Gravatar Paul Beusterien2018-01-27
| |
* | Fix b/72502745: OnlineState changes cause limbo document crash. (#470) (#714)Gravatar Michael Lehenbauer2018-01-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [PORT OF https://github.com/firebase/firebase-js-sdk/pull/470] Context: I made a previous change to raise isFromCache=true events when the client goes offline. As part of this change I added an assert for "OnlineState should not affect limbo documents", which it turns out was not valid because: * When we go offline, we set the view to non-current and call View.applyChanges(). * View.applyChanges() calls applyTargetChange() even though there's no target change and it recalculates limbo documents. * When the view is not current, we consider no documents to be in limbo. * Therefore all limbo documents are removed and so applyChanges() ends up returning unexpected LimboDocumentChanges. Fix: I've modified the View logic so that we don't recalculate limbo documents (and generate LimboDocumentChanges) when the View is not current, so now my assert holds and there should be less spurious removal / re-adding of limbo documents.
* | normalize and port the rest of Firebase/Port code (#713)Gravatar zxu2018-01-27
| | | | | | | | * normalize bits * normalize ordered_code
* | port TargetIdGenerator to iOS (#709)Gravatar zxu2018-01-25
| | | | | | | | | | | | | | | | | | | | * port TargetIdGenerator to iOS * fix style * move pointer property to instance variable * TriggerTravis
* | implement `TargetIdGenerator` in C++ for Firestore (#701)Gravatar zxu2018-01-25
| | | | | | | | | | | | * implement `TargetIdGenerator` * address changes
* | normalize string_util (#708)Gravatar zxu2018-01-25
| | | | | | | | * refactoring string_util * port string_util to iOS
* | Implement the rest of FieldValue types for C++ (#687)Gravatar zxu2018-01-25
| | | | | | | | | | | | | | | | | | | | | | | | * implement FieldValue for null and boolean. * Implement number and string FieldValue. * Implement object FieldValue. * implement timestamp FieldValue. * Implement number and string FieldValue. * implement public type `Blob` and `GeoPoint` * implement Blob FieldValue * Implement GeoPoint FieldValue * refactoring `Blob`
* | Cleanup imports and isEqual (#685)Gravatar Gil2018-01-21
| | | | | | | | | | | | | | | | | | | | * Fix headers * Fix isEqual verbosity * Fix isEqual for nullable properties * Fix nullability on FSTTestDocSnapshot
* | Use Comparator in FieldValue. (#686)Gravatar Gil2018-01-19
| |
* | 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
* | Add platform detection logic for SecureRandom (#676)Gravatar Gil2018-01-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add CMake platform detection logic for SecureRandom Now only builds secure_random_arc4random.cc if available. Remove firebase/firestore/base/port.h. Nothing else was in that directory. * Add a SecureRandom implementation that uses OpenSSL This is usable on Linux, Windows, and Android * Properly check return from RAND_bytes
* | Merge pull request #680 from firebase/release-4.8.1Gravatar Paul Beusterien2018-01-18
|\ \ | | | | | | Merge Release 4.8.1
* | | Listen sequence numbers (#675)Gravatar Greg Soltis2018-01-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Generate and save sequence numbers for listens * Add documentation * Fix include path * Fix unavailable comment * Review feedback