[
https://issues.apache.org/jira/browse/NETBEANS-189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17369706#comment-17369706
]
Eric Bresie commented on NETBEANS-189:
--------------------------------------
(1) Resolved issues adding logic to account for cases when connection is not
available and allow sql autocomplete to work even without an active connection
(2) This no longer shows the dialog asking for connection at the time which
prevented autocompletion previously, but still shows the dialogue when needed
like when attempting to "execute" a query where a connection is really needed
(similar to how other sql editor type applications may do things [i.e. wait
until such time as absolutely needed])
(3) From the PR I removed any unnecessary changes from the initial work (i.e.
the hint code initially present was remove and better suited as part of new
created ticket “NETBEANS-5474 Add SQL Hints”),
(4) I have squashed [to the best of my abilities] and reduced the changed files
to only applicable 3 files in the Sql Editor project,
(5) I have adjusted the quoter logic to no longer return an empty string and
have a minimum form of quoter/unquoter (as requested in PR review) which still
works in the unit tests for the SQL projects
(6) Potentially larger architectural change may be needed to allow for
Connection or Connectionless cases involving changes (rather than case by case
changes in a number of places), which may involve introducing a new "Standard
SQL Quoter" class for use when connection is not available instead of the
Metadata (from the connection based handling of identifiers) which I suggest
needs a separate ticket to create a Standard SQL Quoter class and retrofit the
code as part of that work.
The Standard SQl Quoter may involve standardized quoting of identifiers
similar to what is discussed here
https://www.w3resource.com/sql/sql-syntax.php#IDENTIF ). For this, would need
to better understand what the expected input/outputs are for this and what kind
of tests would be needed to confirm this does as expected beyond the existing
sql tests.
(7) There may be another SQL improvements ticket to raise to account for
additional possible missing autocomplete tokens like what is listed in the w3
reference above which mentions after "SELECT" there can be optionally
"DISTINCT | ALL" and either a wildcard ("*"). This is different from selection
list of possible connection based identifiers.
> SQL editor, shouldn't ask evertime to set the connection
> --------------------------------------------------------
>
> Key: NETBEANS-189
> URL: https://issues.apache.org/jira/browse/NETBEANS-189
> Project: NetBeans
> Issue Type: Improvement
> Components: db - SQL Editor
> Affects Versions: Next
> Reporter: Christian Lenz
> Assignee: Eric Bresie
> Priority: Major
> Labels: pull-request-available
> Attachments: SQL Notification.png, required-connection.gif
>
> Time Spent: 5h 10m
> Remaining Estimate: 0h
>
> Of course, the SQL editor doesn't make sense, if you don't set a connection
> to see databases, tables and columns, but sometimes or often, you only want
> to scratch a SQL query and you want the code completion for the SQL stuff,
> like the keywords (SELECT, FROM, WHERE) or aggregate functions (COUNT, AVG,
> etc.) So this is not possible, without setting a connection. But when I don't
> have a connection, I can't use the code completion, becauses it will ends up
> in a loop. See my little screen capture for what I mean.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists