feat: add postgres support to switch between databases and schemas#173
Conversation
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
@json-nan Hi, please resolve conflict |
Signed-off-by: Jasson López <30847798+json-nan@users.noreply.github.com>
|
@datlechin check again please |
There was a problem hiding this comment.
Pull request overview
Adds PostgreSQL support for switching databases (via reconnect) and schemas (via search_path/driver schema switch) from the Cmd+K switcher, updating UI/state handling and documentation accordingly.
Changes:
- Add a Postgres “Databases / Schemas” mode toggle to the database switcher and wire schema-selection callback.
- Update Postgres switching behavior to reconnect the session when changing databases; add a dedicated
switchSchemapath. - Refresh docs, localization catalog entries, and changelog to reflect the new switching behavior.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/vi/databases/postgresql.mdx | Updates Vietnamese Postgres switching docs from schema-only to database switching. |
| docs/databases/postgresql.mdx | Updates English Postgres switching docs; now describes database switching. |
| TablePro/Views/Toolbar/ConnectionStatusView.swift | Simplifies help text to always show “Current database …” for Cmd+K switching. |
| TablePro/Views/MainContentView.swift | Passes active database + schema into switcher and adds schema-selection callback. |
| TablePro/Views/Main/Extensions/MainContentCoordinator+URLFilter.swift | Routes URL-driven “schema” selection to schema switch for Postgres, database switch otherwise. |
| TablePro/Views/Main/Extensions/MainContentCoordinator+Navigation.swift | Implements Postgres DB switching via session reconnect; adds switchSchema(to:). |
| TablePro/Views/DatabaseSwitcher/DatabaseSwitcherSheet.swift | Adds segmented toggle for Postgres and routes selection to DB vs schema callback. |
| TablePro/ViewModels/DatabaseSwitcherViewModel.swift | Introduces Mode (database/schema) and adjusts fetching/preselection logic. |
| TablePro/Resources/Localizable.xcstrings | Removes “Current schema …” strings and adds new switcher/alert strings. |
| TablePro/Models/ConnectionToolbarState.swift | For Postgres, prefers showing session.currentDatabase instead of schema. |
| CHANGELOG.md | Notes updated Postgres Cmd+K switcher behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Hi @json-nan check the Copilot's reviews :d |
Signed-off-by: Jasson López <30847798+json-nan@users.noreply.github.com>
|
@datlechin changes implemented, check again please |
Summary
Adds support to change between databases and schemas using postgres engine