| 2351 | |
| 2352 | |
| 2353 | static void |
| 2354 | CallUpdateWorkerForUpdateOne(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 | |
| 2373 | static void |
no test coverage detected