Join tables from two saved connections in one query

オープン
#3,623 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
24/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
mariadb, mysql, postgresql, sqlite, swift

調査の方向性

Start with the DuckDB plugin at apple/Plugins/DuckDBDriverPlugin/DuckDBPlugin.swift:462, the extension build settings in apple/scripts/duckdb-macos-extensions.cmake, and the database attachment behavior in databases/duckdb.mdx. Trace how saved connections provide credentials, SSH tunnels, TLS, and Safe Mode settings before estimating a design. Done means a single SELECT joins saved PostgreSQL and MySQL connections over their SSH tunnels without credentials in SQL text.

索引モデルが issue の本文から書いたものです。

説明

enhancement platform-macos
Problem

A query runs on one connection. Joining orders on a PostgreSQL server with customers on a MySQL server means exporting one side, importing it into the other, and joining there. Transfer To… (features/import-export.mdx, Transfer to another connection) copies rows from one connection into another; it does not query across them.

DuckDB can already do the join: its postgres, mysql and sqlite extensions attach those databases into one session. The DuckDB plugin keeps runtime extension autoloading on (apple/Plugins/DuckDBDriverPlugin/DuckDBPlugin.swift:462, and the reason in apple/scripts/duckdb-macos-extensions.cmake), so a user can type ATTACH 'host=… password=…' AS pg (TYPE postgres) into a DuckDB tab today. That puts the password in the query text and in query history, ignores the SSH tunnel and TLS settings the saved connection already has, and has to be retyped after every reconnect, since DuckDB does not persist attachments (databases/duckdb.mdx).

Proposed solution
  • A combined query workspace: pick two or more saved connections (PostgreSQL, MySQL and MariaDB, SQLite, DuckDB files), and TablePro attaches each into an in-memory DuckDB under a name the user can change, defaulting to the connection's name.
  • Credentials come from where the connection already keeps them and reach DuckDB as temporary secrets, never as SQL text, so nothing secret lands in the editor, history or logs.
  • Each attachment goes through the connection's own SSH tunnel and TLS settings, and is attached READ_ONLY unless the user turns writes on for it. A connection whose Safe Mode asks for confirmation stays read-only.
  • The sidebar lists each attached database with its tables, and completion knows pg.public.orders.
  • The set of connections is saved, so reopening the workspace attaches them again.
  • Ships as a module, off by default (apple/AGENTS.md, Scope), since it needs the DuckDB plugin and downloads DuckDB extensions on first use.

Done means one SELECT joins a table from a saved PostgreSQL connection with a table from a saved MySQL connection, over their SSH tunnels, without a password typed anywhere.

Alternatives considered

Export one side and import it into the other, or a DuckDB tab with ATTACH statements that carry the password in plain text.

Platform

macOS

Related database type

N/A / General

主要言語
Swift
スター
6.2k
フォーク
412
平均マージ
3時間 56分
マージ済み PR(30日)
669

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

TableProApp/TablePro のほかの issue

TableProApp/TablePro の issue をすべて見る

似ている issue

Swift の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。