aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firestore
Commit message (Collapse)AuthorAge
* 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
* | Fix CMake build and lint warnings in field_value.cc (#677)Gravatar Gil2018-01-17
| | | | | | | | | | | | | | Fixes these cpplint warnings: Firestore/core/src/firebase/firestore/model/field_value.cc:162: Semicolon defining empty statement. Use {} instead. [whitespace/semicolon] [5] Firestore/core/src/firebase/firestore/model/field_value.cc:170: Semicolon defining empty statement. Use {} instead. [whitespace/semicolon] [5] Firestore/core/src/firebase/firestore/model/field_value.cc:126: Add #include <utility> for swap [build/include_what_you_use] [4]
* | Add a cc_library to the CMake build (#670)Gravatar Gil2018-01-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Rewrite cc_test to take named arguments Cut down on build file verbosity by having cc_test take SOURCES and DEPENDS. The separate invocation of target_link_libraries is no longer necessary. * Add a cc_library rule to parallel cc_test This cuts down on build file verbosity. * Automatically add OBJC_FLAGS to cc_libraries if applicable * Exclude platform-specific libraries from 'all' This is makes it possible to declare this kind of library unconditionally. Usage within a test or as a dependency will actually trigger building. * Restore secure_random_test.cc; clean-up comments
* | Simplify integration with googletest (#672)Gravatar Gil2018-01-17
| | | | | | | | This makes it possible to build the Firestore subproject with CLion because it no longer needs to be told where googletest is.
* | implement FieldValue for null, boolean, and array in C++. (#637)Gravatar zxu2018-01-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * implement FieldValue for null and boolean. * refactoring to use union type instead of poly * refactor using union design intead of poly * refactoring to use anonymous union and fix styles * small fix * add field_value_test to the project * fix warning of cmake and fix style
* | Fix C++ lint errors (#668)Gravatar Gil2018-01-17
| | | | | | | | | | | | | | | | | | | | | | | | | | * Misc style.sh fixes * Allow test-only to use a revision; to check your changes since master: ./scripts/style.sh test-only master * Avoid diffing deleted files * 80 columns * Fix C++ lint errors
* | Enable warnings in the CMake build (#669)Gravatar Gil2018-01-16
| | | | | | | | | | | | * Enable warnings when building with GCC or clang * Fix warnings
* | Add assert_test to the Xcode build (#671)Gravatar Gil2018-01-16
| | | | | | | | | | | | * Exclude stdio-backed assert from the Xcode build * Add assert_test to the Xcode build
| * Fix issue @morganchen12 discovered where we weren't properly creating ↵Gravatar Michael Lehenbauer2018-01-15
| | | | | | | | | | | | FIRQueryDocumentSnapshot instances. (#662)
* | Build gRPC for Firestore C++ (#652)Gravatar Gil2018-01-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Clean up quoting and other minor issues * Reorganize CMake build output Make it clearer which parts of the output pertain to external projects. * Use a consistent ordering of ExternalProject arguments * Prevent the top-level build from running in parallel This prevents spurious failures when running make -j. * Actually parse arguments in the xcodebuild function * Use ExternalProject features when available * submodule limits from CMake 3.0 * shallow clones from CMake 3.6 * git progress output from CMake 3.8 * Only build the parts of leveldb we need Skip building the tools and other libraries * Avoid installing ExternalProjects Consume build output directly so that we can build just the targets we need. Installing causes all targets to be built. This doesn't matter as much for these targets but the gRPC build includes a ton of stuff we don't need so it's worth adopting this as a general strategy. * Define an external build for grpc * Test that grpc can link successfully. * Add a FindGRPC CMake module * Actually comment ExternalProjext_GitSource
* | Fix issue @morganchen12 discovered where we weren't properly creating ↵Gravatar Michael Lehenbauer2018-01-12
| | | | | | | | | | | | FIRQueryDocumentSnapshot instances. (#662)
| * Merge remote-tracking branch 'origin/master' into release-4.8.1Gravatar Paul Beusterien2018-01-12
| |\ | |/ |/|
* | Fix import formatting (#660)Gravatar Paul Beusterien2018-01-12
| |
* | Remove over-aggressive closeWithFinalState: delegate assert. (#656)Gravatar Michael Lehenbauer2018-01-11
| | | | | | | | | | | | | | | | | | Fixes #596. closeWithFinalState: asserted delegate != nil, but that is not true if when startWithdelegate: was called we entered backoff (performBackoffWithDelegate:) and so self.delegate did not get assigned yet. We could rework the code to make the assertion hold, but per offline discussion this assert doesn't represent an invariant that we care about maintaining and so I'm just removing it.
| * Remove over-aggressive assert.Gravatar Michael Lehenbauer2018-01-11
| | | | | | | | | | | | | | | | | | | | closeWithFinalState: assumes delegate != nil, but that is not true if when startWithdelegate: was called we entered backoff (performBackoffWithDelegate:) and so self.delegate did not get assigned yet. We could rework the code to make the assertion hold, but per offline discussion this assert doesn't represent an invariant that we care about and so I'm just removing it.
| * Merge pull request #654 from firebase/masterGravatar Benoit St-Pierre2018-01-11
| |\ | |/ |/| Merge master into 4.8.1
* | Revert "Fully qualify protoc-generated outputs (#626)" (#653)Gravatar Gil2018-01-11
| | | | | | This reverts commit bc74670afec651c3f912cb6b7e54f5b68bd507f5.
| * Merge pull request #650 from firebase/bstpierre-version-bumpGravatar Benoit St-Pierre2018-01-11
| |\ | | | | | | Version bump for 4.8.1 Release
| * | Update from masterGravatar Benoit St-Pierre2018-01-11
| | | | | | | | | | | | | | | Picking up a few last-minute changes to CHANGELOGs and tests for 4.8.1 release.
| | * Version bump for 4.8.1 ReleaseGravatar Benoit St-Pierre2018-01-11
| |/ | | | | | | Updated the version numbers of pods which are being released in 4.8.1
* | Update CHANGELOG for Firestore v0.10.0 (#649)Gravatar Gil2018-01-11
| |
* | Fix FSTLocalDocumentsView to allow multiple mutations while offline (#644)Gravatar rsgowman2018-01-11
|/ | | | | * Fix FSTLocalDocumentsView to allow multiple mutations while offline. Previously, only the last mutation would actually be visible.
* Run style.sh (#636)Gravatar Michael Lehenbauer2018-01-10
| | | | Run style.sh (w/ clang-format version 6)
* Merge branch 'master' into mikelehen/merge-master-to-firestore-api-changesGravatar Michael Lehenbauer2018-01-09
|\
| * implement C++ assert (stdio, apple) (#612)Gravatar zxu2018-01-08
| | | | | | | | | | | | | | | | | | * implement C++ assert (stdio, apple) * Update tests for firebase_firestore_util renames * renaming `assert.h` to `firebase_assert.h` * refactoring to a common `WrapNSStringNoCopy()`
| * Port StringPrintf from //base (#624)Gravatar Gil2018-01-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Port StringPrintf from //base. Prefer this to approaches based on variadic templates. While the variadic template mechanisms are strictly safer, they result in binary bloat we can't afford. This is essentially the same StringPrintf previously open sourced as a part of protobuf, though updated for C++11 which saves a copy and a temporary buffer on the heap. * Add abseil as a subdirectory of Firestore This saves having to redefine all the libraries that abseil defines as imported libraries. * Rename firebase_firesture_util_log_* targets Cut the log out of the name to reflect that these will get more components besides just logging.
| * Fully qualify protoc-generated outputs (#626)Gravatar Gil2018-01-08
| | | | | | | | | | | | | | | | * Fully-qualify imports in the protocol compiler output * pbxproj updates from running pod update * New checked-in proto outputs
* | Fixing potential race in ServerTimestamp testsGravatar Sebastian Schmidt2018-01-05
| |
| * Build and test both C++ loggers where possible (#595)Gravatar Gil2018-01-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Rename FIREBASE_BINARY_DIR to FIREBASE_INSTALL_DIR Make this consistent with the outer superbuild and also make the association with CMAKE_INSTALL_PREFIX more obvious. * Build and test log_stdio separate from the rest of util This is in preparation for adding a test for log_apple * Build and test log_apple under CMake Also add notes about how FIRLogger's debug mode can break this test * Refactor log_apple to cut down duplicate switch statements There's also a slight reduction in final binary size.
* | Log pending writes when we disable the network (#604)Gravatar Greg Soltis2018-01-02
| | | | | | | | | | | | | | | | * Log pending writes when we disable the network * Fix formatting * Formatting
| * Build FirebaseCore from CMake (#594)Gravatar Gil2018-01-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Don't bother specifying a download directory to CMake ExternalProject * Teach CMake to build pure Xcode projects as dependencies This allows downstream code (like log_apple.mm) to consume this for testing within the CMake build without requiring a CMake-native build for these components. This makes integrating these components into the cmake build essentially free from the point of view of the consumed component. * Get the CMake build semi-working on Linux again Many prebuilt versions of cmake on Linux lack the ability to download over https so use git to get googletest. Don't attempt to build FirebaseCore on Linux; there's no xcodebuild. Note the build is still ultimately broken because we don't yet have an alternative to arc4random on Linux but at least this is no more broken than it was before.
| * Use the log_apple.mm logger from C++ on iOS (#593)Gravatar Gil2018-01-01
| | | | | | | | | | | | * Add all .mm files in Firestore/core to the build (which matches log_apple.mm). * Exclude log_stdio.cc * Add log_test.cc to the project
* | Fix races in lazy initialization of the client in FIRFirestore (#579)Gravatar Gil2017-12-20
| | | | | | | | | | | | | | | | * Fix races in lazy initialization of the client in FIRFirestore Note that lazy initialization is required because we allow the user to assign to settings after instantiation before any methods are used. Also bring method naming closer to the android port.
| * implement C++ logger (#575)Gravatar zxu2017-12-20
| | | | | | | | | | | | | | | | | | | | | | | | | | * implement logger, apple impl and other impl, with test. * some minor fixes * re-organize cmake build rules; * fix bugs in log_apple.mm; * style fix by style.sh * Complete removal of LogAssert
* | Rename all the onlineStateChanged methods to applyChangedOnlineState. (#574)Gravatar Michael Lehenbauer2017-12-19
| |
* | Firestore `isEqual()` on Public Types (#569)Gravatar zxu2017-12-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * add bone code for new isEqual and unit test for old isEqual * add bone code for `FIRCollectionReference`, `FIRDocumentSnapshot`, `FIRFieldValue`, `FIRQuerySnapshot`, `FIRSnapshotMetadata`; * change inconsistenciness of `FIRFieldPath.isEqual` implementation; * add unit test (and file) for `FIRDocumentReferenceTest.m`, `FIRFieldPathTest.m`, `FIRQueryTests.testEquals`; `FIRGeoPoint` already has test and Blob is internal type. * Implement isEqual for FIRCollectionReference adding the working code and unit test. * implement isEqual for FIRSnapshotMetadata * Implement isEqual for FIRDocumentSnapshot * Implement isEqual for FIRQuerySnapshot * (un)implement `isEqual` for `FIRFieldValue` Since `FIRFieldValue` both types are singleton, we do not need override `isEqual`. Add test to test the default `NSObject` `isEqual` works just fine. * fix style with `scripts/style.sh` * Implement hash for those with overridden isEqual without hash yet. * refactor to use test helper functions -- FSTTestFirestore, FSTTestPath, FSTTestDocKey * refactor using test helper `FSTTestDocSnapshot`, `FSTTestFieldPath`, `FSTTestQuery`, `FSTTestDoc` * refactoring to use test helper method `FSTTestQuerySnapshot`, * remove unneccessary nil-check, check isKindOfClass instead of isEqual * refactoring: adding `FSTAPIHelpers.{h,m}`, `FSTTest{Collection,Document}Ref`, better naming and style fix * a file forgot in last commit * mainly clean up import and some minor refactoring * fix style via style.sh * minor style fix * add pragma ignored -Wnonnull
| * Merge pull request #576 from firebase/release-4.8.0Gravatar Kyle Ju2017-12-19
| |\ | | | | | | Release 4.8.0
| * | Use angle brackets for nonlocal #includes in Firestore (#580)Gravatar Gil2017-12-19
| | |
* | | Clean up warnings (#578)Gravatar Gil2017-12-18
| | | | | | | | | | | | | | | * Clean up warnings * Remove optional parens around ifs
* | | Expose network management (#566)Gravatar Greg Soltis2017-12-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Expose network management in public API * Clean up a few more references to the internal access of network management * Move test * Update comments * Swap _Nullable for nullable * Fix comment * Add tests, including swift * Styling
* | | Test cleanup: Adds a helper for waiting for FSTVoidErrorBlock callbacks.Gravatar Michael Lehenbauer2017-12-18
| | | | | | | | | | | | | | | | | | | | | * Add helper for waiting for FSTVoidErrorBlock callbacks. * Remove errorEventHandler from FSTEventAccumulator.h too. * Add synchronous enableNetwork / disableNetwork helpers. * Workaround for batch writes test flakiness.
* | | Fixing return type of verifySnapshotWithResolvedTimestampsGravatar Sebastian Schmidt2017-12-18
| | | | | | | | | | | | This should address a crash that happens when a debugger is attached
* | | b/68276665: Raise isFromCache=true events when offline (#567)Gravatar Michael Lehenbauer2017-12-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Plumbs FSTOnlineState changes through to views. * View sets this.current to false on FSTOnlineStateFailed, triggering isFromCache=true events. It will automatically be returned to true once the listen is reestablished and we get a new CURRENT message. * Updated tests (and added one new one) to verify behavior. * Unifies setOnlineStateToUnknown, setOnlineStateToHealthy, and updateAndBroadcastOnlineState into a single updateOnlineState method. * Split disableNetwork into (public) disableNetwork and (private) disableNetworkWithTargetOnlineState methods.. * Some miscellaneous comment cleanup. * Add missing comment per CR feedback.
* | | Merge pull request #565 from firebase/mrschmidt-missingmethodsGravatar Sebastian Schmidt2017-12-15
|\ \ \ | | | | | | | | Adding missing SnapshotOptions method