MCPcopy Create free account
hub / github.com/documentdb/documentdb / CallUpdateWorkerForUpdateOne

Function CallUpdateWorkerForUpdateOne

pg_documentdb/src/commands/update.c:2353–2370  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2351
2352
2353static void
2354CallUpdateWorkerForUpdateOne(MongoCollection *collection,
2355 UpdateOneParams *updateOneParams,
2356 int64 shardKeyHash, text *transactionId,
2357 UpdateOneResult *result)
2358{
2359 /* initialize result */
2360 memset(result, 0, sizeof(UpdateOneResult));
2361
2362 pgbson *workerParams = SerializeUpdateOneParams(updateOneParams,
2363 collection->shardKey);
2364 Datum resultDatum = CallUpdateWorker(collection, workerParams, NULL,
2365 shardKeyHash, transactionId);
2366
2367 pfree(workerParams);
2368 pgbson *resultPgbson = DatumGetPgBson(resultDatum);
2369 DeserializeUpdateOneResult(resultPgbson, result);
2370}
2371
2372
2373static void

Callers 1

CallUpdateOneFunction · 0.85

Calls 3

SerializeUpdateOneParamsFunction · 0.85
CallUpdateWorkerFunction · 0.85

Tested by

no test coverage detected