diff options
author | zxu <zxu@google.com> | 2018-04-05 11:52:07 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-05 11:52:07 -0400 |
commit | db717bf6704b444b093d46f53935402c83441854 (patch) | |
tree | 11f69c3ba737c7509f620f3660d6c8d6057fc2d7 /Firestore/Source/API | |
parent | 7257c0d22727a7e94867992aa2f1a3e283dc6bb7 (diff) |
Port transform operations to C++ (#1020)
* 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
Diffstat (limited to 'Firestore/Source/API')
-rw-r--r-- | Firestore/Source/API/FSTUserDataConverter.mm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Firestore/Source/API/FSTUserDataConverter.mm b/Firestore/Source/API/FSTUserDataConverter.mm index 34f1015..c6a6e34 100644 --- a/Firestore/Source/API/FSTUserDataConverter.mm +++ b/Firestore/Source/API/FSTUserDataConverter.mm @@ -37,6 +37,7 @@ #include "Firestore/core/src/firebase/firestore/model/document_key.h" #include "Firestore/core/src/firebase/firestore/model/field_mask.h" #include "Firestore/core/src/firebase/firestore/model/field_path.h" +#include "Firestore/core/src/firebase/firestore/model/transform_operations.h" #include "Firestore/core/src/firebase/firestore/util/string_apple.h" #include "absl/memory/memory.h" @@ -45,6 +46,7 @@ using firebase::firestore::model::DatabaseId; using firebase::firestore::model::DocumentKey; using firebase::firestore::model::FieldMask; using firebase::firestore::model::FieldPath; +using firebase::firestore::model::ServerTimestampTransform; NS_ASSUME_NONNULL_BEGIN @@ -662,7 +664,8 @@ typedef NS_ENUM(NSInteger, FSTUserDataSource) { [context.fieldTransforms addObject:[[FSTFieldTransform alloc] initWithPath:*context.path - transform:[FSTServerTimestampTransform serverTimestampTransform]]]; + transform:absl::make_unique<ServerTimestampTransform>( + ServerTimestampTransform::Get())]]; // Return nil so this value is omitted from the parsed result. return nil; |