Skip to content

add support for insert into ... select ... returning ...#1132

Merged
alamb merged 1 commit intoapache:mainfrom
lovasoa:fix-1131
Feb 12, 2024
Merged

add support for insert into ... select ... returning ...#1132
alamb merged 1 commit intoapache:mainfrom
lovasoa:fix-1131

Conversation

@lovasoa
Copy link
Copy Markdown
Contributor

@lovasoa lovasoa commented Feb 12, 2024

insert into test select 1 returning 2 now parses correctly

select 1 as returning which is valid only in MySQL and SQL Server and used to parse without error still parses without error (and is now tested)

select 1 returning, which is a syntax error in postgres, sqlite and MariaDB, but is valid in MySQL and SQL Server, used to parse without error, and now returns a syntax error.

The insert into ... select ... returning ... syntax is quite useful in SQLPage

"insert into test select 1 returning 2" now parses correctly

"select 1 as returning" which is valid in MySQL and used to parse without error still parses without error (and is now tested)

"select 1 returning", which is a syntax error in postgres, sqlite and MariaDB, but is valid in MySQL, and SQL Server, used to parse without error, and now returns a syntax error.
@coveralls
Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 7875414967

Details

  • 0 of 10 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.004%) to 87.686%

Totals Coverage Status
Change from base Build 7838477610: 0.004%
Covered Lines: 19646
Relevant Lines: 22405

💛 - Coveralls

@lovasoa lovasoa changed the title add support for insert into select returning add support for insert into ... select ... returning ... Feb 12, 2024
Copy link
Copy Markdown
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Thanks @lovasoa

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.

3 participants