littlegraph-core 0.2.1

Embedded openCypher graph database backed by Neo4j record storage
Documentation
//! Query-facing graph entities decoded from Neo4j record storage.
//!
//! This module contains data models only; it is not a storage backend.

use crate::value::Properties;

pub type NodeId = usize;
pub type RelationshipId = usize;

#[derive(Clone, Debug, PartialEq)]
pub struct Node {
    pub id: NodeId,
    pub external_id: String,
    pub labels: Vec<String>,
    pub properties: Properties,
}

#[derive(Clone, Debug, PartialEq)]
pub struct Relationship {
    pub id: RelationshipId,
    pub external_id: String,
    pub start: NodeId,
    pub end: NodeId,
    pub r#type: String,
    pub properties: Properties,
}