mirror of
https://github.com/t8y2/dbx.git
synced 2026-10-30 08:20:33 +00:00
fix(informix): 支持表格直接编辑
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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"]);
|
||||
|
||||
@@ -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",
|
||||
},
|
||||
|
||||
@@ -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, '""')}"`;
|
||||
|
||||
Reference in New Issue
Block a user