Commit Graph
20 Commits
Author SHA1 Message Date
Gil 8428d4a8e2 Migrate null, numbers, and GeoPoints to FSTDelegateValue (#3044)
* Migrate FSTNullValue to FSTDelegateValue
* Migrate FSTIntegerValue to FSTDelegateValue
* Migrate FSTDoubleValue to FSTDelegateValue
* Migrate FSTGeoPointValue to FSTDelegateValue
2019-05-26 10:02:21 -07:00
Gil 2a97c2ea5f Port FSTRelationFilterOperator to Filter::Operator (#2812)
Note:
  * This includes a partial port of array-contains for Filters because
    this silenced a warning about an unhandled case
  * There's some sensitivity to the order of the cases that I didn't
    bother to figure out; instead I just made it match what came before.
2019-04-11 13:35:09 -07:00
Gil c2a3d04e6d Port FSTDocumentSet to C++ (#2608)
* Replace FSTDocumentSet's guts with immutable::SortedSet.

* Port FSTDocumentSet to C++ DocumentSet.

* Replace implementation of FSTDocumentSet with C++ DocumentSet

* Update all usages of FSTDocumentSet

* Remove FSTDocumentSet

* Add Objective-C++ guard

* Use absl::c_equal instead of hand-rolling it.

* Split SortedContainer out of SortedMapBase

... and use it

* Fix NSNotFound -> npos

* Remove = default constructors that aren't true.

These are implicitly deleted because DocumentSet is a member and isn't
default constructible.

* Fix usage of FSTQuery.limit
2019-03-25 11:04:21 -07:00
Gil 38815b03f6 Add xcgmock (#2595)
* Add operator<< to a few types

* Add xcgmock

* Use gmock matchers in XCTest

* Add gmock to integration test header search paths
2019-03-21 14:48:55 -07:00
Konstantin Varlamov 48009aaf7d C++ migration: port FSTViewSnapshot (#2441)
Also add a version of `ToString` taking an `absl::optional`
2019-03-01 14:16:41 -05:00
Konstantin Varlamov 7cc0a9bc98 C++ migration: port FSTDocumentViewChangeSet (#2406) 2019-02-25 14:10:17 -05:00
Konstantin Varlamov 19fa24cecd C++ migration: port FSTDocumentViewChange (#2388) 2019-02-19 18:30:12 -05:00
Konstantin Varlamov 8626e31feb C++ migration: port FSTRemoteEvent (#2320) 2019-01-29 18:55:25 -05:00
Konstantin Varlamov f08a8bc6dd C++ migration: port FSTTargetChange (#2318) 2019-01-29 15:10:18 -05:00
Konstantin Varlamov 0a58581bda C++ migration: make DocumentViewChangeType a C++ enum (#2307) 2019-01-24 14:09:42 -05:00
Paul Beusterien 7c53489e03 Travis to Xcode 10.1 and clang-format to 8.0.0 (tags/google/stable/2018-08-24) (#2222)
* Travis to Xcode 10.1
* Update to clang-format 8
* Update clang-format homebrew link
* Work around space in filename style.sh issue
2019-01-02 09:27:31 -08:00
Konstantin Varlamov 673b08592a C++: replace FSTMaybeDocumentDictionary with a C++ equivalent (#2139)
Also eliminate most usages of `FSTDocumentKey`, remove most methods from the Objective-C class and make it just a wrapper over `DocumentKey`. The only usage that cannot be directly replaced by C++ `DocumentKey` is in `FSTFieldValue`.
2018-12-10 11:57:08 -08:00
Sebastian Schmidt 5bc4cc55a6 Remove Held Write Acks (#2029)
* Drop acknowledged mutations in schema migration (#1818)

Drop acknowledged mutations in schema migration as part of removing held write acks.

Port of firebase/firebase-js-sdk#1149

* Change removeMutationBatch to remove a single batch (#1955)

* Update Firestore Generated Protos

*  Adding UnknownDocument and hasCommittedMutations (#1971)

* Removing held write batch handling from LocalStore (#1997)

* View changes for held write acks (#2004)

* Held Write Acks Unit Test Fixes (#2008)

* Held Write Ack Removal Spec Tests (#2018)

* Fix integration test
2018-11-01 09:44:30 -07:00
Michael Lehenbauer b88f95c44f Reformat using 'clang-format version 7.0.0 (tags/google/stable/2018-04-24)' (#1681)
This is the version of clang-format that travis is currently using.
2018-08-13 14:18:02 -07:00
Sebastian Schmidt afea8d5aac Refactor Remote Event (#1396) 2018-06-12 10:58:35 -07:00
Gil a080e481b5 Port FSTDocumentKeySet to C++ DocumentKeySet (#1229)
* Define a Comparator for DocumentKey

* Automated migration from FSTDocumentKeySet to DocumentKeySet

* Manual fixups for DocumentKeySet

* Delete FSTDocumentKeySet
2018-05-05 08:10:51 -07:00
zxu 4e7296b080 port DocumentKey to non-container types of Model/* (#930)
* 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

* add converter function between two DocumentKey implementations

* add unit test

* address changes

* fix lint

* using DocumentKey in model except for the container types `FSTDocumentDictionary`, `FSTDocumentKeySet`, and  `FSTDocumentVersionDictionary`

* change other place w.r.t. the use of `DocumentKey` in model

* update parameter of test helpers from NSString to string_view

* revert a temporary change used in debug

* address changes
2018-03-16 15:42:05 -04:00
zxu 9e815620e9 grand PR to port the remaining paths (FieldPath and ResourcePath). (#865)
* 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
2018-03-14 08:57:31 -04:00
zxu 1c40e7aada add converters and port paths to FSTQuery (#869)
* 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
2018-03-05 11:30:59 -05:00
Gil 729b8d176c Move all Firestore Objective-C to Objective-C++ (#734)
* 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
2018-01-31 11:23:55 -08:00