diff options
author | zxu <zxu@google.com> | 2018-03-14 08:57:31 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-14 08:57:31 -0400 |
commit | 9e815620e9f7f43b42e03db4e5118d7ad03ddee7 (patch) | |
tree | 86f362bad99281325fca7ee3ae116b6a0f36d511 /Firestore/Source/Remote/FSTDatastore.mm | |
parent | d4d73ea53ecdf1e8ade3d00921419645dd5d66f7 (diff) |
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
Diffstat (limited to 'Firestore/Source/Remote/FSTDatastore.mm')
-rw-r--r-- | Firestore/Source/Remote/FSTDatastore.mm | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/Firestore/Source/Remote/FSTDatastore.mm b/Firestore/Source/Remote/FSTDatastore.mm index 3b536ab..e63017a 100644 --- a/Firestore/Source/Remote/FSTDatastore.mm +++ b/Firestore/Source/Remote/FSTDatastore.mm @@ -111,10 +111,9 @@ typedef GRPCProtoCall * (^RPCFactory)(void); } - (NSString *)description { - return [NSString - stringWithFormat:@"<FSTDatastore: <DatabaseInfo: database_id:%@ host:%@>>", - util::WrapNSStringNoCopy(self.databaseInfo->database_id().database_id()), - util::WrapNSStringNoCopy(self.databaseInfo->host())]; + return [NSString stringWithFormat:@"<FSTDatastore: <DatabaseInfo: database_id:%s host:%s>>", + self.databaseInfo->database_id().database_id().c_str(), + self.databaseInfo->host().c_str()]; } /** @@ -186,9 +185,8 @@ typedef GRPCProtoCall * (^RPCFactory)(void); /** Returns the string to be used as google-cloud-resource-prefix header value. */ + (NSString *)googleCloudResourcePrefixForDatabaseID:(const DatabaseId *)databaseID { - return [NSString stringWithFormat:@"projects/%@/databases/%@", - util::WrapNSStringNoCopy(databaseID->project_id()), - util::WrapNSStringNoCopy(databaseID->database_id())]; + return [NSString stringWithFormat:@"projects/%s/databases/%s", databaseID->project_id().c_str(), + databaseID->database_id().c_str()]; } /** * Takes a dictionary of (HTTP) response headers and returns the set of whitelisted headers |