Issue #8212 : Add a Database perspective as an alternative to the SQL editor dialog - #8214
Issue #8212 : Add a Database perspective as an alternative to the SQL editor dialog#8214mattcasters wants to merge 4 commits into
Conversation
…he SQL editor dialog First cut of a non-modal Database perspective: project RDBMS tree, SQL editor tabs with Ctrl+Enter, results sash, table info, and a killable operations panel. The workbench is a Composite so it can later float as a dialog or dock. Fixes apache#8212.
…tor limits The workbench can open as a non-modal window or a bottom-dock tab, like Search. getRows now calls setQueryLimit so the 1000-row cap reaches the driver; execStatement applies the statement timeout; cancel watchers are skipped on Hop Web and started as named daemon threads. Fixes apache#8224, apache#8228, apache#8229.
|
Follow-up pushed: Float / dock (same
SQL editor issues from the recent “AI Generated” reports:
|
SQL on table output, lookups, updates and bulk loaders now opens the floating Database workbench on that connection. The schema/table tree loads in the background while the suggested SQL can be edited and run. Database explorer Open SQL, Generate DDL and Truncate use the same path.
|
SQL from transform dialogs now opens the floating Database window instead of the modal
Call sites: Table Output, Insert/Update, Update, Synchronize After Merge, SQL File Output, Dimension Lookup, Combination Lookup, and the bulk loaders (MySQL, PostgreSQL, Oracle, SQL Server native, Vertica, MonetDB, CrateDB, Snowflake, Redshift). Database explorer Open SQL / Generate DDL / Truncate uses the same path. The modal |
…ive, window and dock SQL tabs (connection, file or unsaved buffer) are stored per project in the audit trail, the same way terminal tabs are. Closing the floating window or dock, switching project, or restarting Hop Gui restores them. Query results are not persisted.
|
SQL editor tabs are now remembered across the perspective, floating window and bottom dock, and across Hop Gui restarts (per project, same audit store as terminal tabs). Stored: connection, filename or unsaved buffer (capped), dirty flag, selected tab. Opening Float/Dock flushes the current workbench first so the other placement restores the latest tabs. |
Addresses #8212.
First cut of a Database perspective as a non-modal alternative to the SQL editor dialog. This is not a DBeaver clone: no visual query builder, autocomplete, ER diagram, or grid editing. The existing modal
SqlEditorandDatabaseExplorerDialogstay in place.What this adds
170-HopDatabasePerspective(Ctrl+Shift+D/Cmd+Shift+D).DatabaseMetatree with a filter field. Toolbar: connect, disconnect, refresh, open SQL editor, generate DDL, preview 1000 rows, show table info. Connect loads metadata in the background (JDBC is not kept open).Statement.cancel).Ctrl+Enter/Cmd+Enterexecutes the selection, or the blank-line-delimited block around the caret (then split with the dialect script parser). Queries are capped at 1000 rows; timeout followsHOP_QUERY_PREVIEW_TIMEOUT..sqlfiles through the normal File menu. Explorer SQL buffers can be sent here via the database icon on the content-editor toolbar (pick a connection).DatabaseWorkbenchis aCompositebehindIDatabaseWorkbenchHostso the same UI can later float as a dialog or dock, the same way Search does.Ctrl+Enter (GTK)
SWT
StyledTexttreats Ctrl+Return asTRAVERSE_RETURN(shell default button) and always inserts a newline for CR even with Control held. The SQL tab listens for Traverse + KeyDown, cancels that traversal, and rejects the newline on VerifyKey /SWT.Verify. Hop Web uses MonacoCtrlCmd+Enter→executeRequested.Out of scope (follow-ups)
SqlEditorcall sitesDatabaseExplorerDialogTests / docs
SqlExecuteRangeTest, content-editor Run toolbar registration, disabled-perspective inertnessperspective-database.adoc, perspectives list, getting-started Hop GuiThank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
mvn clean install apache-rat:checkto make sure basic checks pass. A more thorough check will be performed on your pull request automatically.git rebase -i.addresses #123), if applicable.To make clear that you license your contribution under the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.