Skip to content

feat: dynamic container entity name + BigQuery dataset switching UX#509

Open
datlechin wants to merge 4 commits intomainfrom
feat/container-entity-name
Open

feat: dynamic container entity name + BigQuery dataset switching UX#509
datlechin wants to merge 4 commits intomainfrom
feat/container-entity-name

Conversation

@datlechin
Copy link
Copy Markdown
Collaborator

Summary

  • Add containerEntityName to DriverPlugin protocol — each database declares its container name (BigQuery → "Dataset", Cassandra → "Keyspace", others → "Database")
  • Enable ⌘K (Open Database) menu for schema-switching databases like BigQuery
  • Hide Databases/Schemas segmented picker when only schema switching is supported
  • Replace 7 hardcoded "Database" labels with dynamic containerEntityName lookup

Changes

  • DriverPlugin.swift: new containerEntityName property with "Database" default
  • PluginMetadataRegistry.swift: add to SchemaInfo, defaults, snapshot builder
  • PluginManager.swift: add containerEntityName(for:) accessor
  • BigQueryPlugin.swift: containerEntityName = "Dataset"
  • ContentView.swift: enable ⌘K for supportsSchemaSwitching databases
  • TableProApp.swift: dynamic menu label
  • TableProToolbarView.swift: dynamic toolbar label + tooltip
  • MainEditorContentView.swift: dynamic empty state
  • DatabaseSwitcherSheet.swift: dynamic header, hide picker for schema-only DBs
  • MainContentCoordinator+Navigation.swift: dynamic error title
  • SidebarView.swift: dynamic empty state

Test plan

  • BigQuery: menu shows "Open Dataset...", toolbar "Dataset", empty state "Switch Dataset"
  • MySQL/PostgreSQL: all show "Database" (unchanged)
  • Cassandra: shows "Keyspace"
  • ⌘K works for BigQuery (schema-switching only)
  • No crash with existing plugins (default "Database")

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