khive-query 0.2.0

GQL and SPARQL parsers with SQL compiler for knowledge graph queries.
Documentation

khive-query — backend-agnostic GQL/SPARQL parsing and SQL compilation.

Two entry points

Explicit language

use khive_query::{QueryLanguage, parse, compile, CompileOptions};

let ast = parse(QueryLanguage::Gql, "MATCH (a:concept)-[:extends]->(b) RETURN b LIMIT 10")?;
let compiled = compile(&ast, &CompileOptions::default())?;

Auto-detect (SELECT → SPARQL, MATCH → GQL)

use khive_query::parse_auto;

let ast = parse_auto("SELECT ?a ?b WHERE { ?a :extends ?b . }")?;