A SQL-Inspired Query Language Designed for Event Sourcing (2025)

· databases books · Source ↗

TLDR

  • EventQL is a SQL-inspired query language and Rust parser built for event-sourced systems, treating event type, subject, timestamp, and payload as first-class query citizens.

Key Takeaways

  • FROM/WHERE/PROJECT INTO syntax mirrors SQL but targets event metadata: e.type, e.subject, e.time, e.data.* map directly to indexable fields.
  • Subject hierarchies like /users/123/orders/456 act as natural partition keys, enabling scope-limited, index-friendly aggregate queries.
  • PROJECT INTO is mandatory, not optional, forcing explicit output shaping and supporting computed fields and nested payload extraction.
  • A planned type inferencer will catch field-type contradictions at parse time, preventing runtime failures before queries reach the database.
  • The standalone eventql-parser Rust crate emits a strongly-typed AST with line/column error reporting, embeddable in any Rust event store.

Hacker News Comment Review

  • The sole commenter draws a direct comparison to LINQ and WCF/RIA Data Services from circa 2010, questioning whether EventQL solves anything not already addressed by decade-old .NET tooling.

Original | Discuss on HN