Scroll to navigation

MONGOC_COLLECTION_ENSURE_INDEX(3) Library Functions Manual MONGOC_COLLECTION_ENSURE_INDEX(3)

NAME

mongoc_collection_ensure_index() - None

SYNOPSIS


bool mongoc_collection_ensure_index (mongoc_collection_t *collection, const bson_t *keys, const mongoc_index_opt_t *opt, bson_error_t *error) BSON_GNUC_DEPRECATED_FOR (mongoc_collection_create_index);

DEPRECATED

NOTE
This function is deprecated and should not be used in new code.

Please use mongoc_collection_create_index(3) instead.

PARAMETERS

collection
A mongoc_collection_t
keys
A bson_t
opt
A mongoc_index_opt_t.
error
An optional location for a bson_error_t or NULL

ERRORS

Errors are propagated via the error parameter.

COLOPHON

This page is part of MongoDB C Driver. Please report any bugs at https://jira.mongodb.org/browse/CDRIVER.
2016‐10‐12 MongoDB C Driver