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

Function PgbsonWriterAppendValue

pg_documentdb_core/src/io/pgbson.c:835–846  ·  view source on GitHub ↗

* Appends a given bson value to the writer with the specified path. */

Source from the content-addressed store, hash-verified

833 * Appends a given bson value to the writer with the specified path.
834 */
835void
836PgbsonWriterAppendValue(pgbson_writer *writer, const char *path, uint32_t pathLength,
837 const bson_value_t *value)
838{
839 if (!bson_append_value(&(writer->innerBson), path, pathLength, value))
840 {
841 ereport(ERROR, (errcode(ERRCODE_DOCUMENTDB_BADVALUE), errmsg(
842 "adding %s value: failed due to value being too large",
843 BsonTypeName(value->value_type)))
844 );
845 }
846}
847
848
849/*

Calls 1

BsonTypeNameFunction · 0.85

Tested by

no test coverage detected