Skip to content

Commit 1f05f90

Browse files
committed
docs: reconcile documentation with actual compiler behavior
1 parent a2e711c commit 1f05f90

3 files changed

Lines changed: 52 additions & 78 deletions

File tree

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,13 @@ Before writing any code, understand the dialect's capabilities and limits:
2828
| Schema inspection (tables, columns) ||
2929
| IN, BETWEEN, LIKE operators ||
3030
| DISTINCT ||
31+
| DISTINCT with JOIN ||
3132
| GROUP BY / HAVING ||
3233
| Aggregate functions (COUNT, SUM, AVG, MIN, MAX) ||
33-
| Subqueries in WHERE ... IN | ✅ (non-correlated only) |
34-
| INNER / LEFT / RIGHT JOIN (equality ON) | ✅ (constrained) |
34+
| Subqueries in WHERE ... IN | ✅ (non-correlated only; no JOIN in outer/subquery) |
35+
| INNER / LEFT / RIGHT / FULL OUTER JOIN (equality ON) | ✅ (constrained) |
36+
| CROSS JOIN ||
3537
| Chained JOINs (3+ tables) | ✅ (constrained) |
36-
| **FULL OUTER JOIN** ||
3738
| CTEs ||
3839
| UNION / UNION ALL / INTERSECT / EXCEPT ||
3940
| **Window functions (OVER)** ||

docs/ROADMAP.md

Lines changed: 37 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,91 +1,56 @@
11
# Project Roadmap
22

