* Appends a "Start document" to the current writer and returns the writer to append to the child document. */
| 1224 | * Appends a "Start document" to the current writer and returns the writer to append to the child document. |
| 1225 | */ |
| 1226 | void |
| 1227 | PgbsonWriterStartDocument(pgbson_writer *writer, const char *path, uint32_t pathLength, |
| 1228 | pgbson_writer *childWriter) |
| 1229 | { |
| 1230 | if (!bson_append_document_begin(&(writer->innerBson), path, pathLength, |
| 1231 | &(childWriter->innerBson))) |
| 1232 | { |
| 1233 | ereport(ERROR, (errcode(ERRCODE_DOCUMENTDB_BADVALUE), errmsg( |
| 1234 | "adding StartDocument value: failed due to value being too large")) |
| 1235 | ); |
| 1236 | } |
| 1237 | } |
| 1238 | |
| 1239 | |
| 1240 | /* |
no outgoing calls
no test coverage detected