type-bridge-core-lib
Pure-Rust TypeQL AST, schema parser, query compiler, validation engine, and value coercer for type-bridge.
This is a supporting engine crate. Most applications should consume generated
models through type-bridge instead.
[]
= "2.2.2"
Modules
| Module | Purpose |
|---|---|
ast |
TypeQL Abstract Syntax Tree — patterns, statements, clauses, and values |
validation |
Schema-aware query validation plus a portable JSON validation-rule DSL |
compiler |
Compiles an AST back into a TypeQL query string |
query_parser |
Parses a TypeQL query string into the AST (bidirectional round-trip) |
value_coercion |
Coerces raw values into TypeDB value-types and formats TypeQL literals |
reserved_words |
TypeQL reserved-word detection |
Usage
use parse_typeql_query;
use QueryCompiler;
// Parse a TypeQL query into AST clauses
let clauses = parse_typeql_query.unwrap;
// Compile back to TypeQL
let compiler = new;
let typeql = compiler.compile;
assert_eq!;
Canonical Split-YAML schema loading and resolution live in
type-bridge-schema. The hidden
frozen parser/schema modules in this crate are compatibility machinery, not an
application schema-authoring API.
Feature flags
| Feature | Default | Effect |
|---|---|---|
pyo3 |
no | Enables #[derive(FromPyObject)] on AST types for PyO3 interop |
Testing
Compatibility
This crate is released in lockstep with TypeBridge 2.2.2 and requires Rust 1.88+. Database-facing TypeBridge 2.1 components support TypeDB 3.11.x–3.12.x, with 3.12.1 as the V2 semantic baseline.
API documentation · Repository