* Converts a bson_value_t into a serializable pgbson bson document using the format * { "": } - this is equivalent to writing a single pgbson_element with the empty path */
| 1793 | * { "": <value> } - this is equivalent to writing a single pgbson_element with the empty path |
| 1794 | */ |
| 1795 | pgbson * |
| 1796 | BsonValueToDocumentPgbson(const bson_value_t *value) |
| 1797 | { |
| 1798 | pgbson_writer writer; |
| 1799 | PgbsonWriterInit(&writer); |
| 1800 | PgbsonWriterAppendValue(&writer, "", 0, value); |
| 1801 | pgbson *bson = PgbsonWriterGetPgbson(&writer); |
| 1802 | return bson; |
| 1803 | } |
| 1804 | |
| 1805 | |
| 1806 | /* --------------------------------------------------------- */ |
no test coverage detected