-
Notifications
You must be signed in to change notification settings - Fork 869
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve Add Database Connection dialog for SQLite and DuckDB #8189
base: master
Are you sure you want to change the base?
Conversation
6bc27e1
to
7ffd540
Compare
…SQLite and DuckDB URL templates. Also validate the selected file in the SQLite and DuckDB cases.
…uggested. (Squash before merge.)
7c057f6
to
0b21eb1
Compare
I added another commit which recognizes Snowflake JDBC URLs, just since we're already making enhancements to this piece of code. |
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.expand-tabs=true | ||
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.indent-shift-width=2 | ||
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.spaces-per-tab=2 | ||
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.tab-size=4 | ||
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.text-limit-width=100 | ||
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.text-line-wrap=none | ||
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.usedProfile=project | ||
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.expand-tabs=true | ||
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.indent-shift-width=4 | ||
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.spaces-per-tab=4 | ||
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.tab-size=4 | ||
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.text-limit-width=100 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably not intended to commit module specific indentation settings?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it's intentional, because it influences how Matisse form builder code is generated. The settings stored here ensure the code is generated with the same settings as earlier, simplifying diffs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I see some settings that seem specific to my own IDE though. But removing any of them seemed to make them ineffective. I can just remove the file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
interesting. I haven't considered global ide settings messing with codegen - but it makes sense of course.
we should still try to avoid adding those module specific settings since NB has ~800 projects. Would be good to have a central place for this and let everything inherit it - but I don't think this is possible, otherwise we likely would have a central formatter file somewhere already. (I did see hint settings though)
The "Add Database Connection" dialog supports various kinds of database-specific connection fields (host, port, database name etc.) These are automatically substituted into the JDBC driver specific JDBC URL.
This PR adds support for a "File" field, which will be shown if the user is using the JDBC drivers for SQLite or DuckDB. There is a "Browse" button that can be used to pick the file from a file browser. Furthermore, the username and password fields are hidden for these drivers, which are known not to require this kind of authentication.
For SQLite and DuckDB, there's a warning if the selected file is not of the right kind. (Useful because SQLite files do not have any kind of standardized file extension.)
For comparison, this is what the Add Database Connection dialog looked like before, for SQLite:
(There are some proprietary JDBC drivers for SQLite that do allow a password to be used for encryption, but in this rare case the user could use a connection property to pass this information instead.)