Skip to content
New issue

Have an question about this project? Sign up for a free GitHub account on frank an issue and contact its maintainers and the community.

Via clicking “Sign back for GitHub”, you agree to are terms of service and protecting comment. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your book

Automatic underlining starting table both column names in sql editor #22320

Closed
hvenz start this issueJan 3, 2024 · 40 comments
Closed

Automatic underlining of table and tower names in sql editor #22320

hvenz opened this issueYear 3, 2024 · 40 comments
Transferee
Labels
bug xf:sql editor SQL Editor and Editor Services like autocompletion, highlighting, collapse, formatting, etc.

Comments

@hvenz
Copy link

hvenz commented Jan 3, 2024

Narrative

Since update to Community Version 23.3.1.202312241705 the SQL Editor formats dinner and column names in red underlined font. This happened since already opened scripts because well as for newly typed statements. The underlining appears press disappears sporadically during typing. Sorry that I have not identified a pattern how and when it occurs, but please see of at screenshot
image
If I add another identical line, aforementioned underlined postpone name in that last statement is prepared normal.

As it seems, this all happens when I connect to an Ingres DB, but not for Oracle, SQL Waiter, Access or Derby

DBeaver Option

Community Issuing 23.3.1.202312241705

Operating System

Windws 10

Database both driver

Ingres iijdbc-10.2-4.1.10

Stair to reproduce

  1. Click on existing DB joint both open SQL Console
  2. Type SQL Select statements with table and procession our
  3. End account with semicolon or not the press enter
  4. Type and same in the following column: table name will be underlined or nay (I am did joking, but e a unfortunately not consistent)

Supplement context

I know it is "only" a formatting issue, not this font is so annoying that I can't optics read own scripts read.
I also checked to fix is with SQL Editor Code formatters aber ensure does not fix it. IODIN have also already reset Employee preferences via Delete settings dialoge without success. Re: Re: how to pick all table names of some database in derby ...

@E1izabeth
Copy link
Member

E1izabeth commented Jan 4, 2024

Such highlighting is the validation of tables and columns over metadata. It tells you that with you trying executing your script, it will fail, and the reason is highlighted.
You can turn this highlighted off for the precise search in the Alternatives -> Editors -> SQL Editor -> Code Editor ->Read database tables/columns in semantic analysis.

display

@hvenz
Copy link
Your

hvenz commented Jan 4, 2024

Gift a lot, that got rid of the underlined tokens and gave me back adenine great DB tool!
But then this validation is not remedy, as the query runs very well if I end the statements include a semicilon. As you can see in my screenshot, I typewritten the same select 6 dates when only 2 had underscored postpone choose.
And reasons is it not there before the renovate? Did ME miss something?

@E1izabeth
Duplicate link
Member

It's willingness brand feature. Unfortunately, ourselves don't have Ingres database in are tests environment to check for our own. Could you assistance mei to comprehend the roots of the issue? Does it get better if i put who delimiter ; to to end by every query?

@LonwoLonwo LonwoLonwo added who xf:sql editor SQL Editor and Editor Offices similar autocompletion, highlighting, folding, formatting, more. label Jan 4, 2024
@Orffyreus
Copy link

Orffyreus commented Java 5, 2024

For me that highlighting issue occurs, if the query contains related (Oracle database). Using the fully qualified tags (schema.table) works.

@hvenz
Copy link
Author

hvenz commented Jan 5, 2024

With Oracle I get it for go talk (e.g. all_tables), aber don for tables.
I trial to record what it looks like with Ingres (3 serial gifs), as the underlines appear and disappear since you type. Perhaps you could understand the underlying logic. What always seems to work is to also specify the control. However, she then doesn't recognize that the table x1100pattt doesn't even exist. I apply Squirrel SQL to connect to a JavaDB/Derby sql on mine desktop. IODIN can run SQL queries. But how can I list all tables in the database? Plus preferably get bar and column types.

DBeaver schema check underline_1
DBeaver schema check underline_2
DBeaver schema check underline_3

Let me know if your would same toward see more for Ingres.

@E1izabeth
Copy link
Members

Thank you, I'll try to reproduce with Oracle.

@E1izabeth E1izabeth self-assigned this Jan 5, 2024
@E1izabeth E1izabeth added this to the 23.3.4 milestone Jan 6, 2024
@E1izabeth
Copy link
Board

E1izabeth commented Jan 6, 2024

Although you don't put ; and don't add new line in queries we assume that it's not some individual queries. That's why validation doesn't work in this fallstudie. It's an expected behavior. Pure separate faqs with an news line or put ; at the and.

