* Appends a given bson value to the writer with the specified path. */
| 833 | * Appends a given bson value to the writer with the specified path. |
| 834 | */ |
| 835 | void |
| 836 | PgbsonWriterAppendValue(pgbson_writer *writer, const char *path, uint32_t pathLength, |
| 837 | const bson_value_t *value) |
| 838 | { |
| 839 | if (!bson_append_value(&(writer->innerBson), path, pathLength, value)) |
| 840 | { |
| 841 | ereport(ERROR, (errcode(ERRCODE_DOCUMENTDB_BADVALUE), errmsg( |
| 842 | "adding %s value: failed due to value being too large", |
| 843 | BsonTypeName(value->value_type))) |
| 844 | ); |
| 845 | } |
| 846 | } |
| 847 | |
| 848 | |
| 849 | /* |
no test coverage detected