MCPcopy Create free account
hub / github.com/documentdb/documentdb / InitBsonValueAsEmptyArray

Function InitBsonValueAsEmptyArray

pg_documentdb_core/src/io/pgbson.c:1906–1913  ·  view source on GitHub ↗

* Initializes a BSON value as an empty array. * outValue - Pointer to the BSON value to initialize. */

Source from the content-addressed store, hash-verified

1904 * outValue - Pointer to the BSON value to initialize.
1905 */
1906void
1907InitBsonValueAsEmptyArray(bson_value_t *outValue)
1908{
1909 const pgbson *emptyDoc = PgbsonInitEmpty();
1910 outValue->value_type = BSON_TYPE_ARRAY;
1911 outValue->value.v_doc.data_len = VARSIZE_ANY_EXHDR(emptyDoc);
1912 outValue->value.v_doc.data = (uint8_t *) VARDATA_ANY(emptyDoc);
1913}
1914
1915
1916/*

Callers 3

ParseDollarRegexFindAllFunction · 0.85
ParseDollarMakeArrayFunction · 0.85

Calls 1

PgbsonInitEmptyFunction · 0.85

Tested by

no test coverage detected