1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//! Beancount Query Language (BQL) engine.
//!
//! This crate provides a SQL-like query language for analyzing Beancount ledger data.
//!
//! # Overview
//!
//! BQL is a specialized query language designed for financial data analysis.
//! It operates on transaction postings while respecting double-entry bookkeeping constraints.
//!
//! # Query Types
//!
//! - `SELECT` - General purpose queries with filtering, grouping, and ordering
//! - `JOURNAL` - Shorthand for account statements
//! - `BALANCES` - Shorthand for account balance tables
//! - `PRINT` - Output filtered transactions in Beancount syntax
//!
//! # Example
//!
//! ```
//! use rustledger_query::parse;
//!
//! let query = parse("SELECT account, SUM(position) WHERE account ~ \"Expenses:\" GROUP BY account").unwrap();
//! println!("{:?}", query);
//! ```
// AST types are accessed via `rustledger_query::ast::*` rather than re-exported
// at the crate root. The previous `pub use ast::*;` glob exposed 22 names —
// none used by external crates, and one (`Query`) collided with
// `rustledger_core::Directive::Query`. Power users still reach AST types via
// the `ast` module.
pub use ;
pub use ;
pub use parse;
pub use PriceDatabase;