diff options
author | zxu <zxu@google.com> | 2018-03-16 15:42:05 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-16 15:42:05 -0400 |
commit | 4e7296b080b9c8cea13e5e5eeee65f4312fb5e8a (patch) | |
tree | 87f175b1e1ac74632fee2ff7c52ccb9b5bc78014 /Firestore/Source/Model/FSTMutation.h | |
parent | 1395c8202b236188b9e4e1bfc2a3e00244179593 (diff) |
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
Diffstat (limited to 'Firestore/Source/Model/FSTMutation.h')
-rw-r--r-- | Firestore/Source/Model/FSTMutation.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Firestore/Source/Model/FSTMutation.h b/Firestore/Source/Model/FSTMutation.h index 2d29dc9..4e4357d 100644 --- a/Firestore/Source/Model/FSTMutation.h +++ b/Firestore/Source/Model/FSTMutation.h @@ -18,10 +18,10 @@ #include <vector> +#include "Firestore/core/src/firebase/firestore/model/document_key.h" #include "Firestore/core/src/firebase/firestore/model/field_path.h" @class FSTDocument; -@class FSTDocumentKey; @class FSTFieldValue; @class FSTMaybeDocument; @class FSTObjectValue; @@ -155,7 +155,7 @@ typedef NS_ENUM(NSUInteger, FSTPreconditionExists) { - (id)init NS_UNAVAILABLE; -- (instancetype)initWithKey:(FSTDocumentKey *)key +- (instancetype)initWithKey:(firebase::firestore::model::DocumentKey)key precondition:(FSTPrecondition *)precondition NS_DESIGNATED_INITIALIZER; /** @@ -215,7 +215,7 @@ typedef NS_ENUM(NSUInteger, FSTPreconditionExists) { baseDocument:(nullable FSTMaybeDocument *)baseDoc localWriteTime:(nullable FIRTimestamp *)localWriteTime; -@property(nonatomic, strong, readonly) FSTDocumentKey *key; +- (const firebase::firestore::model::DocumentKey &)key; /** The precondition for this mutation. */ @property(nonatomic, strong, readonly) FSTPrecondition *precondition; @@ -230,7 +230,7 @@ typedef NS_ENUM(NSUInteger, FSTPreconditionExists) { */ @interface FSTSetMutation : FSTMutation -- (instancetype)initWithKey:(FSTDocumentKey *)key +- (instancetype)initWithKey:(firebase::firestore::model::DocumentKey)key precondition:(FSTPrecondition *)precondition NS_UNAVAILABLE; /** @@ -241,7 +241,7 @@ typedef NS_ENUM(NSUInteger, FSTPreconditionExists) { * key. * @param precondition The precondition for this mutation. */ -- (instancetype)initWithKey:(FSTDocumentKey *)key +- (instancetype)initWithKey:(firebase::firestore::model::DocumentKey)key value:(FSTObjectValue *)value precondition:(FSTPrecondition *)precondition NS_DESIGNATED_INITIALIZER; @@ -263,7 +263,7 @@ typedef NS_ENUM(NSUInteger, FSTPreconditionExists) { @interface FSTPatchMutation : FSTMutation /** Returns the precondition for the given FSTPrecondition. */ -- (instancetype)initWithKey:(FSTDocumentKey *)key +- (instancetype)initWithKey:(firebase::firestore::model::DocumentKey)key precondition:(FSTPrecondition *)precondition NS_UNAVAILABLE; /** @@ -277,7 +277,7 @@ typedef NS_ENUM(NSUInteger, FSTPreconditionExists) { * to determine the locations at which it should be applied). * @param precondition The precondition for this mutation. */ -- (instancetype)initWithKey:(FSTDocumentKey *)key +- (instancetype)initWithKey:(firebase::firestore::model::DocumentKey)key fieldMask:(FSTFieldMask *)fieldMask value:(FSTObjectValue *)value precondition:(FSTPrecondition *)precondition NS_DESIGNATED_INITIALIZER; @@ -306,7 +306,7 @@ typedef NS_ENUM(NSUInteger, FSTPreconditionExists) { */ @interface FSTTransformMutation : FSTMutation -- (instancetype)initWithKey:(FSTDocumentKey *)key +- (instancetype)initWithKey:(firebase::firestore::model::DocumentKey)key precondition:(FSTPrecondition *)precondition NS_UNAVAILABLE; /** @@ -315,7 +315,7 @@ typedef NS_ENUM(NSUInteger, FSTPreconditionExists) { * @param key Identifies the location of the document to mutate. * @param fieldTransforms A list of FSTFieldTransform objects to perform to the document. */ -- (instancetype)initWithKey:(FSTDocumentKey *)key +- (instancetype)initWithKey:(firebase::firestore::model::DocumentKey)key fieldTransforms:(NSArray<FSTFieldTransform *> *)fieldTransforms NS_DESIGNATED_INITIALIZER; |