| 1040 | * Appends a "start array" to the writer and returns a writer to append to the child array inserted. |
| 1041 | */ |
| 1042 | pgbson_require_alignment() void |
| 1043 | PgbsonWriterStartArray(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 | /* |
no outgoing calls
no test coverage detected