mattcasters opened a new pull request, #8214:
URL: https://github.com/apache/hop/pull/8214

   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 `SqlEditor` and 
`DatabaseExplorerDialog` stay in place.
   
   ## What this adds
   
   * Perspective `170-HopDatabasePerspective` (`Ctrl+Shift+D` / `Cmd+Shift+D`).
   * Left: project `DatabaseMeta` tree 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).
   * Right: SQL editor tabs and table-info tabs. SQL results appear in a sash 
under the editor (query tabs + messages, close to hide). Long-running work is 
listed in an operations panel at the bottom with Kill (`Statement.cancel`).
   * **Run** lives on the SQL content-editor toolbar. `Ctrl+Enter` / 
`Cmd+Enter` executes 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 follows `HOP_QUERY_PREVIEW_TIMEOUT`.
   * Open/save `.sql` files through the normal File menu. Explorer SQL buffers 
can be sent here via the database icon on the content-editor toolbar (pick a 
connection).
   * `DatabaseWorkbench` is a `Composite` behind `IDatabaseWorkbenchHost` so 
the same UI can later float as a dialog or dock, the same way Search does.
   
   ## Ctrl+Enter (GTK)
   
   SWT `StyledText` treats Ctrl+Return as `TRAVERSE_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 Monaco `CtrlCmd+Enter` → 
`executeRequested`.
   
   ## Out of scope (follow-ups)
   
   * Replacing `SqlEditor` call sites
   * Autocomplete, ER, grid edit
   * Hosting the workbench as a floating dialog or bottom dock
   * Opening this perspective from `DatabaseExplorerDialog`
   
   ## Tests / docs
   
   * `SqlExecuteRangeTest`, content-editor Run toolbar registration, 
disabled-perspective inertness
   * User manual: `perspective-database.adoc`, perspectives list, 
getting-started Hop Gui
   
   ------------------------
   
   Thank you for your contribution! Follow this checklist to help us 
incorporate your contribution quickly and easily:
   - [ ] Run `mvn clean install apache-rat:check` to make sure basic checks 
pass. A more thorough check will be performed on your pull request 
automatically.
   - [x] If you have a group of commits related to the same change, please 
squash your commits into one and force push your branch using `git rebase -i`.
   - [x] Mention the appropriate issue in your description (for example: 
`addresses #123`), if applicable.
   
   To make clear that you license your contribution under the [Apache License 
Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
   you have to acknowledge this by using the following check-box.
   
   - [x] I hereby declare this contribution to be licensed under the [Apache 
License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
   - [ ] In any other case, please file an [Apache Individual Contributor 
License Agreement](https://www.apache.org/licenses/icla.pdf).
   


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

Reply via email to