MONGOC_MATCHER_T - Online Linux Manual Page
Section : 3
Updated : Feb 04, 2021
Source : 1.17.4
Note : libmongoc
NAMEmongoc_matcher_t − mongoc_matcher_t Client−side document matching abstraction
SYNOPSIS typedef struct _mongoc_matcher_t mongoc_matcher_t;
mongoc_matcher_t provides a reduced−interface for client−side matching of BSON documents. It can perform the basics such as $in, $nin, $eq, $neq, $gt, $gte, $lt, and $lte. WARNING: mongoc_matcher_t does not currently support the full spectrum of query operations that the MongoDB server supports.
DEPRECATEDWARNING: mongoc_matcher_t is deprecated and will be removed in version 2.0.
EXAMPLEFilter a sequence of BSON documents from STDIN based on a query #include <bson/bson.h>
#include <mongoc/mongoc.h>
#include <stdio.h>
int
main (int argc, char *argv[])
{
mongoc_matcher_t *matcher;
bson_reader_t *reader;
const bson_t *bson;
bson_t *spec;
char *str;
int fd;
mongoc_init ();
#ifdef _WIN32
fd = fileno (stdin);
#else
fd = STDIN_FILENO;
#endif
reader = bson_reader_new_from_fd (fd, false);
spec = BCON_NEW ("hello", "world");
matcher = mongoc_matcher_new (spec, NULL);
while ((bson = bson_reader_read (reader, NULL))) {
if (mongoc_matcher_match (matcher, bson)) {
str = bson_as_canonical_extended_json (bson, NULL);
printf ("%s\n", str);
bson_free (str);
}
}
bson_reader_destroy (reader);
bson_destroy (spec);
mongoc_cleanup ();
return 0;
}
AUTHORMongoDB, Inc
COPYRIGHT2017-present, MongoDB, Inc 0
Johanes Gumabo
Data Size : 8,203 byte
man-mongoc_matcher_t.3Build : 2025-03-22, 13:26 :
Visitor Screen : x
Visitor Counter ( page / site ) : 4 / 1,383,856
Visitor ID : :
Visitor IP : 18.217.212.222 :
Visitor Provider : AMAZON-02 :
Provider Position ( lat x lon ) : 39.962500 x -83.006100 : x
Provider Accuracy Radius ( km ) : 1000 :
Provider City : Columbus :
Provider Province : Ohio , : ,
Provider Country : United States :
Provider Continent : North America :
Visitor Recorder : Version :
Visitor Recorder : Library :
Online Linux Manual Page : Version : Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 25.03.22
Online Linux Manual Page : Library : lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page : Library : lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base : Version : Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base : Library : lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.