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

Function PgbsonWriterStartArray

pg_documentdb_core/src/io/pgbson.c:1042–1055  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1040 * Appends a "start array" to the writer and returns a writer to append to the child array inserted.
1041 */
1042pgbson_require_alignment() void
1043PgbsonWriterStartArray(pgbson_writer *writer, const char *path, uint32_t pathLength,
1044 pgbson_array_writer *childWriter)
1045{
1046 if (!bson_append_array_begin(&(writer->innerBson), path, pathLength,
1047 &(childWriter->innerBson)))
1048 {
1049 ereport(ERROR, (errcode(ERRCODE_DOCUMENTDB_BADVALUE), errmsg(
1050 "adding StartArray value: failed due to value being too large"))
1051 );
1052 }
1053
1054 childWriter->index = 0;
1055}
1056
1057
1058/*

Calls

no outgoing calls

Tested by

no test coverage detected