Skip to content

Commit 9dc4f19

Browse files
committed
fix: correct doc drift and suppress CROSS JOIN SAWarning
- README.md: ALTER TABLE marked as supported (ADD/DROP/RENAME COLUMN) - README.md: Rollback updated to Partial (openpyxl: yes, graph: no-op) - docs/USAGE.md: same corrections applied to Limitations section - compiler.py: pass from_linter=None for CROSS JOIN child dispatch to suppress spurious cartesian-product SAWarning
1 parent 5c4b5c9 commit 9dc4f19

3 files changed

Lines changed: 8 additions & 6 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ Before writing any code, understand the dialect's capabilities and limits:
4141
| CTEs ||
4242
| UNION / UNION ALL / INTERSECT / EXCEPT ||
4343
| **Window functions (OVER)** ||
44-
| **ALTER TABLE** | |
44+
| **ALTER TABLE** | ✅ (ADD/DROP/RENAME COLUMN) |
4545
| **Foreign keys / indexes** ||
4646
| **Concurrent writes** ||
47-
| **Session.rollback()** | No-op (data persists) |
47+
| **Session.rollback()** | Partial (openpyxl with autocommit=False; graph: no-op) |
4848

4949
If you need any of the ❌ features, use SQLite, PostgreSQL, or another full-featured database.
5050

docs/USAGE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -342,10 +342,10 @@ sqlalchemy-excel has some limitations due to the nature of Excel as a database:
342342
- **Non-correlated subqueries only**: Subqueries supported in `WHERE ... IN (SELECT ...)` for SELECT, UPDATE, and DELETE. No correlated or nested subqueries.
343343
- **No CTEs**: CTE queries are not supported.
344344
- **No window functions**: `OVER` clause raises `CompileError`.
345-
- **No ALTER TABLE**: Cannot modify table structure after creation.
345+
- **ALTER TABLE**: Supports `ADD COLUMN`, `DROP COLUMN`, and `RENAME COLUMN` via raw SQL through the driver.
346346
- **No foreign keys or indexes**: Excel has no concept of these.
347347
- **No concurrent writes**: Use a single-writer model.
348-
- **Rollback is a no-op**: `Session.rollback()` does nothing — the underlying driver's rollback only works at the DB-API connection level with `autocommit=False`.
348+
- **Rollback**: Partial support — works with the openpyxl backend when `autocommit=False` (snapshot/restore semantics). The Graph API backend treats rollback as a no-op.
349349

350350
## Security
351351

src/sqlalchemy_excel/compiler.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -383,19 +383,21 @@ def visit_join(
383383
and not join.full
384384
and not join.isouter
385385
):
386+
# Intentional cartesian product -- suppress from_linter to
387+
# avoid SAWarning about missing join conditions.
386388
left = str(
387389
join.left._compiler_dispatch(
388390
self,
389391
asfrom=True,
390-
from_linter=from_linter,
392+
from_linter=None,
391393
**kwargs,
392394
)
393395
)
394396
right = str(
395397
join.right._compiler_dispatch(
396398
self,
397399
asfrom=True,
398-
from_linter=from_linter,
400+
from_linter=None,
399401
**kwargs,
400402
)
401403
)

0 commit comments

Comments
 (0)