Skip to main content

Crate ison_graph

Crate ison_graph 

Source
Expand description

ISONGraph - A Token-Efficient Graph Store for Rust

A property graph implementation with ISON persistence. Supports multi-hop traversal, path finding, and fluent API.

§Example

use ison_graph::{ISONGraph, NodeRef, Direction, props};

let mut graph = ISONGraph::new("social");
// Properties keep their type: 30 is a number, "30" would be a string,
// and the two serialize differently.
graph.add_node("person", "1", props![("name", "Alice"), ("age", 30i64)]).unwrap();
graph.add_node("person", "2", props![("name", "Bob"), ("age", 25i64)]).unwrap();
graph.add_edge("KNOWS", ("person", "1"), ("person", "2"), props![("since", 2020i64)]).unwrap();

let friends = graph.neighbors(&("person", "1"), Some("KNOWS"), Direction::Out);
let fof = graph.multi_hop(&("person", "1"), Some("KNOWS"), 2, Direction::Out);

Modules§

query
ISONQL - Pure Property Graph Query Language for ISONGraph (Rust)
schema
ISONGraph Schema Validation Module

Macros§

props
Build a property list with mixed value types.

Structs§

Edge
Represents a graph edge with properties
GraphTraversal
Fluent API for graph traversal
ISONGraph
In-memory property graph store with ISON persistence.
Node
Represents a graph node with properties
NodeId
Owned node reference
Path
Represents a path through the graph

Enums§

Direction
Traversal direction
GraphError
Value
Property values are ISON values, re-exported so callers do not need a direct ison-rs dependency. Storing anything else would mean a second value model beside the parser’s, which is what made this port emit every value as a quoted string and disagree with the typed ports. Value types in ISON

Constants§

MULTIGRAPH_FORMAT
Written into meta.graph by the Python MultiGraph. This port has no multigraph, so loading such a document would silently drop its parallel edges; it is refused instead.
VERSION
Version of the library

Traits§

IntoValue
Converts a Rust primitive into an ISON property value.

Functions§

value_to_text
Render a property value as text - the form every value had before properties carried types. Query string operators and schema validation use it so their behaviour is unchanged by typing the storage.

Type Aliases§

NodeRef
Node reference: (type, id)
Result