feat(sidebar): show BigQuery datasets as an expandable tree#1430
Merged
Conversation
8478774 to
37e6b66
Compare
37e6b66 to
a1de0b3
Compare
…witching loads data
…uery dataset tree
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.
Problem
A BigQuery project with 7 datasets and 242 tables showed only a fraction of its tables in the sidebar. It is not a count bug: dataset and table listing both paginate correctly. TablePro rendered one dataset's tables at a time behind the
.bySchemaschema picker (the same model it uses for Postgres and MSSQL), so you only ever saw one dataset's slice. BigQuery has no "current schema" concept, and every BigQuery client (the web console, DataGrip, DBeaver, Postico) uses an expandable tree instead.Change
Adds a hierarchical sidebar tree and enables it for BigQuery. Postgres, MSSQL, and Oracle keep the picker.
GroupingStrategy.hierarchicalSchema. BigQuery's plugin and the cloud defaults declare it.SchemaServicestores tables per (connection, dataset) and loads a dataset's tables the first time you expand its node.tables.listis a free metadata API, so this avoids listing all datasets up front.SidebarTreeViewrenders datasets as expandable nodes, reusing the existing table row, context menu, double-click, and multi-select. The schema picker footer is hidden in tree mode.buildBrowseQuery,buildFilteredQuery, anddefaultExportQuerygained aschemaparameter, with a default that delegates to the existing signature so only BigQuery is affected. This fixes browsing tables across several datasets at once, which the single shared_currentDatasetcould not express.ABI
The query-builder signature change is a
PluginDatabaseDriverprotocol change, socurrentPluginKitVersiongoes 15 to 16 and every pluginInfo.plistis bumped to match. After merge, runscripts/release-all-plugins.sh 16to rebuild every registry plugin against kit-16.Tests
SchemaServiceHierarchicalTests: per-dataset lazy storage, idempotent load, reload, and that a hierarchical connection populates the dataset list with an empty flat table list.TableInfoTests: a table name reused across datasets stays distinct by id, equality, and hash.GroupingStrategyraw value and Codable round-trip cover the new case.Notes