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

Function PgbsonWriterAppendInt32

pg_documentdb_core/src/io/pgbson.c:885–895  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

883 * Appends a given integer to the writer with the specified path.
884 */
885void
886PgbsonWriterAppendInt32(pgbson_writer *writer, const char *path, uint32_t pathLength,
887 int value)
888{
889 if (!bson_append_int32(&(writer->innerBson), path, pathLength, value))
890 {
891 ereport(ERROR, (errcode(ERRCODE_DOCUMENTDB_BADVALUE),
892 errmsg(
893 "adding Int32 value: failed due to value being too large")));
894 }
895}
896
897
898/*

Calls

no outgoing calls

Tested by

no test coverage detected