fix(informix): 支持表格直接编辑

This commit is contained in:
t8y2
2026-05-14 01:05:01 +08:00
parent ce69af1de0
commit 05effc8edf
9 changed files with 89 additions and 26 deletions
@@ -1166,6 +1166,7 @@ function openExternalUrl(url: string) {
form.db_type === 'mysql' ||
form.db_type === 'postgres' ||
form.db_type === 'redshift' ||
form.db_type === 'informix' ||
form.db_type === 'kingbase' ||
form.db_type === 'vastbase' ||
form.db_type === 'goldendb'
@@ -1176,7 +1177,13 @@ function openExternalUrl(url: string) {
<Input
v-model="form.url_params"
class="col-span-3"
:placeholder="form.db_type === 'mysql' ? 'charset=utf8mb4' : 'sslmode=disable'"
:placeholder="
form.db_type === 'mysql'
? 'charset=utf8mb4'
: form.db_type === 'informix'
? 'INFORMIXSERVER=informix;CLIENT_LOCALE=en_US.utf8;DB_LOCALE=en_US.utf8'
: 'sslmode=disable'
"
/>
</div>
</template>
-1
View File
@@ -14,7 +14,6 @@ export const SCHEMA_AWARE_TYPES = new Set<DatabaseType>([
"snowflake",
"trino",
"db2",
"informix",
]);
export const SQL_FILE_UNSUPPORTED_TYPES = new Set<DatabaseType>(["redis", "mongodb", "elasticsearch"]);
+9
View File
@@ -42,6 +42,15 @@ const DATABASE_CAPABILITY_OVERRIDES: Partial<Record<DatabaseType, Partial<Databa
transaction: false,
},
},
informix: {
tableData: {
insert: true,
updateRequiresPrimaryKey: true,
deleteRequiresPrimaryKey: true,
requiresTransactionalTableForExistingRows: false,
transaction: true,
},
},
neo4j: {
syntheticKey: "neo4j-element-id",
},
+1
View File
@@ -18,6 +18,7 @@ export interface BuildTableSelectSqlOptions {
export function quoteTableIdentifier(databaseType: DatabaseType | undefined, name: string): string {
if (databaseType === "mysql" || databaseType === "hive") return `\`${name.replace(/`/g, "``")}\``;
if (databaseType === "informix" && /^[A-Za-z_][A-Za-z0-9_$]*$/.test(name)) return name;
if (databaseType === "neo4j") return quoteCypherIdentifier(name);
if (databaseType === "sqlserver") return `[${name.replace(/\]/g, "]]")}]`;
return `"${name.replace(/"/g, '""')}"`;