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