From db717bf6704b444b093d46f53935402c83441854 Mon Sep 17 00:00:00 2001 From: zxu Date: Thu, 5 Apr 2018 11:52:07 -0400 Subject: 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 --- Firestore/Source/API/FSTUserDataConverter.mm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Firestore/Source/API') 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::Get())]]; // Return nil so this value is omitted from the parsed result. return nil; -- cgit v1.2.3