feat: add InfluxDB support (#980)
This commit is contained in:
1 parent
c13efc65f8
commit
0bd07ccf46
23 files changed
+470
-7
No files matched your search
@@ -1,6 +1,6 @@
|
||||
import type { DatabaseType } from "@/types/database";
|
||||
|
||||
export type TableStructureDialect = "mysql" | "postgres" | "sqlite" | "duckdb" | "sqlserver" | "oracle" | "h2" | "clickhouse" | "unsupported";
|
||||
export type TableStructureDialect = "mysql" | "postgres" | "sqlite" | "duckdb" | "sqlserver" | "oracle" | "h2" | "clickhouse" | "influxdb" | "unsupported";
|
||||
|
||||
export interface TableStructureCapabilities {
|
||||
dialect: TableStructureDialect;
|
||||
@@ -199,6 +199,20 @@ const accessCapabilities = capabilities({
|
||||
createIndex: true,
|
||||
});
|
||||
|
||||
const influxdbCapabilities = capabilities({
|
||||
dialect: "influxdb",
|
||||
createTable: false,
|
||||
addColumn: false,
|
||||
dropColumn: false,
|
||||
renameColumn: false,
|
||||
alterExistingColumn: false,
|
||||
alterType: false,
|
||||
alterNullability: false,
|
||||
alterDefault: false,
|
||||
reorderColumn: false,
|
||||
comment: false,
|
||||
});
|
||||
|
||||
const capabilityByType: Partial<Record<DatabaseType, TableStructureCapabilities>> = {
|
||||
mysql: mysqlCapabilities,
|
||||
doris: mysqlCapabilities,
|
||||
@@ -225,6 +239,7 @@ const capabilityByType: Partial<Record<DatabaseType, TableStructureCapabilities>
|
||||
h2: h2Capabilities,
|
||||
access: accessCapabilities,
|
||||
clickhouse: clickhouseCapabilities,
|
||||
influxdb: influxdbCapabilities,
|
||||
};
|
||||
|
||||
export function getTableStructureCapabilities(dbType?: DatabaseType): TableStructureCapabilities {
|
||||
|
||||
Reference in new issue
Block a user