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

Function PgbsonInitFromDocumentBsonValue

pg_documentdb_core/src/io/pgbson.c:589–599  ·  view source on GitHub ↗

* PgbsonInitFromIterDocumentValue initializes a pgbson structure from the * document that given value holds. */

Source from the content-addressed store, hash-verified

587 * document that given value holds.
588 */
589pgbson *
590PgbsonInitFromDocumentBsonValue(const bson_value_t *value)
591{
592 if (value->value_type != BSON_TYPE_DOCUMENT)
593 {
594 ereport(ERROR, (errmsg("expected a document to create a bson object")));
595 }
596
597 return PgbsonInitFromBuffer((char *) value->value.v_doc.data,
598 value->value.v_doc.data_len);
599}
600
601
602/*

Calls 1

PgbsonInitFromBufferFunction · 0.85

Tested by

no test coverage detected