Skip to content

Fix Oracle queries with trailing semicolons#273

Merged
Maxteabag merged 1 commit into
mainfrom
fix/issue-260-oracle-trailing-semicolon
Jul 14, 2026
Merged

Fix Oracle queries with trailing semicolons#273
Maxteabag merged 1 commit into
mainfrom
fix/issue-260-oracle-trailing-semicolon

Conversation

@Maxteabag

Copy link
Copy Markdown
Owner

Summary

  • remove trailing SQL statement terminators before python-oracledb execution
  • preserve required PL/SQL terminators for anonymous blocks and stored programs
  • cover both query and non-query adapter paths

Tests

  • 23 Oracle provider tests
  • 1,045 unit tests
  • 300 UI tests
  • focused Ruff and MyPy checks

Fixes #260

python-oracledb requires SQL text without a trailing statement terminator, while a final semicolon remains part of PL/SQL syntax. Normalize statements at the Oracle adapter boundary so CLI, TUI, worker, and legacy-provider execution share the correction.

Constraint: Preserve final semicolons for anonymous PL/SQL blocks and stored program definitions
Rejected: Normalize all database statements globally | other drivers accept terminators and Oracle PL/SQL requires them
Confidence: high
Scope-risk: narrow
Directive: Keep Oracle SQL normalization at the adapter boundary and preserve PL/SQL syntax
Tested: 23 Oracle provider tests; 1045 unit tests; 300 UI tests; focused Ruff and MyPy
Not-tested: Live Oracle server; no Oracle container is running locally
Related: #260
@Maxteabag
Maxteabag merged commit 9e52a50 into main Jul 14, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

oracledb: if query has ; it fails with ORA-00922: missing or invalid option

1 participant