eirikbakke commented on code in PR #8189:
URL: https://github.com/apache/netbeans/pull/8189#discussion_r2430467301


##########
ide/db/src/org/netbeans/modules/db/util/DriverListUtil.java:
##########
@@ -376,17 +381,42 @@ following fully-qualified class names (FQCNs) that are 
independent of the JDBC v
         
         add("Sybase Driver",
         "com.sun.sql.jdbc.sybase.SybaseDriver",
-        "jdbc:sun:sybase://<HOST>[:<PORT]");          
+        "jdbc:sun:sybase://<HOST>[:<PORT>]");
 
-        add("SQLite",
-            "org.sqlite.JDBC",
-            "jdbc:sqlite:<FILE>");
-        
-        add("H2 Database Engine",
+        url = add("SQLite", null, "org.sqlite.JDBC", "jdbc:sqlite:<FILE>", 
true);
+        url.setSampleUrl("jdbc:sqlite:");
+        url.setUsernamePasswordDisplayed(false);
+        url.setDatabaseFileValidator(new SQLiteDatabaseFileValidator());
+
+        // The FILE field is optional for DuckDB. If omitted, an in-memory 
database will be opened.
+        url = add("DuckDB", null, "org.duckdb.DuckDBDriver", 
"jdbc:duckdb:[<FILE>]", true);
+        url.setSampleUrl("jdbc:duckdb:");
+        url.setUsernamePasswordDisplayed(false);
+        url.setDatabaseFileValidator(new DuckDBDatabaseFileValidator());
+
+        url = add("H2 Database Engine",
             "org.h2.Driver",
-            "jdbc:h2:<FILE>");
+            "jdbc:h2:<FILE>", true);

Review Comment:
   I confirmed that leaving it as it is will just show the JDBC URL to be 
edited by the user, without the file browsing ability. I also confirmed that 
putting the full file name in the JDBC URL does _not_ work; it always wants to 
add the file extension by itself.
   
   So I'll just leave H2 as it previously was.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
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

Reply via email to