XmlForClause object has wrong FirstTokenIndex value in some cases
Nobody has claimed this yet.
Assessment
This issue has not been assessed yet.
Description
ScriptDom version: 161.9142.1
Compatibility level: 150
Sample code:
SELECT *
FROM dbo.foo
FOR XML PATH(''), ROOT ('x'), TYPE
SET @x = (SELECT *
FROM dbo.foo
FOR XML PATH(''), ROOT ('x'), TYPE);
Here, in the first case everything is ok: XmlForClause.FirstTokenIndex points to the token representing FOR keyword, the first option points to PATH.
But in the second case (FOR XML used in subquery) XmlForClause.FirstTokenIndex has the same value as for the first option and points to the token representing word PATH which is wrong
XmlForClause.FirstTokenIndex should always point to the FOR keyword.
The same issue applies to JsonForClause.
See also token-index related bug-reports: #118, #90, #91
- Dominant language
- GAP
- Stars
- 277
- Forks
- 43
- Avg merge
- 6d 17h
- Merged PRs (30d)
- 3
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/SqlScriptDOM
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
microsoft/SqlScriptDOM#228 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
microsoft/SqlScriptDOM#183 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 56/100
microsoft/SqlScriptDOM#226 · 1 reaction ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
microsoft/SqlScriptDOM#225 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 58/100
microsoft/SqlScriptDOM#224 ·