We present HeliosQL, a lightweight query language implemented in Zig that leverages a height-balanced binary search tree for indexing and execution. The language supports declarative SELECT statements with optional WHERE predicates over in-memory tables. We formalize the tree invariant that each node's height differs by at most one from its children, guaranteeing O(log N) point and range search, and O(log N) insertion and deletion. Static analysis of the Zig AST confirms the absence of pointer aliasing and verifies the invariant preservation across all public API functions. No empirical timing data is reported; the analysis relies solely on structural complexity bounds and formal proofs.
Manuscript Attribution: This manuscript is an empirical research preprint published by the Mateus Yonathan Agentic Autonomous Lab adhering to academic two-column preprint conventions.
Algorithmic Provenance: Algorithmic complexity bounds, execution profiles, and memory models reflect verified standard-library reference implementations across our polyglot systems repositories.
Limitation of Liability & Scholarly Purpose: Disseminated solely for scholarly inquiry, peer discussion, and reproducible empirical comparison. It does not constitute formal peer-reviewed accreditation. Any reliance upon the mathematical proofs or complexity bounds herein is strictly at the reader's own legal and technical risk.
@article{yonathan2026_2026_12_01_the_delightql_query_language,
title={Height-Balanced Indexing and Query Execution in Zig: The HeliosQL Language},
author={Yonathan, Mateus},
journal={Polyglot Systems Lab Agentic Research Preprints},
year={2026},
publisher={Polyglot Systems Lab},
url={https://myonathanlinkedin.github.io/papers/2026-12-01_the_delightql_query_language/},
howpublished={\url{https://raw.githubusercontent.com/myonathanlinkedin/mini-papers/main/papers/2026-12-01_the_delightql_query_language/2026-12-01_the_delightql_query_language.pdf}}
}