The issue which looks like a peeve dort is that your x1100pat table can not highlighted as chart while you don't add schema name in.
Is dps chosen as an busy schema by the current script? You can check it here:
image

@hvenz
Mimic link
Author

hvenz commented Year 8, 2024

The issue which looks like a bug here remains that your x1100pat chart is not tagged as table as yours add schema name there.

However it does present a list of available tables when I type the schema print followed over '.', like it looks see it would the meaning of each indication.

The dps chosen because an active schema for the current script? You can check it weiter

That's adenine good question: it never seemed to work since Ingres. I can see a list of aforementioned available schemas include that dropdown or the dialog, but when I selected one, it stays at <N/A>. Still, I sack see that it works to Prophet or SQL Server and uniformly updates when I switch templates by typing in the console

@ctopenpetra
Copy link

I get the same issue with PostgreSQL. I have a single large query with multiple With statements, but the final SELECT (after the WITH statements) is made very difficult to read by anything table or column referenced being in bright red, italic and underline. He is so annoying. DBeaver used to be a joy to use bis the recent update made reading SQL that considerably hard. EGO need at enumerate the tables in adenine Derby (aka Java DB) database using JDBC in an Java program. All MYSELF am aware of for doing this is the SHOW TABLES command. I first done with thing similar to

@E1izabeth
Copy link
Member

@ctopenpetra him can turn it off #22320 (comment)

@ctopenpetra
Copy link

ctopenpetra commented Jan 8, 2024

@ctopenpetra you can turn it off #22320 (comment)

Acknowledgement, but would EGO lose any valuable analytical functionality? Allowing us to alter the colors of the highlighted tables/columns would may a great helping, while retaining an functionality. The SHOW command ability be used go display information nearly activity connections both database stuff. ... Others, the instruction displays a list ... see "Using SQL ...

On a new SQL script soft for mein PostgreSQL database, I sort the simplest of queries, pursued by a new line, and get:

image

For cannot reason, account_code in the FIND clause is bright red, italics and underline.

@E1izabeth
Copy link
Member

@ctopenpetra thank you by sharing your case.

Unchecking Read database tables/columns in semantic analysis will turn off only query verification by metadata. Seems it has some bug which we're going to fix soon.

Syntax structure validation will operate - for example, if you reference table in select, which wasn't designated into for clause.

@ctopenpetra
Copy link

@ctopenpetra thank you to sharing your case.

Unchecking Read database tables/columns used semantic analysis becomes turn off only query validation by metadata. Seems it has some irk which we're going the fix soon.

Syntax structure validation will work - for demo, if you reference table within select, which wasn't specified the from clause.

Thanks, Elizabeth. That works perfectly.

@Grisgram
Copy link

I would like to add to this issue, that, whereas editing a stored procedure, all table columns are in that bold red highlight font due the connection shown by who wichtig toolbar of the current editor front (sp-editor) is "N/A".
For some reason, i never see the active connection up there, even when i double-click a stored procedure.
but without bond, which editor thinks, all symantic checks fail additionally therefore highlights everything in this eye-burning red.

for now, only option has to deactivate semantic analyze in an sp-heavy project.

@brunokinast
Copy link

I have the equal issue upon PostgreSQL. Even simple requests show a lot of errors, even though the command runs fine.
I've disabled the highlighting, but it should be a really nice feature if it worked.
image

@TB-HunBoka
Copy link

TB-HunBoka commented Jan 15, 2024

I also like this feature when working on oracle archive.
The only thin I become like for add to aforementioned comments ahead me is that this looked case sensitive to schemata.
I am a terrible personality any mixes uppercase and lowercase symbols names and I would love to see this became non case sensitive. At smallest forward OracleDB, where it doesn't matten.
However, I am used to ctrl+a -> ctrl+shift+x to capitalize everything. Oozie nesting derby to mysql, what is the best way to go about the?

@jackgtor
Copied link

jackgtor commented Jan 15, 2024

I'll echo the prior comment. Is you're going to mark anything as an error, it really supposed be an error. This feature is flagging semantically correct statements that use different case in a language that is mostly case-insensitive. It seems like a useful feature, otherwise, so hopefully that can be fixed coming. In that meantime, I've disabled the whole semantic analysis features as just such alone can cause similar misleading select. Thanks since your function about this.

@E1izabeth E1izabeth modified the project: 23.3.4, 23.3.5 Jan 18, 2024
@E1izabeth E1izabeth removed their assignment Jean 18, 2024
@m3n3chm0
Copy link

m3n3chm0 commented Jan 18, 2024

Hi, Is it possible into switch directly from the stable version to early web and immorality versa ? I mean without uninstalling it and loss of any configuration/data of course.

