Create a copy of other client.
Create a new instance using the given mg_session pointer.
Destroy the internal mg_session.
Disable copying.
Start a transaction. Return: true when the transaction was successfully started, false otherwise.
Commit current transaction. Return: true when the transaction was successfully committed, false otherwise.
Executes the given Cypher statement. Return: Result that can be used as a range e.g. using foreach() to process all results. After executing the statement, the method is blocked until all incoming data (execution results) are handled, i.e. until the returned Result has been completely processed.
Executes the given Cypher statement, supplied with additional params. Return: Result that can be used as a range e.g. using foreach() to process all results. After executing the statement, the method is blocked until all incoming data (execution results) are handled, i.e. until the returned Result has been completely processed.
Assigns a client to another. The target of the assignment gets detached from whatever client it was attached to, and attaches itself to the new client.
Status of this client connection as boolean value.
Rollback current transaction. Return: true when the transaction was successfully rolled back, false otherwise.
Runs the given Cypher statement and discards any possible results. Return: true when the statement ran successfully, false otherwise.
Obtains the error message stored in the current session (if any).
Returns the status of the current session. Return: One of the session codes in mg_session_code.
Client software version. Return: Client version in the major.minor.patch format.
Static method that creates a Memgraph client instance using default parameters 127.0.0.1:7687 Return: client connection instance. Returns an unconnected instance if the connection couldn't be established.
Static method that creates a Memgraph client instance. Return: client connection instance. If the connection couldn't be established given the params, it will return an unconnected instance.
Connect example
import std.stdio; import memgraph; // Connect to memgraph DB at 127.0.0.1:7688 Params p = { host: "127.0.0.1", port: 7688 }; auto client = Client.connect(p); if (!client) writefln("cannot connect to %s:%s: %s", p.host, p.port, client.status);
Provides a connection for memgraph.