You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "aharpervc (via GitHub)" <gi...@apache.org> on 2025/04/23 20:53:33 UTC
[PR] Add `DECLARE ... CURSOR FOR` support for SQL Server [datafusion-sqlparser-rs]
aharpervc opened a new pull request, #1821:
URL: https://github.com/apache/datafusion-sqlparser-rs/pull/1821
This PR adds support for declaring cursors on queries for SQL Server ([docs](https://learn.microsoft.com/en-us/sql/t-sql/language-elements/declare-cursor-transact-sql))
Eg, this now parses correctly, which is the "A" example from documentation:
```mssql
DECLARE vend_cursor CURSOR
FOR SELECT * FROM Purchasing.Vendor
OPEN vend_cursor
FETCH NEXT FROM vend_cursor;
```
There was already basic support for SQL Server cursors. What was missing was detecting & parsing the `for_query` struct field, and not requiring the `@` prefix for cursor names.
A new verified statement test was also added accordingly.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Add `DECLARE ... CURSOR FOR` support for SQL Server [datafusion-sqlparser-rs]
Posted by "iffyio (via GitHub)" <gi...@apache.org>.
iffyio merged PR #1821:
URL: https://github.com/apache/datafusion-sqlparser-rs/pull/1821
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org