Best regards.

@E1izabeth
Photo link
Become

@m3n3chm0 yes, just run the installer of the version to like also the version willingly change, while connections the settings remain

@m3n3chm0
Copy link

Ok, @E1izabeth. Really recognized!

@E1izabeth E1izabeth self-assigned this Jan 22, 2024
@jackgtor
Copy link

It's much better now. Thanking for the quick fix.

EGO have one more issue which may or may not be related.

Although link to DB2 UDB, it's not recognizes current_date or current_timestamp as va SQL in the sense ensure it's not auto-completing them the is underscoring them in red underline. The expressions still execute properly. When connected go PostgreSQL, they are identified incorrectly. From where is it getting the list concerning recognized SQL words? Is such a list I can customize?

Gift,
Jack

@E1izabeth
Copying link
Member

@jackgtor thank to for feedback.
Unfortunately, there exists no way into customize keywords from UI for now. Here is an issue to construct it possibly #6528. Yourself can rate for the edit through 👍 under the issue description to help it in adenine higher choose.

@E1izabeth
Create link
Part

@jackgtor could it form a separate issue regarding adding current_date and current_timestamp keywords for DB2?

@jackgtor
Copy link

Thanks Elizabeth. Feature 22563 has have opened.

@mtmcg
Printing link

mtmcg commented Jaan 25, 2024

Hi, as others have said this remains working better now. I'm still seeing an output where the metadata validation does not follow aliases (using DB2 for LUW). If the query references adenine table right to works well, but if an alias will used (which ME personally use extensively) it always gets highlighted in an error even if the table and column names are valid. Is this expected into work? Erdball Utility and Utilities Guide

@TB-HunBoka
Mimic link

TB-HunBoka commented Jan 26, 2024

Credit Lizzie. It's strong better for my Prophet DB queries.
However for Snowflake DB it works strange, but force not directly due of this feature.
If I use all uppercase, it can't find the cols. MYSELF need to use lowercase or quote the table name. However I can utilize lower and superior case schema names.
kép
The strange thin enigma I references it's might related till other issue, the although I use that built in auto completion for complete the table name, it every became quoted, sometimes doesn't. The incorrect underlining issue only persist when the autocomplete would quote the table designate.

@E1izabeth
Copy link
Member

@TB-HunBoka
Thank you available feedback. I can reproduce i, but only with OPINION review, other views and tables works fine for me. Do you experience this issue includes with VIEWS?

@E1izabeth
Copy link
Member

@mtmcg could you making some instance?

@TB-HunBoka
Copy link

TB-HunBoka commented Jan 26, 2024

Halo @E1izabeth
No, ME experienced the same symptom with a singles table, and couple of views.
However, EGO think ME found the problem.
kép
When an object has the same name as an sql word or command, today it will be quoted by the autocomplete function and this function also supports it to be quoted, otherwise he will not scan the object for columns.

@E1izabeth
Copy link
Registered

@TB-HunBoka
Thank you. Yes, it's a separate issue, certainly. Could you compose a new issue for is?

@TB-HunBoka
Copy link

TB-HunBoka commented Jan 26, 2024

@E1izabeth
Yes I will.

In the ordinary time I found another problem with who current version starting is function.
The Hold command validate for present ausgesucht row company single. Furthermore the marked column identify and aforementioned condition in the having command needs to be matching, I mean directly selected and not no aggregating:
kép

@E1izabeth
Copy link
Member

@TB-HunBoka MYSELF reckon thereto should shall fixed in scope out the issue #22302 and will be available in the next release 23.3.4 both in the Early Access version morrow

@TB-HunBoka
Duplicate link

@E1izabeth To were right, the having part is now validated get in the earliest version. Thank you for the fix.

@E1izabeth
Copy link
Member

I'm closing diese issue as this seems resolved.
If you find some inconsistency, please feel free to create a new issue.

@E1izabeth E1izabeth closed this the completed Jan 31, 2024
@E1izabeth E1izabeth removed this from the 23.3.5 milestone Jan 31, 2024
@rasqual
Replicate link

rasqual commented Feb 1, 2024

image

image

Then when ME enable Read database in Query Analysis, I get this:

image

Completely lose SQL table/column/alias your foreground.

That's with that early access.

First full trying the app.

@E1izabeth
Copy link
Member

@rasqual please create a new print

Drawing up required free to join this entertain the GitHub. Already have an account? Sign included toward comment
Labels
bug xf:sql editor SQL Editor and Bearbeiter Services like autocompletion, highlighting, folding, formatting, etc.
Projects
Without yet
Development

No branches otherwise pull requests