Skip to content

Support SQL Server boolean SET options with shared statement rendering - #2604

Merged
manticore-projects merged 2 commits into
JSQLParser:masterfrom
minleejae:feat/sqlserver-set-on-off-options
Sep 12, 2026
Merged

manticore-projects merged 2 commits into
JSQLParser:masterfrom
minleejae:feat/sqlserver-set-on-off-options

Conversation

@minleejae

Copy link
Copy Markdown
Contributor

SQL Server SET NOCOUNT ON currently fails to parse, and grouped options such as SET QUOTED_IDENTIFIER, ANSI_NULLS OFF cannot be represented as ordinary assignments. With Dialect.SQLSERVER, SetStatement now exposes an ordered, typed option group with one editable ON/OFF value for 23 documented boolean settings. Generic assignments retain their existing representation and expression visitors.

The change separates assignment parsing from option parsing and shares SET punctuation between toString() and SetStatementDeParser. It also adds SQL Server feature validation and table discovery for option groups. Parsing a directive records the setting without changing lexer configuration.

Validation: full Gradle check passed (6,567 tests, 0 failures/errors, 25 skipped). Coverage includes all options in both states, grouped options, AST edits, custom expression deparsing, malformed input, statement boundaries, dialect isolation, and existing SET assignments. The updated usage page builds with Sphinx warnings treated as errors.

Syntax reference: Microsoft SET statements.

@minleejae
minleejae force-pushed the feat/sqlserver-set-on-off-options branch from 3561776 to 0f85ac2 Compare September 11, 2026 18:12
@minleejae
minleejae force-pushed the feat/sqlserver-set-on-off-options branch from 0f85ac2 to a338fe4 Compare September 11, 2026 18:21
@manticore-projects
manticore-projects merged commit f473ccf into JSQLParser:master Sep 12, 2026
3 of 4 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.

2 participants