Expand description
Hamelin facade crate
This crate provides a unified entry point for the Hamelin ecosystem.
Start with parse to get an AST, then type_check to type-check it.
All functions return WithTranslationErrors which can be converted to
Result via .result(), or destructured to access .output and .errors.
§Feature flags
trino: Trino backend support (re-exportshamelin_trinoastrino)datafusion: DataFusion backend support (re-exportshamelin_datafusionasdatafusion)duckdb: DuckDB backend support (re-exportshamelin_duckdbasduckdb)error_rendering: Enhanced error rendering with source context
Re-exports§
pub use hamelin_lib as lib;pub use hamelin_datafusion as datafusion;pub use hamelin_executor as executor;
Structs§
- Expression
Type Check Options - Options for type-checking Expression AST nodes.
- Interner
- A thread-safe interner that deduplicates strings and types for memory efficiency.
- Parse
Options - Options for configuring how AST nodes are parsed.
- Query
- Top-level query node
- Time
Range - A time range with optional start and end bounds.
- Translate
Options - Options for translating a type-checked AST to a backend-specific representation.
- Translation
Errors - Type
Check Options - Options for type-checking a parsed AST or a Hamelin query string.
- Typed
Statement - A type-checked statement
- With
Translation Errors - Wrapper holding a compilation output alongside any errors that occurred.
Functions§
- parse
- Parse a Hamelin query string into an AST.
- parse_
and_ typecheck - Parse and type-check a Hamelin query string in one step.
- parse_
and_ typecheck_ with_ options - Parse and type-check a Hamelin query string with configurable options.
- parse_
with_ options - Parse a Hamelin query string with configurable options.
- type_
check - Type-check a parsed AST with default options.
- type_
check_ expression - Type-check an expression AST node with configurable options.
- type_
check_ with_ options - Type-check a parsed AST with configurable options.
- type_
check_ with_ provider - type_
check_ with_ time_ range