Repository navigation
Conversation
Add `data.fromDatabase` under Data > Get & Transform Data: run one SQL query and import the result into a new sheet as a table. Drivers live in the new native-only `gridcraft-datasource` crate (postgres, mysql, rusqlite; ODBC through the system driver manager behind the `odbc` feature, off by default so a plain build needs no system library). The engine only sees a `DataSource` the host (desktop app, CLI) injects into the session, so it stays network-free and wasm-clean. The ribbon button and its keytip open a form for driver, connection, query and optional credentials. Passwords are never journaled. Integers beyond 2^53 come in as text so no digits are lost. Catalog gains the entry (275 / 291); gaps.md, file-format-parity.md, target-app-parity.md and ROADMAP.md updated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A mysql:// connection left on the default PostgreSQL driver failed with "invalid connection string". The dialog now selects the driver matching a postgres://, mysql:// or mariadb:// URL as it is typed, and the command rejects a URL whose scheme names another driver with a clear message. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nections The From Database dialog now composes the connection from server, port, database and user fields (or a DSN / file), with the connection string editable on request. Connect lists the tables and views in a filterable grid; picking one lists its columns as checkboxes, and the import selects only the ticked ones (`table`, `schema`, `columns` params). An SQL query is still available. New `data.databaseTables` and `data.databaseColumns` read the catalog (information_schema, SQLite's catalog, ODBC SQLTables/SQLColumns). The imported table keeps its query (`Workbook::db_queries`, saved in `customXml/gridcraftDbQueries.xml` and tied to the table by sheet and top-left cell, never with a password). `data.refresh` runs it again and rewrites the table in place, growing or shrinking it without touching cells next to it; Refresh All refreshes database tables before PivotTables. Passwords given in a session are remembered in memory only; when one is needed, a password dialog asks for it. Connections (without passwords) can be saved in the preferences. Ribbon: Data > Refresh All and Refresh; keytip ARR runs `data.refresh`, which falls back to the PivotTable refresh. Catalog 276 / 292. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Labels, hints and messages of the From Database and password dialogs and of Refresh All go through the interface translations, so a language catalog can cover them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Implements the one-shot import proposed in #1206 (also covers the database part of #1318): Data › Get & Transform Data › From Database runs one SQL query and puts the result in a new sheet as a table. It implements the
data.fromDatabaseid the keytip table already reserves forAPND.What it does
data.fromDatabase {driver, connection, query, user?, password?, sheet?, maxRows?, timeout?}, withdriverone ofpostgres,mysql(also MariaDB),sqlite,odbc. With no parameters it opens a form (driver, connection, query, optional credentials).maxRowstruncates and the result says so.How it's built
gridcraft-datasourcewith the drivers:postgres,mysql(rustls),rusqlite(bundled). ODBC through the system driver manager sits behind anodbcfeature, off by default, so a plain build needs no system library. The desktop app and CLI forward the feature.DataSourceinto the session, and without one the command returns an error.cargo xtask wasmpasses.gaps.md§12,file-format-parity.md,target-app-parity.mdandROADMAP.mdupdated.Overlap with #1203
#1203 brings the full Get & Transform Data / Power Query surface, including ODBC (and SQL Server/Access through ODBC) in
crates/external, and wires the sameAPNDkeytip. This PR is much smaller and adds what #1203 doesn't have: native PostgreSQL, MySQL/MariaDB and SQLite drivers that need no ODBC driver installed. I'm happy to adapt to whichever lands first, for example dropping the ODBC driver here and keeping only the native ones as extra sources, or moving them into #1203's source model.Testing
cargo xtask ci: fmt, clippy, assets, layers, wasm, parity and keytips pass. Intesteverything passes exceptcommand_sequence_fuzz: adding a command reshuffles seed 0, which then hits the contested-spill bug Calc: a contested spill area changes hands on Calculate Now and on reopening #964 / fix(calc): Calculate Now swaps which overlapping spill wins (Excel keeps the first, GridCraft moves #SPILL! to it) #1190. The shrunk sequence uses no database command and fails onmaintoo. With Calc: a contested spill area stays with its array on full recalc and reopening (#964) #984 applied, all 8 steps pass.--features odbc, SQLite import throughgridcraft-cli run.🤖 Generated with Claude Code