Repository navigation
Sidebar width - #20
Open
odilovalisher17 wants to merge 27 commits into
Open
odilovalisher17 wants to merge 27 commits into
odilovalisher17 wants to merge 27 commits into
Conversation
With transparent = true the cells on bg, pane_bg or gap (or a color equal to one, as tokyonight-storm's row_alt) get the terminal's default background as the frame goes out (Frame.Unpaint), so a translucent terminal shows through; highlights, selections, the status bar and the chips that use bg as their text keep their colors. An overlay's dimming leaves those cells alone, else it would mix them into solid colors. Off by default; spec §7.3 and §14, docs/config.md.
Two new engines, each over its own HTTP protocol with the standard library
rather than a driver, so every value is the server's own text (§8.1):
ClickHouse's TabSeparatedWithNamesAndTypes, Trino's JSON pages. Browsing,
paging, counts, export, the query editor, quick SQL, DDL and the editable
grid all work on both; Trino's catalogs are the tree's database level.
Neither has transactions for writes (ClickHouse's UPDATE and DELETE are
mutations; every Trino connector writes in autocommit only, tried on the
postgresql and memory catalogs), so db.Save gets a path for an Unatomic
engine: each UPDATE and DELETE only after a count says it hits exactly one
row, and a failure halfway is db.Written{N}, which the app turns into
clearing those N edits and saying they stay written instead of "rolled
back". A Typer engine's save arguments are cast to their column's type,
neither engine reading text as a number. The SQL the five engines before
send is unchanged (update_test).
Also: sqlkit dialects ClickHouse and Trino (lexing, reserved words,
literals, the formatter's language, Trino's OFFSET before LIMIT,
ClickHouse's LIMIT before SETTINGS/FORMAT); db.Inline moved out of exec
for all three to share; sqlserver://, clickhouse:// and trino:// on the
command line; the form's engine row compacts when its segments don't fit.
Tests: unit tests for both clients, integration tests on ClickHouse 25.8
and Trino 478 (docker-compose.yml, CI), app-level tests of a save and a
partial save. Spec §8.9, §8.10, §10.3, §14; docs/config.md, README.
Oracle (engine = "oracle", oracle://user@host:1521/SERVICE) over go-ora, pure Go, so no Instant Client: the tree of schemas from the ALL_* views, tables, columns, keys, indexes, functions, sequences, DBMS_METADATA DDL, paging with OFFSET ... FETCH, the editable grid with saves in one transaction, the manual transaction mode, quick SQL in a READ ONLY transaction. Tried on Oracle 23ai Free: go-ora gives NUMBER as its exact text; dates and timestamps are written in the session's NLS formats, set at connect, and a save's arguments are parsed back in them (db.Typer), a CLOB compared by DBMS_LOB. Oracle has no BEGIN: the connection takes SET TRANSACTION for the driver's begin, COMMIT and ROLLBACK for its end, and a DDL, which commits on the server, as one too. sqlkit's Oracle dialect splits PL/SQL at a / of its own line, reads q'[...]' strings and # in names, quotes a name with lower case letters. The connection form's engine row, eight engines now, scrolls as a tab bar does: the chosen one in sight, ‹N and N› for the others, a click on one picking the next of them; the window follows the choice alone. Tests: unit tests, integration tests on Oracle 23ai Free (docker-compose.yml, CI), an app-level save and failed save. Tests that took oracle for an engine there is not take db2. Spec §8.11, §7.8; docs/config.md, README.
The connection form's engine is a select now, its field the engine and a ▾, and while it has the keys a list of the engines, the group field's list reused, opens under it, scrolling as that one does: ↓ ↑ (C-n C-p, j k, the engines scope) pick as they go, round the ends, the port going with them; esc closes it; ↵ saves the form as from any field. The horizontal segments and their scrolling are gone with it, the form's only segment row having been the engine's. Engines' icons are their own logos, in their brands' colors over the theme's (a theme's [icon.<engine>] fg still wins): SQL Server, Oracle and ClickHouse get Nerd Fonts 3.3's devicons, SQL Server no longer falls back to PostgreSQL's elephant; Trino, which Nerd Fonts lack, keeps the rabbit in its pink. The codepoints were read out of the installed font's tables. Spec §7.7, §7.8; docs/config.md.
Where the terminal draws kitty's Unicode placeholders (kitty, Ghostty, not under tmux or screen), the engines' icons are DBeaver's icons, sent once at the start (a=T,U=1, quiet) and drawn as two placeholder cells, U+10EEEE with their row and column diacritics, the image's id their color: text to the rest of the program, so the tree, the form, the manager and the dropdowns draw them as they draw any icon. An overlay's dimming leaves those cells be, the color being the id; the images are deleted as the program ends. icons unset decides by the terminal, "images" forces them, "nerd" or "ascii" keeps glyphs. Redis, which DBeaver has only Pro's badged icon for, keeps its glyph. The PNGs are DBeaver's *_icon_big.png, unmodified, under Apache-2.0, with its license and a NOTICE in internal/ui/logos. Spec §7.7; docs/config.md.
kitty keeps an image to the screen it came on, the alternate one apart from the main: the logos sent before Bubble Tea's first frame went to the main screen, and the placeholders on the alternate one stayed blank. They go now with tea.Raw a moment after the start, and their deletion as the program quits, a frame before the main screen is back. Spec §7.7.
DBeaver's *_icon_big.png are the new-connection dialog's: Oracle's is the ORACLE wordmark, MySQL's the dolphin with its name, unreadable in two cells. Its navigator tree draws *_icon.png; the @2x ones, 32x32, are these now: Oracle's red square with its O, MySQL's dolphin alone.
Editing a connection, the fields split from its dsn were dim and passed by Tab: the dsn was the one place to change it, as the form could not write parts of a dsn with parameters of its own back. They and a dsn sqlmux can read (a URL, the MySQL driver's tcp() form, a SQLite path) are now kept the same both ways, rewriteDSN changing only the part a field says, its scheme, parameters and a password in it as they were, splitDSN reading a dsn typed back into them; only a dsn it cannot read, SQL Server's keywords, keeps them dim. splitDSN reads SQL Server's database from its parameter. Spec §7.8.
The tree leaves out the schemas a server keeps for itself, and so did the list to pick schemas from: Oracle's SYS, DVSYS and the rest could not be had at all. An engine that has them says which (db.Systemer: Oracle's maintained users, PG's pg_catalog and information_schema, MySQL's mysql and sys, SQL Server's sys and db_*, ClickHouse's system, Trino's information_schema); the list has them after the user's, off and marked; one picked is read with its tables, the catalog's queries taking the picked schemas as they are (db.Scope) where with none picked they keep the server's out. All the user's and none of the system's is still no line. The list's / search is among its hints now. SchemaIn's none is 1 = 0, which Oracle takes.
Properties in a table's or a view's right-click menu, and table.properties in the palette, open a tab of what the catalog says of it: its columns, with their types, NOT NULL, defaults and keys, its keys, foreign keys, indexes and DDL, a section at a time, the sections chips over the filter as a Redis key's Info row is. It is a table tab with another source, propsSource, so the grid's moves, search, JSON view and export work; it is read only, its filter plain text kept out of the table's WHERE history, and no layout keeps it. A section is read once, the page, the count and the columns asking it apart, and again on R or a switch. The menu placement test now says CompleteBox's rule: below when all fits, else the side with more room, scrolling; the table's menu, one longer, fits neither side of row 10 of a 22-row window. Spec §7.8.
A table's properties are no tab of their own now: the table's tab shows its rows or them, as DBeaver's Data and Properties, switched by gi (in the grid and the JSON view), the grid's and the tree's Properties, and the ◂ Data chip; Tab.Data is the side shown, the two linked by other, Tab.table() the rows' always, which saves, quits, closes and layouts go by. The DDL section is the read-only vim of the JSON view, in SQL's colors as the console's and the DDL popup's, with nothing over it but its section row; esc and :q go back to the rows. The tree has each table's size where its engine says it in the query that lists them (PG's pg_total_relation_size, MySQL's data and index length, SQL Server's used pages, ClickHouse's total_bytes, Oracle's segments), else its row estimate, and nothing in place of ?. Spec §7.8, §8.12.
A table's toolbar has a properties button (nf-fa-info_circle), the last of its last group, lit while the properties show, which does what gi does: the only way there was a key or a menu. Export writes .xlsx too, the page or all of it: a zip of a few XML parts, written with archive/zip, the sheet streamed into it as its rows come, as a CSV's are. The header bold and frozen; a number column's value a number cell where Excel's doubles hold it exactly, else text; NULL an empty cell; the characters XML has no place for left out, a cell cut at 32767; at Excel's 1048576th row it stops, the file kept, and says so. file(1) takes it for Microsoft Excel 2007+; tested on a page and on all of Oracle's T_ORDER. Spec §7.6, §7.8.
…ler refuses it PgBouncer and other poolers reject startup parameters they do not track (FATAL: unsupported startup parameter, SQLSTATE 08P01), so the read-only Meta connection could not connect through them. Retry without it; no SET afterwards, since that would stick to a pooled server connection others get. Read only there is sqlmux's own guard (§13). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
postgres: dial again without default_transaction_read_only when a poo…
product_component_version.version_full only exists on 18c and later, so the connection test failed on 11g/12c with ORA-00904. Retry with the version column on that error, and don't index into an empty result. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
oracle: fall back to version when version_full is missing
…racle's table sizes An Oracle with a user per branch has 30k schemas and 146k tables; with none picked the tree read them all, and DBA_SEGMENTS alone took minutes, so the tree and the schema picker stayed empty. Past 500 schemas with none picked, read the current one and leave the rest to pick; give DBA_SEGMENTS 5s, scoped to the picked schemas, before falling back to USER_SEGMENTS. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tree: read only the current schema of a server with many, and bound O…
A trino:// DSN on port 443 without ?ssl=true sent plain HTTP to an HTTPS port, and nginx answered 400. Nothing but TLS answers on 443: take it for https unless the DSN says ssl=false. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
trino: speak TLS on port 443 unless ssl=false
A user without a grant on system.runtime.nodes failed the connection test with Access Denied. version() is the coordinator's version too and wants none: Trino takes the default query. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
trino: test with version(), not system.runtime.nodes
A table's row opens on the release now, not the press; dragged off its row and let go on a query's text, its name goes in there: db.schema.table on PG and SQL Server, catalog.schema.table on Trino, schema.table elsewhere, each part quoted where it must be. Also gofmt of tree.go from #4. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tree: drag a table into a query for its full name, as DBeaver
SPC > / SPC < from any pane, > / < in the tree, 4 columns a press (a count multiplies); = in the tree, or a double click on the sidebar's edge, makes it as wide as its widest row (half the window at most), and again goes back to the configured width. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…y pane The empty tab's t and c, and the tab bar's +, took the mouse to reach from a query: the same actions now have leader keys in NORMAL. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.