Skip to content

feat(sidebar): show BigQuery datasets as an expandable tree#1430

Merged
datlechin merged 3 commits into
mainfrom
feat/bigquery-dataset-tree
May 27, 2026
Merged

feat(sidebar): show BigQuery datasets as an expandable tree#1430
datlechin merged 3 commits into
mainfrom
feat/bigquery-dataset-tree

Conversation

@datlechin
Copy link
Copy Markdown
Member

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 .bySchema schema 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.

  • New GroupingStrategy.hierarchicalSchema. BigQuery's plugin and the cloud defaults declare it.
  • SchemaService stores tables per (connection, dataset) and loads a dataset's tables the first time you expand its node. tables.list is a free metadata API, so this avoids listing all datasets up front.
  • SidebarTreeView renders 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.
  • Browsing a table from any dataset now threads that dataset through the query builders. buildBrowseQuery, buildFilteredQuery, and defaultExportQuery gained a schema parameter, 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 _currentDataset could not express.

ABI

The query-builder signature change is a PluginDatabaseDriver protocol change, so currentPluginKitVersion goes 15 to 16 and every plugin Info.plist is bumped to match. After merge, run scripts/release-all-plugins.sh 16 to 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.
  • GroupingStrategy raw value and Codable round-trip cover the new case.

Notes

  • BigQueryDriverPlugin is registry-only, so it is validated by plugin CI, not the app scheme.

@datlechin datlechin force-pushed the feat/bigquery-dataset-tree branch from 8478774 to 37e6b66 Compare May 27, 2026 07:00
@datlechin datlechin force-pushed the feat/bigquery-dataset-tree branch from 37e6b66 to a1de0b3 Compare May 27, 2026 07:12
@datlechin datlechin merged commit cf0c254 into main May 27, 2026
2 of 3 checks passed
@datlechin datlechin deleted the feat/bigquery-dataset-tree branch May 27, 2026 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant