SYNOPSIS

char **
mongoc_database_get_collection_names (mongoc_database_t *database,
                                      bson_error_t      *error);

DESCRIPTION

The mongoc_database_get_collection_names() function shall return a NULL terminated array of strings containing the names of the available collections.

RETURN VALUE

The mongoc_database_get_collection_names() function shall return an array of strings if successful, otherwise NULL.

The result should be freed with bson_strfreev().

ERRORS

errors are returned through error.

EXAMPLE

char **str;
int i;

if ((str = mongoc_database_get_collection_names (db, &error))) {
   for (i = 0; str [i]; i++) {
      printf ("%s\n", str [i]);
   }
}

bson_strfreev (str);

AUTHORS

This page was written by MongoDB Inc.