Join tables from two saved connections in one query

Đang mở
#3,623 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
24/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
mariadb, mysql, postgresql, sqlite, swift
Lĩnh vực
database, databases

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
Swift
Star
6.2k
Fork
412
Merge trung bình
3 giờ 56 phút
Pull request đã merge (30 ngày)
669

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của TableProApp/TablePro

Tất cả issue của TableProApp/TablePro

Issue tương tự

Thêm issue về Swift

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.