divanvisagie / divanvisagie/mdsql
Add aggregates, GROUP BY, and table-name inference
- Dominant language
- Rust
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
## Problem
mdsql v0.1.0 ships SELECT/WHERE/ORDER/LIMIT plus INSERT/UPDATE/DELETE and multiple output formats, but aggregates and grouped queries are still missing. Table names are index-only and not inferred from headers. Library/FFI split and multi-file JOIN ideas are untracked.
## Scope
- Implement SELECT aggregates: SUM, COUNT, AVG, MIN, MAX (no GROUP BY required initially).
- Add GROUP BY support for aggregation.
- Infer table names from preceding markdown headers (e.g., h2 before table => "monthly_sales"), still allow numeric indexes.
- Document new capabilities and defaults (column-aligned output, formats).
- Add tests for aggregates, grouping, and name inference.
- Track follow-ups: library crate + CLI/FFI split (Python first), potential multi-file queries/JOINs.
## Acceptance Criteria
- Aggregates usable in SELECT without GROUP BY (e.g., SUM(score) FROM 0).
- GROUP BY works with aggregates for columns referenced by name or index order.
- Header-derived table names can be used in FROM/UPDATE/DELETE/INSERT alongside numeric indexes.
- Docs reflect the behavior; test suite covers aggregates, grouping, and name inference.
- Follow-up items for crate split/FFI and multi-file/JOINs are noted.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.