XmlForClause object has wrong FirstTokenIndex value in some cases

Aperta
#119 0 commenti 6 reazioni 1 assegnatario Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

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

Image

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

Lingua principale
GAP
Stelle
277
Fork
43
Merge medio
6g 17h
PR unite (30g)
3

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di microsoft/SqlScriptDOM

Tutte le issue di microsoft/SqlScriptDOM

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.