Test connection to memgraph on 127.0.0.1, port 7688.
import std.string : toStringz, fromStringz; import std.conv : to; assert(mg_init() == 0); auto params = mg_session_params_make(); assert(params != null); mg_session_params_set_host(params, toStringz("127.0.0.1")); mg_session_params_set_port(params, to!ushort(7688)); mg_session_params_set_sslmode(params, mg_sslmode.MG_SSLMODE_DISABLE); mg_session *session = null; int status = mg_connect(params, &session); mg_session_params_destroy(params); assert(status == 0, fromStringz(mg_session_error(session))); mg_session_destroy(session); mg_finalize();