mirror of
https://github.com/ModernRelay/omnigraph.git
synced 2026-06-09 01:35:18 +02:00
22 lines
955 B
Markdown
22 lines
955 B
Markdown
|
|
# Errors and Result Serialization
|
||
|
|
|
||
|
|
## Error taxonomy (`omnigraph::error::OmniError`)
|
||
|
|
|
||
|
|
- `Compiler(...)` — schema/query parse/typecheck errors
|
||
|
|
- `Lance(String)` — storage layer
|
||
|
|
- `DataFusion(String)` — execution layer
|
||
|
|
- `Io(io::Error)`
|
||
|
|
- `Manifest(ManifestError { kind: BadRequest|NotFound|Conflict|Internal, … })`
|
||
|
|
- `MergeConflicts(Vec<MergeConflict>)`
|
||
|
|
|
||
|
|
Compiler-side `NanoError` covers parse / catalog / type / plan / execution / arrow / lance / IO / manifest / unique-constraint, each with structured spans (`SourceSpan { start, end }`) for ariadne-style diagnostics.
|
||
|
|
|
||
|
|
## Result serialization (`omnigraph_compiler::result::QueryResult`)
|
||
|
|
|
||
|
|
- `to_arrow_ipc()` — efficient binary
|
||
|
|
- `to_sdk_json()` — JS-safe JSON (large i64 wrapped in metadata)
|
||
|
|
- `to_rust_json()` — Rust-friendly JSON
|
||
|
|
- `batches()` — direct Arrow `RecordBatch` access
|
||
|
|
|
||
|
|
Mutation results: `{ affectedNodes: usize, affectedEdges: usize }` (also exposed as a tiny Arrow batch).
|