You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Every time I save my SELECT in my UNION statements will indent. So if I continue to save over and over it'll continue to indent.
Example Snippet
SELECT
DISTINCT
t
FROM
(SELECT *, 0 AS s FROM [db]..t UNION SELECT *, 1 AS s FROM [db]..t) AS r
Logs
I believe these logs are unrelated, but just in case
Error - 1:32:07 PM] Request textDocument/definition failed.
Message: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
at Babel.ParserGenerator.MinimalList`1.get_Item(Int32 index)
at Babel.ParserGenerator.ModifiedMinimalList`1.get_Item(Int32 index)
at Microsoft.SqlServer.Management.SqlParser.Parser.TokenManager.GetToken(Int32 tokenNumber)
at Microsoft.SqlTools.ServiceLayer.LanguageServices.Completion.ScriptDocumentInfo.GetPeekDefinitionTokens(ScriptParseInfo scriptParseInfo, Int32 startLine, Int32 startColumn) in D:\a\1\s\src\Microsoft.SqlTools.ServiceLayer\LanguageServices\ScriptDocumentInfo.cs:line 158
at Microsoft.SqlTools.ServiceLayer.LanguageServices.LanguageService.GetDefinition(TextDocumentPosition textDocumentPosition, ScriptFile scriptFile, ConnectionInfo connInfo) in D:\a\1\s\src\Microsoft.SqlTools.ServiceLayer\LanguageServices\LanguageService.cs:line 1379
at Microsoft.SqlTools.ServiceLayer.LanguageServices.LanguageService.HandleDefinitionRequest(TextDocumentPosition textDocumentPosition, RequestContext`1 requestContext) in D:\a\1\s\src\Microsoft.SqlTools.ServiceLayer\LanguageServices\LanguageService.cs:line 519
Code: 0
To Reproduce
Steps to reproduce the behavior:
Create a .sql file
Paste Example Snippet above
Update settings to uppercase everything
Save
Expected behavior
A result of something like:
SELECT
DISTINCT
t
FROM (
SELECT
*, 0 AS s
FROM [db]..t
UNION
SELECT
*,
1 AS s
FROM [db]..t
) AS r
Desktop (please complete the following information):
SQLTools Version [1.10.1]
VSCode Version: [1.55.2]
OS: [Windows]
Driver:
PostgreSQL/Redshift
MySQL/MariaDB
MSSQL/Azure - though I'm not sure how this is utilized for this bug
SQLite
Other? Which...
Database version: [MSSQL 13.0.5698.0?]
Additional Context
I've tested this with working code in addition to this pseudo-code.
The text was updated successfully, but these errors were encountered:
Describe the bug
Every time I save my
SELECT
in myUNION
statements will indent. So if I continue to save over and over it'll continue to indent.Example Snippet
Logs
I believe these logs are unrelated, but just in case
To Reproduce
Steps to reproduce the behavior:
.sql
fileExpected behavior
A result of something like:
Desktop (please complete the following information):
Additional Context
I've tested this with working code in addition to this pseudo-code.
The text was updated successfully, but these errors were encountered: