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

Function BuildResponseMessage

pg_documentdb/src/commands/coll_stats.c:1035–1046  ·  view source on GitHub ↗

* BuildResponseMessage func builds the pgbson response for the collStats() command */

Source from the content-addressed store, hash-verified

1033 * BuildResponseMessage func builds the pgbson response for the collStats() command
1034 */
1035static pgbson *
1036BuildResponseMessage(CollStatsResult *result)
1037{
1038 pgbson_writer writer;
1039 PgbsonWriterInit(&writer);
1040
1041 PgbsonWriterAppendUtf8(&writer, "ns", 2, result->ns);
1042 WriteCoreStorageStats(result, &writer);
1043 PgbsonWriterAppendInt32(&writer, "ok", 2, result->ok);
1044
1045 return PgbsonWriterGetPgbson(&writer);
1046}
1047
1048
1049/*

Callers 1

CollStatsCoordinatorFunction · 0.70

Calls 5

PgbsonWriterInitFunction · 0.85
PgbsonWriterAppendUtf8Function · 0.85
WriteCoreStorageStatsFunction · 0.85
PgbsonWriterAppendInt32Function · 0.85
PgbsonWriterGetPgbsonFunction · 0.85

Tested by

no test coverage detected