feat(spanner): add Google Cloud Spanner support

This commit is contained in:
Frost authored and GitHub committed 2026-08-20 16:33:09 +08:00
1 parent 2cc8d78e64
commit f494f90c30
74 files changed
+2920 -53

No files matched your search

@@ -1487,6 +1487,7 @@ async function buildDropSqlForRow(row: ObjectBrowserRow, options?: { cascade?: b
objectType: row.type,
schema: row.schema || selectedSchema.value,
name: row.name,
identifierQuote: connectionStore.connectionIdentifierQuote?.(props.connection.id),
});
}
@@ -2072,6 +2073,7 @@ async function buildDuplicateStructurePlan(sourceName: string, targetName: strin
targetName,
tableComment,
sourceColumns,
identifierQuote: connectionStore.connectionIdentifierQuote?.(props.connection.id),
});
}
@@ -2260,6 +2262,7 @@ async function confirmPasteTable() {
sourceName: entry.sourceName,
targetName,
normalizeNewTargetName: mode === "structure-and-data",
identifierQuote: connectionStore.connectionIdentifierQuote?.(props.connection.id),
...dataCopyColumnOptions,
});
const executed = await executeObjectBrowserSqlWithProductionGuard(dataSql, () => api.executeQuery(props.connection.id, props.database, dataSql, schema));
@@ -2304,6 +2307,8 @@ function tableAdminSqlOptions(row: ObjectBrowserRow, options?: { cascade?: boole
databaseType: effectiveDatabaseType.value,
schema: row.schema || selectedSchema.value,
tableName: row.name,
// Cloud Spanner's dialect decides the quote; the static per-type mapping cannot.
identifierQuote: connectionStore.connectionIdentifierQuote?.(props.connection.id),
};
if (options?.cascade) result.cascade = true;
return result;