IBM / sourceorbit

Dependency Management for IBM i projects
https://ibm.github.io/sourceorbit/
Apache License 2.0
19 stars 10 forks source link

SQL clause WITH is being added as a referenced object #56

Closed rbeckham closed 3 months ago

rbeckham commented 8 months ago

Hi, In my code I am writing a sql statement that has a WITH clause in it. Source Orbit is picking this up as a object that is referenced.

exec sql declare c1 cursor for 
        with temp as (
          select
           field1,
           field2
          from table1
        )
Select * from temp;

Source orbit is throwing an error saying it cannot find the TEMP object....well this doesn't really exist. I think in these cases SO will have to figure out that temp is used in connection to the WITH clause and will need to only consider objects inside the WITH clause as valid objects referenced. In my example above, SO should only find TABLE1.

worksofliam commented 3 months ago

This is actually a bug in a dependent library, vscode-rpgle.

worksofliam commented 3 months ago

Release 0.10.4 with the fix and also created an additional test case for it.