feat(database): add Snowflake data sources (#2972)

Snowflake is a built-in data source kind: connection dialog, key-pair, browser single sign-on, password or token sign-in, the database tree, SQL consoles, and Snowflake-aware SQL assistance and syntax colours. The driver speaks Snowflake's session protocol over the existing reqwest + rustls stack, with no JDBC/ODBC or native library and no new package. Metadata is read with SHOW / DESCRIBE, which need no running warehouse; introspected names are kept on disk for completion.

Co-authored-by: vvnadolskyy <12991410+vvnadolskyy@users.noreply.github.com>
This commit is contained in:
pH
2026-11-12 23:06:10 +08:00
committed by GitHub
co-authored by vvnadolskyy
parent 51c14d3b03
commit 59eb6446d4
89 changed files with 12461 additions and 139 deletions
+2
View File
@@ -36,6 +36,8 @@ export function findParams(text: string, driver: DbDriver, numbered = 0): SqlPar
if (t.kind === "param") {
// MySQL `@var` / `@@var` are session variables.
if (driver === "mysql" && t.text.startsWith("@")) return;
// Snowflake `@stage` references, `$1` columns, `$name` session variables and `file://` locations.
if (driver === "snowflake" && /^[@$]|^\w+:\/\//.test(t.text)) return;
if (toks[i - 1]?.text === "@") return;
out.push({ name: t.text, from: t.from, to: t.to });
} else if (t.kind === "punct" && t.text === "?" && driver !== "postgres") {