Comments (8)
I'd factor out SQL is a separate issue as we don't have SQL parser and semantic token syntax highlighting for SQL. At the moment all SQL support comes from upstream extensions and syntax highlighting for SQL is somewhat restricted by what upstream extensions/plugins provide. There is no semantic tokens syntax highlighting from Boot LS provided for native SQL (but we can change that of course)
from sts4.
JPQL and HQL are in with 385c35e
from sts4.
SQL was the last one. Went in with fe953bd
from sts4.
It looks like the SQL parser only knows about MsySQL's syntax (from the file name)?
In our case we use PostreSQL-specific syntax and with the update to 4.23 I now have an error marker as the parser does not like/understand PG's type-cast syntax using ::
:
SQL: no viable alternative at input 'DELETE FROM Representation representation
WHERE representation.project_id=?1
AND NOT EXISTS (
SELECT * FROM Document document
WHERE document.project_id=?1
AND jsonb_path_exists(document.content:'
Is there a way to disable these checks?
from sts4.
@pcdavid I hate to say that but the release doesn't have a setting to switch this validation off unfortunately. The setting didn't get generated and it has gone unnoticed.
I have pushed the preferences/settings for SQL, HQL, JPQL syntax validation. Please try updating from the nightly build p2 repo:
for Eclipse 2024-06 (4.32): https://cdn.spring.io/spring-tools/snapshot/TOOLS/sts4/nightly/e4.32
for Eclipse 2024-03 (4.31): https://cdn.spring.io/spring-tools/snapshot/TOOLS/sts4/nightly/e4.31
for Eclipse 2023-12 (4.30): https://cdn.spring.io/spring-tools/snapshot/TOOLS/sts4/nightly/e4.30
It should be here. The drop down has an option IGNORE
which should turn the validation off:
Please let us know how it goes.
Otherwise, it might be best either don't syntax validate native query or looks at the classpath perhaps and figure out whether it is expected to be MySQL or PostGres or some other flavour of SQL... there are a couple of flavours of SQL... wonder if it makes sense to support all of them or none or some...
from sts4.
For the MySQL parser issue: #1273
from sts4.
Thanks for the fast response!
I've updated my install using the nightly (for 2024-06) and indeed, I can now disable this validation and get rid of the error (or turn it into a warning/info).
Strangely, I now see two such syntax issues, while there was only one with STS 4.23.0.
The second is in our IDocumentRepository
interface (whose code did not change recently.
Anyway, the new setting fixes the issue for me. Thanks again.
from sts4.
Thanks for reporting the issue. We'll look into MySQL parser thing and see if we can provider something for Postgres SQL flavour
from sts4.
Related Issues (20)
- Support multiple `SemanticTokensProvider`s from LSP standpoint
- spring tool suite 3 -JDK21 HOT 1
- "Code Completion" not work in application.yml file HOT 2
- vscode @DependsOn navigation not linked HOT 8
- verify upgrade support to Spring Boot 3.3.0 HOT 1
- Support `@ConfigurationProperties` on bean method for `application.properties` references HOT 2
- Occasional NPE when opening / importing / creating Maven projects HOT 3
- upgrade with preview in Eclipse throws exception HOT 2
- STS 4.22.1 - EclEmma Code Coverage not showing. HOT 2
- VSCode Spring Boot extension causes semantic token loss upon loading HOT 12
- add content-assist for `@Qualifier` annotation HOT 1
- JPQL syntax - Support Concatenated Strings
- navigation to class of wired bean is broken HOT 3
- navigation to bean class of live bean in dashboard is broken HOT 1
- Support SPEL expressions inside SQL queries HOT 1
- Unable to view beans for multiple modules in version v1.55 HOT 9
- Upgraded to 4.23.0: MarketplaceDiscoveryStrategy failed with an error HOT 3
- SQL syntax validation
- Two new changes introduced in version 4.23.0 RELEASE (1.55) is generating false positive errors HOT 5
- Ability to switch on/off Query syntax validation and problem severities for query syntax problems HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sts4.