Skip to content

Latest commit

History

83 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

EventQL Parser

Crates.ioCrates.ioBuild StatusCrates.io

A complete lexer and parser for EventQL (EQL), a query language designed for event sourcing systems.

Features

  • Complete EventQL Support: Parse queries with FROM, WHERE, GROUP BY, ORDER BY, LIMIT, and PROJECT clauses
  • Rich Expression Language: Supports arithmetic, comparison, logical operators, and field access
  • Detailed Error Reporting: Position-aware error messages with line and column numbers
  • Type-Safe AST: Strongly-typed abstract syntax tree for query analysis and execution
  • Static Analysis: Provides optional static analysis to catch even more errors before running a query

Quick Start

use eventql_parser::Session;fnmain(){letmut session = Session::builder().build();let query = session.parse("FROM e IN events WHERE e.id == 1 PROJECT INTO e").unwrap();println!("Parsed query: {:?}", query);}

EventQL Language

EventQL supports querying event streams with a SQL-like syntax:

FROM e IN events
WHEREe.price>100ANDe.category=="electronics"ORDER BYe.timestampDESCLIMIT10
PROJECT INTO { id: e.id, price: e.price }

Acknowledgements

This parser is based on the EventQL language specification from EventSourcingDB by The Native Web. EventSourcingDB is an event store database that provides a powerful query language (EventQL) for querying and analyzing event streams in event-sourced systems.

The EventQL Reference

License

MIT

About

EventQL Lexer and Parser

Topics

Resources

Stars

6 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages