Skip to main content

Crate hamelin

Crate hamelin 

Source
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-exports hamelin_trino as trino)
  • datafusion: DataFusion backend support (re-exports hamelin_datafusion as datafusion)
  • duckdb: DuckDB backend support (re-exports hamelin_duckdb as duckdb)
  • 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§

ExpressionTypeCheckOptions
Options for type-checking Expression AST nodes.
Interner
A thread-safe interner that deduplicates strings and types for memory efficiency.
ParseOptions
Options for configuring how AST nodes are parsed.
Query
Top-level query node
TimeRange
A time range with optional start and end bounds.
TranslateOptions
Options for translating a type-checked AST to a backend-specific representation.
TranslationErrors
TypeCheckOptions
Options for type-checking a parsed AST or a Hamelin query string.
TypedStatement
A type-checked statement
WithTranslationErrors
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