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

Function SerializeDeleteOneResult

pg_documentdb/src/commands/delete.c:1651–1671  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1649
1650
1651static pgbson *
1652SerializeDeleteOneResult(DeleteOneResult *result)
1653{
1654 pgbson_writer writer;
1655 PgbsonWriterInit(&writer);
1656
1657 PgbsonWriterAppendBool(&writer, "isRowDeleted", 12, result->isRowDeleted);
1658
1659 if (result->objectId != NULL)
1660 {
1661 PgbsonWriterAppendDocument(&writer, "objectId", 8, result->objectId);
1662 }
1663
1664 if (result->resultDeletedDocument != NULL)
1665 {
1666 PgbsonWriterAppendDocument(&writer, "resultDeletedDocument", 21,
1667 result->resultDeletedDocument);
1668 }
1669
1670 return PgbsonWriterGetPgbson(&writer);
1671}
1672
1673
1674static pgbson *

Callers 1

command_delete_workerFunction · 0.85

Calls 4

PgbsonWriterInitFunction · 0.85
PgbsonWriterAppendBoolFunction · 0.85
PgbsonWriterGetPgbsonFunction · 0.85

Tested by

no test coverage detected