3-
> **Current version**: 0.4.0 · **Python**: 3.10+ · **Published**: [PyPI](https://pypi.org/project/sqlalchemy-excel/)
3+
> **Current version**: 0.5.4 · **Python**: 3.10+ · **Published**: [PyPI](https://pypi.org/project/sqlalchemy-excel/)
44
55
## Completed
66

7-
### v0.1.0 — Initial Release
7+
### Core SQL and ORM surface
88

9-
- SQLAlchemy 2.0 dialect implementation
10-
- ORM support with `DeclarativeBase`
11-
- Basic SQL: SELECT, INSERT, UPDATE, DELETE, CREATE TABLE, DROP TABLE
12-
- WHERE clauses with comparison operators
13-
- ORDER BY and LIMIT
14-
- Type mapping for common SQLAlchemy types
15-
- Schema inspection (`get_table_names`, `get_columns`, `has_table`)
9+
- SQLAlchemy 2.x dialect implementation for local Excel files
10+
- ORM support with `DeclarativeBase`, `Session`, and mapper reflection paths used in tests
11+
- CRUD support: `SELECT`, `INSERT`, `UPDATE`, `DELETE`
12+
- DDL support: `CREATE TABLE`, `DROP TABLE`
13+
- Multi-row `INSERT ... VALUES` and `INSERT ... SELECT`
14+
- Inspector support: `get_table_names`, `get_columns`, `has_table`
1615

17-
### v0.2.x — Dialect Rewrite & Quality
16+
### Query capabilities available today
1817

19-
- Complete dialect architecture rewrite: `ExcelCompiler`, `ExcelDDLCompiler`, `ExcelTypeCompiler`
20-
- Enhanced operators: IN, BETWEEN, LIKE
21-
- Codecov integration for coverage tracking
22-
- mypy strict mode with full type safety
23-
- PyPI Trusted Publisher (OIDC) for secure releases
24-
- GitHub Actions CI/CD pipeline
18+
- Filtering/operators: `IN`, `BETWEEN`, `LIKE`
19+
- Aggregation: `COUNT`, `SUM`, `AVG`, `MIN`, `MAX`
20+
- `GROUP BY` and `HAVING`
21+
- `DISTINCT` (single-table queries)
22+
- Non-correlated subqueries in `WHERE ... IN` (for `SELECT`, `UPDATE`, `DELETE`)
23+
- Join surface: `INNER`, `LEFT`, `RIGHT` shape, `FULL OUTER`, `CROSS`, chained joins
24+
- Compound queries: `UNION`, `UNION ALL`, `INTERSECT`, `EXCEPT`
25+
- `CASE WHEN` expressions and arithmetic expressions
26+
- UPSERT via `ON CONFLICT DO NOTHING / DO UPDATE`
2527

26-
### v0.3.x — Graph API & Remote Excel
28+
### Platform and quality
2729

28-
- `ExcelGraphDialect` for remote Excel files via Microsoft Graph API
29-
- `excel+graph:///drive_id/item_id` URL scheme
30-
- Entry point `excel.graph` for SQLAlchemy dialect resolution
31-
- Optional dependency: `pip install sqlalchemy-excel[graph]`
32-
- URL percent-decoding for drive/item IDs with special characters
33-
- `readonly` query parameter forwarding to Graph backend
34-
- `supports_statement_cache = False` on both dialects
30+
- `ExcelGraphDialect` for Microsoft Graph-backed workbooks (`excel+graph:///drive_id/item_id`)
31+
- Strict mypy, ruff linting/formatting, and CI on supported Python versions
32+
- High test coverage across compiler, dialect, ORM, DML/DDL, reflection, and end-to-end flows
3533

36-
### v0.4.0 — Stabilization (Current)
34+
## In Progress / Next
3735

38-
- HAVING guard via `_compose_select_body` override (compile-time error instead of silent ignore)
39-
- End-to-end tests: CRUD round-trip, ORM Session, inspector reflection, DDL lifecycle, rollback no-op
40-
- Compiler guard tests for all unsupported SQL features
41-
- Type compiler full coverage tests
42-
- Reflection edge case tests
43-
- Test coverage: **98% (117 tests)**
44-
- README restructured: limitations-first layout, Graph API moved to experimental section
36+
- Expand documentation examples for advanced query shapes and ORM patterns
37+
- Continue hardening edge cases around SQLAlchemy compilation and parser interoperability
38+
- Improve release notes and compatibility guidance as excel-dbapi evolves
4539

46-
## Future
40+
## Not Planned
4741

48-
### Planned
42+
- Full ACID transactions
43+
- Concurrent multi-writer semantics
44+
- `ALTER TABLE` / schema migration primitives
45+
- Foreign key enforcement and index management
46+
- Stored procedures and triggers
4947

50-
- **DISTINCT**: Remove duplicate rows
51-
- **OFFSET**: Pagination support (currently only LIMIT works)
52-
- **Aggregate functions**: COUNT, SUM, AVG, MIN, MAX
53-
- **GROUP BY**: Grouping with aggregate functions
54-
- **Subqueries**: Nested SELECT statements
55-
- **Multi-sheet JOIN**: INNER JOIN, LEFT JOIN across sheets
56-
- **Async dialect**: `excel+aio://` with AsyncEngine support
57-
58-
> These features require changes in the underlying [excel-dbapi](https://github.com/yeongseon/excel-dbapi) query engine.
59-
60-
### Not Planned
61-
62-
These are explicitly out of scope:
63-
64-
- Full ACID transactions (Excel files don't support them)
65-
- Concurrent write support (single-writer model by design)
66-
- ALTER TABLE / schema migration
67-
- Foreign key enforcement or index support
68-
- Stored procedures or triggers
48+
These constraints are inherited from the Excel file model and underlying driver behavior.
6949

7050
## Long-Term Vision
7151

72-
1. **Seamless SQLAlchemy experience** for Excel files
73-
2. **Analysts and developers** use familiar SQL/ORM tools with Excel
74-
3. **Bridge** ad-hoc Excel data and structured database workflows
75-
4. **Cloud-native Excel** via Microsoft Graph API (experimental)
76-
77-
**Not a goal**: Replace real databases for production workloads.
78-
79-
## Versioning
80-
81-
sqlalchemy-excel follows [Semantic Versioning](https://semver.org/):
82-
83-
- **PATCH** (0.x.**y**): Bug fixes
84-
- **MINOR** (0.**x**.0): New features, backward-compatible
85-
- **MAJOR** (**x**.0.0): Breaking changes, stable API
86-
87-
**Current status**: Beta (0.x.x) — API may change before 1.0.0.
88-
89-
---
52+
1. Keep SQLAlchemy usage intuitive for spreadsheet-backed data workflows.
53+
2. Maintain compatibility with excel-dbapi capabilities as they expand.
54+
3. Provide clear boundaries so teams can choose Excel vs. traditional databases intentionally.
9055

91-
See [CHANGELOG.md](../CHANGELOG.md) for detailed release history.
56+
See [CHANGELOG.md](../CHANGELOG.md) for release-by-release details.

docs/USAGE.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,10 @@ with Session(engine) as session:
149149
users = session.scalars(stmt).all()
150150
```
151151

152-
### JOINs (including chained and RIGHT-join shape)
152+
### JOINs (including chained, RIGHT-join shape, FULL OUTER, and CROSS)
153153

154154
```python
155-
from sqlalchemy import Column, Integer, MetaData, String, Table, select
155+
from sqlalchemy import Column, Integer, MetaData, String, Table, select, true
156156

157157
metadata = MetaData()
158158
users = Table(
@@ -185,6 +185,14 @@ stmt = (
185185
right_join_shape = select(orders.c.id, users.c.name).select_from(
186186
orders.join(users, users.c.id == orders.c.user_id, isouter=True)
187187
)
188+
189+
# FULL OUTER JOIN
190+
full_outer = select(users.c.name, orders.c.id).select_from(
191+
users.join(orders, users.c.id == orders.c.user_id, full=True)
192+
)
193+
194+
# CROSS JOIN
195+
cross_join = select(users.c.id, orders.c.id).select_from(users.join(orders, true()))
188196
```
189197

190198
### Compound Set Operations (UNION / INTERSECT / EXCEPT)
@@ -330,7 +338,7 @@ sqlalchemy-excel maps SQLAlchemy types to Excel storage types:
330338

331339
sqlalchemy-excel has some limitations due to the nature of Excel as a database:
332340

333-
- **Constrained JOIN support**: INNER/LEFT/RIGHT join shapes and chained joins are supported with equality ON clauses (`t1.col = t2.col`). FULL OUTER JOIN, OR/non-equality ON clauses, and non-column operands are rejected.
341+
- **Constrained JOIN support**: INNER/LEFT/RIGHT/FULL OUTER join shapes, CROSS JOIN, and chained joins are supported. `ON` clauses are limited to equality comparisons between columns from different join sources (`t1.col = t2.col`, `AND`-combined).
334342
- **Non-correlated subqueries only**: Subqueries supported in `WHERE ... IN (SELECT ...)` for SELECT, UPDATE, and DELETE. No correlated or nested subqueries.
335343
- **No CTEs**: CTE queries are not supported.
336344
- **No window functions**: `OVER` clause raises `CompileError`.

0 commit comments

Comments
 (0)