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

Function PgbsonWriterAppendUtf8

pg_documentdb_core/src/io/pgbson.c:935–945  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

933 * Appends a given string to the writer with the specified path.
934 */
935void
936PgbsonWriterAppendUtf8(pgbson_writer *writer, const char *path, uint32_t pathLength,
937 const char *string)
938{
939 if (!bson_append_utf8(&(writer->innerBson), path, pathLength, string, strlen(string)))
940 {
941 ereport(ERROR, (errcode(ERRCODE_DOCUMENTDB_BADVALUE),
942 errmsg(
943 "adding UTF8 value: failed due to value being too large")));
944 }
945}
946
947
948/*

Calls

no outgoing calls

Tested by

no test coverage detected