* Appends an empty array to the writer with a specified path. */
| 1400 | * Appends an empty array to the writer with a specified path. |
| 1401 | */ |
| 1402 | void |
| 1403 | PgbsonWriterAppendEmptyArray(pgbson_writer *writer, const char *path, uint32_t pathLength) |
| 1404 | { |
| 1405 | bson_t emptyArray; |
| 1406 | bson_init(&emptyArray); |
| 1407 | if (!bson_append_array(&(writer->innerBson), path, pathLength, &emptyArray)) |
| 1408 | { |
| 1409 | ereport(ERROR, (errcode(ERRCODE_DOCUMENTDB_BADVALUE), errmsg( |
| 1410 | "adding AppendEmptyArray value: failed due to value being too large")) |
| 1411 | ); |
| 1412 | } |
| 1413 | } |
| 1414 | |
| 1415 | |
| 1416 | /* |
no outgoing calls
no test coverage detected