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

Function PgbsonHasDocumentId

pg_documentdb_core/src/io/pgbson.c:1859–1864  ·  view source on GitHub ↗

* PgbsonHasDocumentId returns whether a pgbson has the _id field set. */

Source from the content-addressed store, hash-verified

1857 * PgbsonHasDocumentId returns whether a pgbson has the _id field set.
1858 */
1859bool
1860PgbsonHasDocumentId(const pgbson *document)
1861{
1862 bson_iter_t it;
1863 return PgbsonInitIteratorAtPath(document, "_id", &it);
1864}
1865
1866
1867/*

Callers 1

ProcessInsertionFunction · 0.85

Calls 1

PgbsonInitIteratorAtPathFunction · 0.85

Tested by

no test coverage detected