mongoc_client_get_server_status()
.Queries the server for the current server status.
Returns null
if an error occured.
# Wrapper for `mongoc_client_get_server_status()`.
#
# Queries the server for the current server status.
# Returns `null` if an error occured.
fun server_status: nullable NativeBSON import set_mongoc_error, NativeBSON.as nullable `{
bson_error_t error;
bson_t *reply = bson_new();
if(!mongoc_client_get_server_status(self, NULL, reply, &error)){
NativeMongoClient_set_mongoc_error(self, &error);
return null_NativeBSON();
}
return NativeBSON_as_nullable(reply);
`}
lib/mongodb/native_mongodb.nit:175,2--187,3