You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "Eric Bresie (Jira)" <ji...@apache.org> on 2021/07/02 15:52:00 UTC

[jira] [Created] (NETBEANS-5831) Create a SQL Standard Quoter for Use with Connectionless Cases

Eric Bresie created NETBEANS-5831:
-------------------------------------

             Summary: Create a SQL Standard Quoter for Use with Connectionless Cases
                 Key: NETBEANS-5831
                 URL: https://issues.apache.org/jira/browse/NETBEANS-5831
             Project: NetBeans
          Issue Type: Improvement
          Components: db - SQL Editor
    Affects Versions: 12.4
            Reporter: Eric Bresie


Based on "NETBEANS-189 SQL editor, shouldn't ask evertime to set the connection", it was found when connectionless case occurs, this prevented auto completion because it relies on connection (DB metadata) based class to return back identifiers which may require further "quoting" to accomidate different DB vendor quotring behavior.  When connection is not available, the db metadata based class does not provide back any usable token for use in auto completion and more specifically when quoting these identifier tokens.  

Initial changes in PR-2820 handle specific cases to handled null quoter (due to lack of a connection) where applicable to allow autocompletion without connection to occur.  As part of the review of PR, It was suggested to refactor some of this code to develop "ConnectionLess" functionality to better isolate the connection vs connectionless functionality.  This may involve development of a Standard SQL Quoter to accomidate basic SQL quoter logic not dependent on a connection (and metadata based identifiers).  


From NETBEANS-189 comments:
??(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.??

Reference:
# https://issues.apache.org/jira/browse/NETBEANS-189
# https://github.com/apache/netbeans/pull/2820




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists