You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AGE is opensource backend for postgres, that allows user to perform graph related operations on postgres. You can read about it on the official website
This repository will be eventually merged into the age repository. The status of the work needed for PR can be found in the special issue within AGE issue tracker
Important note
This library is just a wrapper around existing postgres libraries. Connection parameters, methods etc. are indentical (unless noted) as in the postgres and tokio-postgres crates.
Driver usage
More examples can be find in documentation (link below)
use apache_age::{NoTls,AgType};use apache_age::sync::{AgeClient,Client};use serde::{Deserialize,Serialize};letmut client = Client::connect_age("host=localhost user=postgres password=passwd port=8081",NoTls).unwrap();
client.create_graph("my_apache_graph");#[derive(Debug,Serialize,Deserialize,Clone)]structPerson{pubname:String,pubsurname:String,}match client.query_cypher::<()>("my_apache_graph","MATCH (n: Person) WHERE n.name = 'Alfred' RETURN {name: n.name, surname: n.surname}",None,){Ok(rows) => {let x:AgType<Person> = rows[0].get(0);// do whatever you need}Err(e) => {// handle error}}
client.drop_graph("my_apache_graph");