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

Function PgbsonDecomposeFields

pg_documentdb_core/src/io/pgbson_utils.c:127–132  ·  view source on GitHub ↗

* PgbsonDecomposeFields takes a bson object and splits its fields into * individual (single-element) bson objects. * * .e.g.: {"a": [1,2,3], "b": {"x": 1, "y": 1}} -> * List[{"a": [1,2,3]}, {"b": {"x": 1, "y": 1}}] */

Source from the content-addressed store, hash-verified

125 * List[{"a": [1,2,3]}, {"b": {"x": 1, "y": 1}}]
126 */
127List *
128PgbsonDecomposeFields(const pgbson *document)
129{
130 bson_value_t docValue = ConvertPgbsonToBsonValue(document);
131 return BsonValueDocumentDecomposeFields(&docValue);
132}
133
134
135/*

Callers

nothing calls this directly

Calls 2

ConvertPgbsonToBsonValueFunction · 0.85

Tested by

no test coverage detected