KrzysztofDusko / JustyBase

SQL editor/IDE
GNU General Public License v3.0
10 stars 0 forks source link

Autocompletion from subqueries does not work in semi-complicated subquery #270

Closed andrzejchmiel3 closed 7 months ago

andrzejchmiel3 commented 7 months ago

Example:

select tab1.kol1 , tab2. from (select 1 as kol1) as tab1 LEFT JOIN ( SELECT 1 as kol2 ,555 as NR ) as tab2 ON tab2.kol2::CHAR(1) = tab1.kol1 ::CHAR(1) AND tab2.NR = 555

typing tab2. does not trigger autocompletion. This is as simple as it could get, so removing anything else makes it working as intended, but this combination of subqueries and join conditions somehow disables autocompletion

KrzysztofDusko commented 7 months ago

works

SELECT * FROM
FROM (SELECT 1 AS KOL1) AS TAB1
LEFT JOIN (SELECT 1 AS KOL2 ,555 AS NR FROM JUST_DATA..DIMACCOUNT) AS TAB2 ON 
    TAB2.KOL2 = TAB1.KOL1
    AND TAB2.

works

SELECT * FROM
FROM (SELECT 1 AS KOL1) AS TAB1
LEFT JOIN (SELECT 1 AS KOL2 ,555 AS NR FROM JUST_DATA..DIMACCOUNT) AS TAB2 ON 
    TAB2.KOL2 = TAB1.KOL1::INT
    AND TAB2.

do not

SELECT * FROM
FROM (SELECT 1 AS KOL1) AS TAB1
LEFT JOIN (SELECT 1 AS KOL2 ,555 AS NR FROM JUST_DATA..DIMACCOUNT) AS TAB2 ON 
    TAB2.KOL2 = TAB1.KOL1::CHAR(1)
    AND TAB2.
KrzysztofDusko commented 7 months ago

image

KrzysztofDusko commented 7 months ago

\(.*\)(\s)+(?<alias>\w+)

KrzysztofDusko commented 7 months ago

please check original SQL.

andrzejchmiel3 commented 7 months ago

It works now correctly, thank you