zawgl-client

Crates.iozawgl-client
lib.rszawgl-client
version0.1.5
sourcesrc
created_at2022-08-16 10:35:20.659776
updated_at2023-06-01 08:35:29.560444
descriptionZawgl Graph Database Client
homepage
repository
max_upload_size
id646553
size7,682
Alexandre RICCIARDI (alexandre-ricciardi)

documentation

README

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"
          }
        ]
      }
    ]
  }
}
Commit count: 0

cargo fmt