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
{{ message }}
Repository navigation
VSCode: Error reported when "CALL {h-schema}" is used in @Query #1395
When I use the {h-schema} placeholder in a @query native query with CALL for a stored procedure the following error is shown:
PostgreSQL: no viable alternative at input 'CALLh' vscode-spring-boot(SQL_SYNTAX)
Thanks for reporting this, we will look into this to improve the validation here. In the meantime, you can switch off the query validation in the preferences (if the error is too annoying).
We are also facing similar issues. We are using MySQL syntax in a @Query method with native query. I don't know if the issues we are facing are the same because they only show errors for specific words. Here is an example of the query snippet (We will hide the full query).
@shygnome The MySQL queries grammar we use did not allow from and to to be used as identifiers as these were reserved keywords. I've relaxed this in the grammar so now it is likely to parse the query above if you update from the snapshot repo (pushed f53f1d7 as a fix for this)
However, I think you can workaround this issue by replacing from with fromDate and to with toDate.
(Not closing this issue as the problem reported in the comment above is not the same as reported initially in the description at the top)
Activity
martinlippert commentedon Oct 29, 2024
Thanks for reporting this, we will look into this to improve the validation here. In the meantime, you can switch off the query validation in the preferences (if the error is too annoying).
shygnome commentedon Dec 5, 2024
We are also facing similar issues. We are using MySQL syntax in a
@Querymethod with native query. I don't know if the issues we are facing are the same because they only show errors for specific words. Here is an example of the query snippet (We will hide the full query).And the reported error,
MySQL: no viable alternative at input 'SELECT (...) WHERE lo.service_type = :serviceType AND inv.issued_date >= :from'The error only highlights the
:fromword.BoykoAlex commentedon Dec 6, 2024
@shygnome The MySQL queries grammar we use did not allow
fromandtoto be used as identifiers as these were reserved keywords. I've relaxed this in the grammar so now it is likely to parse the query above if you update from the snapshot repo (pushed f53f1d7 as a fix for this)However, I think you can workaround this issue by replacing
fromwithfromDateandtowithtoDate.(Not closing this issue as the problem reported in the comment above is not the same as reported initially in the description at the top)
BoykoAlex commentedon Dec 6, 2024
Fixed via 3e44b79