feat: add Turso/libSQL database support

Turso is a distributed SQLite database built on libSQL, offering HTTP-based
connectivity with auth token authentication. This change adds full support:

- New DatabaseType::Turso and PoolKind::Turso variants
- TursoClient driver using libSQL HTTP pipeline API (/v2/pipeline)
- Bearer token auth via password or url_params (auth_token=)
- Multi-statement batch pipeline for transactional integrity
- Standalone BEGIN/COMMIT/ROLLBACK treated as no-ops (pipeline is auto-commit)
- Full metadata support: tables, columns, indexes, foreign keys, triggers, DDL
- Frontend: connection form, SQL completion (SQLite syntax), capability sets
- Built-in databases (SQLite/Turso/DuckDB/RQLite/Access) placed first in selector
- Unit tests (15) + integration tests against live libsql-server (12)
- Single connection pool, skips TCP probe

Closes #948
This commit is contained in:
t8y2 committed 2026-06-10 04:18:05 +08:00
1 parent d5bc3d065a
commit d08385e75f
24 files changed
+1109 -17

No files matched your search

@@ -359,6 +359,7 @@ const driverProfiles: Record<
redis: { type: "redis", port: 6379, user: "", label: "Redis", icon: "redis" },
sqlite: { type: "sqlite", port: 0, user: "", label: "SQLite", icon: "sqlite" },
rqlite: { type: "rqlite", port: 4001, user: "", label: "RQLite", icon: "rqlite" },
turso: { type: "turso", port: 443, user: "", label: "Turso", icon: "turso" },
duckdb: { type: "duckdb", port: 0, user: "", label: "DuckDB", icon: "duckdb" },
access: { type: "access", port: 0, user: "", label: "Microsoft Access", icon: "access" },
mongodb: { type: "mongodb", port: 27017, user: "", label: "MongoDB", icon: "mongodb" },
@@ -718,6 +719,7 @@ const iconTypeMap: Record<string, string> = {
postgres: "postgres",
sqlite: "sqlite",
rqlite: "rqlite",
turso: "turso",
access: "access",
redis: "redis",
mongodb: "mongodb",
@@ -779,20 +781,22 @@ const iconTypeMap: Record<string, string> = {
};
const dbOptions = [
{ value: "mysql", label: "MySQL" },
{ value: "postgres", label: "PostgreSQL" },
{ value: "mysql", label: "MySQL" },
{ value: "mongodb", label: "MongoDB" },
{ value: "redis", label: "Redis" },
{ value: "oracle", label: "Oracle" },
{ value: "sqlite", label: "SQLite" },
{ value: "sqlserver", label: "SQL Server" },
{ value: "elasticsearch", label: "Elasticsearch" },
{ value: "dm", label: "DM (Dameng)" },
{ value: "opengauss", label: "openGauss" },
{ value: "turso", label: "Turso" },
{ value: "duckdb", label: "DuckDB" },
{ value: "rqlite", label: "RQLite" },
{ value: "access", label: "Microsoft Access" },
{ value: "redis", label: "Redis" },
{ value: "mongodb", label: "MongoDB" },
{ value: "duckdb", label: "DuckDB" },
{ value: "clickhouse", label: "ClickHouse" },
{ value: "sqlserver", label: "SQL Server" },
{ value: "oracle", label: "Oracle" },
{ value: "elasticsearch", label: "Elasticsearch" },
{ value: "mariadb", label: "MariaDB" },
{ value: "dm", label: "DM (Dameng)" },
{ value: "clickhouse", label: "ClickHouse" },
{ value: "gaussdb", label: "GaussDB" },
{ value: "kwdb", label: "KWDB" },
{ value: "tidb", label: "TiDB" },
@@ -813,7 +817,6 @@ const dbOptions = [
{ value: "firebird", label: "Firebird" },
{ value: "exasol", label: "Exasol" },
{ value: "gbase", label: "GBase" },
{ value: "opengauss", label: "openGauss" },
{ value: "kingbase", label: "KingBase" },
{ value: "highgo", label: "瀚高 HighGo" },
{ value: "yashandb", label: "崖山 YashanDB" },
@@ -12,6 +12,7 @@ const assetIcons: Record<string, string> = {
postgresql: "postgres",
sqlite: "sqlite",
rqlite: "rqlite.png",
turso: "turso.png",
redis: "redis",
mongodb: "mongodb",
clickhouse: "clickhouse",
@@ -172,6 +172,7 @@ const activeSqlFormatDialect = computed<SqlFormatDialect>(() => {
return "postgres";
case "sqlite":
case "rqlite":
case "turso":
return "sqlite";
case "sqlserver":
return "sqlserver";
@@ -198,6 +198,7 @@ const sourceFormatDialect = computed<SqlFormatDialect>(() => {
case "sqlserver":
return effectiveDatabaseType.value;
case "rqlite":
case "turso":
return "sqlite";
case "gaussdb":
case "kwdb":