All Projects → memgraph → rsmgclient

memgraph / rsmgclient

Licence: Apache-2.0 license
Memgraph database adapter for Rust programming language.

Programming Languages

rust
11053 projects
shell
77523 projects

Projects that are alternatives of or similar to rsmgclient

docs
Documentation for Bolt.
Stars: ✭ 47 (+95.83%)
Mutual labels:  bolt
mgconsole
mgconsole is a command-line interface (CLI) used to interact with Memgraph from any terminal or operating system.
Stars: ✭ 30 (+25%)
Mutual labels:  memgraph
Sitemap
Bolt Sitemap extension - create XML sitemaps for your Bolt website.
Stars: ✭ 19 (-20.83%)
Mutual labels:  bolt
DBD-mysql
MySQL driver for the Perl5 Database Interface (DBI)
Stars: ✭ 50 (+108.33%)
Mutual labels:  database-connector
KlakVS
Miscellaneous math extensions for Unity visual scripting
Stars: ✭ 63 (+162.5%)
Mutual labels:  bolt
bolt.nvim
⚡ Ultrafast multi-pane file manager for Neovim with fuzzy matching
Stars: ✭ 100 (+316.67%)
Mutual labels:  bolt
garuda
Automagically Exposing Django ORM over gRPC for microservices written in any other languages
Stars: ✭ 22 (-8.33%)
Mutual labels:  database-connector
showme
Rapid diagnostic system status tool (performance monitoring, network scanning, mysql performance monitoring, kubectl status)
Stars: ✭ 24 (+0%)
Mutual labels:  bolt
nodemgclient
Node.js Memgraph Client
Stars: ✭ 21 (-12.5%)
Mutual labels:  memgraph
mage
MAGE - Memgraph Advanced Graph Extensions 🔮
Stars: ✭ 89 (+270.83%)
Mutual labels:  memgraph
OGMNeo
[No Maintenance] Neo4j nodeJS OGM(object-graph mapping) abstraction layer
Stars: ✭ 54 (+125%)
Mutual labels:  bolt
pysphero
Unofficial Sphero V2 api for bluetooth low energy toys
Stars: ✭ 31 (+29.17%)
Mutual labels:  bolt
NeoClient
🦉 Lightweight OGM for Neo4j which support transactions and BOLT protocol.
Stars: ✭ 21 (-12.5%)
Mutual labels:  bolt
DBD-MariaDB
Perl MariaDB driver
Stars: ✭ 28 (+16.67%)
Mutual labels:  database-connector
bolt-magento2
Bolt plugin for magento2
Stars: ✭ 17 (-29.17%)
Mutual labels:  bolt
libdrizzle-redux
The next generation of Libdrizzle with a simplified API and support for more features of the protocol
Stars: ✭ 14 (-41.67%)
Mutual labels:  database-connector
neo4j-java-driver-spring-boot-starter
Automatic configuration of Neo4j's Java Driver for Spring Boot applications
Stars: ✭ 33 (+37.5%)
Mutual labels:  bolt
rota-slackbot
Slackbot that helps manage rotations.
Stars: ✭ 50 (+108.33%)
Mutual labels:  bolt
mgmigrate
mgmigrate is a tool for migrating data from MySQL or PostgreSQL to Memgraph and between Memgraph instances.
Stars: ✭ 17 (-29.17%)
Mutual labels:  memgraph
tasks-hands-on-lab
Deprecated: Please see http://bolt.guide to follow our Bolt tutorial!
Stars: ✭ 73 (+204.17%)
Mutual labels:  bolt

rsmgclient - Rust Memgraph Client

rsmgclient is Memgraph database adapter for Rust programming language. rsmgclient crate is the current implementation of the adapter. It is implemented as a wrapper around mgclient, the official Memgraph C/C++ client library.

Installation

Prerequisites

  • Rust 1.42.0 or above
  • Prerequisites of mgclient:
    • A C compiler supporting C11 standard
    • CMake 3.8 or newer
    • OpenSSL 1.0.2 or newer

Installing from crates.io

Once prerequisites are met, if you want to use rsmgclient as library for your own Rust project, you can install it by using cargo:

cargo install rsmgclient

Building from Source

To contribute into rsmgclient or just looking closely how it is made, you will need:

Once rsmgclient is cloned, you will need to build it and then you can run the test suite to verify it is working correctly:

cargo build
# Run Memgraph based on the quick start guide
cargo test

Documentation

Online documentation can be found on docs.rs pages.

Code Sample

src/main.rs is an example showing some of the basic commands:

use rsmgclient::{ConnectParams, Connection, MgError, Value};

fn execute_query() -> Result<(), MgError> {
    // Connect to Memgraph.
    let connect_params = ConnectParams {
        host: Some(String::from("localhost")),
        ..Default::default()
    };
    let mut connection = Connection::connect(&connect_params)?;

    // Create simple graph.
    connection.execute_without_results(
        "CREATE (p1:Person {name: 'Alice'})-[l1:Likes]->(m:Software {name: 'Memgraph'}) \
         CREATE (p2:Person {name: 'John'})-[l2:Likes]->(m);",
    )?;

    // Fetch the graph.
    let columns = connection.execute("MATCH (n)-[r]->(m) RETURN n, r, m;", None)?;
    println!("Columns: {}", columns.join(", "));
    for record in connection.fetchall()? {
        for value in record.values {
            match value {
                Value::Node(node) => print!("{}", node),
                Value::Relationship(edge) => print!("-{}-", edge),
                value => print!("{}", value),
            }
        }
        println!();
    }
    connection.commit()?;

    Ok(())
}

fn main() {
    if let Err(error) = execute_query() {
        panic!("{}", error)
    }
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].