6 releases

0.1.5 Jun 1, 2023
0.1.4 Jun 1, 2023
0.1.2 May 29, 2023
0.1.1 Aug 18, 2022

#2553 in Database interfaces

Download history 4/week @ 2024-02-25 9/week @ 2024-03-10 71/week @ 2024-03-31

80 downloads per month

MIT license

8KB
110 lines

zawgl-client

Zawgl graph database rust client

Usage

Zawgl query language is Cypher.

Sample usage:

let client = Client::new("ws://localhost:8182").await;
let mut params = Parameters::new();
params.insert("pid".to_string(), Value::Integer(12));
let r = client.execute_cypher_request_with_parameters("match (n:Person) where id(n) = $pid return n", params).await;

The response is a Bson document, see example below:

{
  "request_id": "969f462c-ec71-41ab-bed8-0b46314f5965",
  "result": {
    "graphs": [
      {
        "nodes": [
          {
            "name": "x",
            "id": 113,
            "properties": [],
            "labels": [
              "Person"
            ]
          }
        ],
        "relationships": [
          {
            "id": 78,
            "source_id": 113,
            "target_id": 113,
            "properties": [],
            "labels": [
              "FRIEND_OF"
            ],
            "name": "f"
          }
        ]
      }
    ]
  }
}

Dependencies

~10–22MB
~319K SLoC