mongoc_matcher_new()¶
Synopsis¶
mongoc_matcher_t *
mongoc_matcher_new (const bson_t *query, bson_error_t *error);
Create a new mongoc_matcher_t using the query specification provided.
Deprecated¶
Warning
mongoc_matcher_t
is deprecated and will be removed in version 2.0.
Parameters¶
query
: Abson_t
.error
: An optional location for a bson_error_t orNULL
.
Errors¶
Errors are propagated via the error
parameter.
Returns¶
A newly allocated mongoc_matcher_t that should be freed with mongoc_matcher_destroy() when no longer in use. Upon failure, NULL
is returned and error
is set. This could happen if query
contains an invalid query specification.