1MONGOC_COLLECTION_VALIDATE(3) libmongoc MONGOC_COLLECTION_VALIDATE(3)
2
3
4
6 mongoc_collection_validate - mongoc_collection_validate()
7
9 bool
10 mongoc_collection_validate (mongoc_collection_t *collection,
11 const bson_t *options,
12 bson_t *reply,
13 bson_error_t *error);
14
16 This helper function is deprecated and should not be used in new code.
17 Run the validate command directly with
18 mongoc_client_read_command_with_opts() instead.
19
21 • collection: A mongoc_collection_t.
22
23 • options: A bson_t.
24
25 • reply: An optional location for a bson_t.
26
27 • error: An optional location for a bson_error_t or NULL.
28
30 This function is a helper function to execute the validate MongoDB com‐
31 mand.
32
33 Currently, the only supported options are full, which is a boolean and
34 scandata, also a boolean.
35
36 See the MongoDB documentation for more information on this command.
37
39 Errors are propagated via the error parameter.
40
42 Returns true if successful. Returns false and sets error if there are
43 invalid arguments or a server or network error.
44
45 reply is always initialized if it's not NULL and must be destroyed with
46 bson_destroy().
47
49 MongoDB, Inc
50
52 2017-present, MongoDB, Inc
53
54
55
56
571.23.1 Oct 20, 2022 MONGOC_COLLECTION_VALIDATE(3)