Join tables from two saved connections in one query

Ouverte
#3,623 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
5/5
Temps estimé
Plus d'une semaine
Accessibilité débutants
24/100
Type d'issue
Fonctionnalité
Clarté
Clairement spécifiée
Activité
Active
Stack technique
mariadb, mysql, postgresql, sqlite, swift
Domaine
database, databases

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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

Langage dominant
Swift
Étoiles
6.2k
Forks
412
Merge moyen
3 h 56 min
PR mergées (30 j)
669

Préparer son environnement

Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de TableProApp/TablePro

Toutes les issues de TableProApp/TablePro

Issues similaires

Plus d'issues Swift

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.