Skip to content

MSSQL: Add support for WAITFOR statement#2210

Open
guan404ming wants to merge 1 commit intoapache:mainfrom
guan404ming:mssql-waitfor-statement
Open

MSSQL: Add support for WAITFOR statement#2210
guan404ming wants to merge 1 commit intoapache:mainfrom
guan404ming:mssql-waitfor-statement

Conversation

@guan404ming
Copy link
Member

Why

MSSQL's WAITFOR statement (DELAY/TIME) was not supported by the parser.

How

  • Add WaitForStatement and WaitForType AST nodes for DELAY and TIME variants
  • Parse WAITFOR { DELAY | TIME } in the MSSQL dialect
  • Add DELAY and WAITFOR keywords, tests for all variants and error cases

@guan404ming guan404ming marked this pull request as ready for review February 8, 2026 13:14
@guan404ming guan404ming force-pushed the mssql-waitfor-statement branch from e1f9899 to 30ec0a5 Compare February 12, 2026 01:36
Signed-off-by: Guan-Ming (Wesley) Chiu <105915352+guan404ming@users.noreply.github.com>
@guan404ming guan404ming force-pushed the mssql-waitfor-statement branch from 30ec0a5 to c89aa7e Compare February 12, 2026 01:56
Copy link
Contributor

@iffyio iffyio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @guan404ming! Just one minor comment re the tests otherwise this looks good to me

fn test_parse_waitfor() {
// WAITFOR DELAY
let sql = "WAITFOR DELAY '00:00:05'";
let stmt = ms().verified_stmt(sql);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
let stmt = ms().verified_stmt(sql);
let stmt = ms_and_generic().verified_stmt(sql);

Can we have the tests cover the generic syntax?

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