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