mongoc_database_get_collection_names()
.Fetches a NULL
terminated array of NULL-byte
terminated char*
strings
containing the names of all of the collections in database.
# Wrapper for `mongoc_database_get_collection_names()`.
#
# Fetches a `NULL` terminated array of `NULL-byte` terminated `char*` strings
# containing the names of all of the collections in database.
fun collection_names: nullable NativeCStringArray
import set_mongoc_error, NativeCStringArray, NativeCStringArray.as nullable `{
bson_error_t error;
char **strv;
if((strv = mongoc_database_get_collection_names(self, &error))) {
return NativeCStringArray_as_nullable(strv);
}
NativeMongoDb_set_mongoc_error(self, &error);
return null_NativeCStringArray();
`}
lib/mongodb/native_mongodb.nit:236,2--249,3