mirror of
https://github.com/t8y2/dbx.git
synced 2026-10-28 08:08:02 +00:00
添加 Manticore Search 支持 (#1145)
* 添加 Manticore Search 支持 * 更新 Manticore Search 文档
This commit is contained in:
@@ -420,6 +420,14 @@ const driverProfiles: Record<
|
||||
icon: "starrocks",
|
||||
urlParams: "",
|
||||
},
|
||||
manticoresearch: {
|
||||
type: "manticoresearch",
|
||||
port: 9306,
|
||||
user: "root",
|
||||
label: "Manticore Search",
|
||||
icon: "manticoresearch",
|
||||
urlParams: "",
|
||||
},
|
||||
redshift: { type: "redshift", port: 5439, user: "awsuser", label: "Redshift", icon: "redshift" },
|
||||
cockroachdb: {
|
||||
type: "postgres",
|
||||
@@ -734,6 +742,7 @@ const iconTypeMap: Record<string, string> = {
|
||||
doris: "doris",
|
||||
selectdb: "selectdb",
|
||||
starrocks: "starrocks",
|
||||
manticoresearch: "manticoresearch",
|
||||
redshift: "redshift",
|
||||
cockroachdb: "cockroachdb",
|
||||
tdengine: "tdengine",
|
||||
@@ -819,6 +828,9 @@ const dbOptions: DbOption[] = [
|
||||
{ value: "influxdb", label: "InfluxDB" },
|
||||
{ value: "iris", label: "IRIS" },
|
||||
{ value: "jdbc", label: "JDBC" },
|
||||
{ value: "manticoresearch", label: "Manticore Search" },
|
||||
{ value: "custom_mysql", label: "Custom (MySQL)" },
|
||||
{ value: "custom_postgres", label: "Custom (PostgreSQL)" },
|
||||
];
|
||||
|
||||
const dbCategories = computed<DbCategory[]>(() => [{ key: "all", title: "", options: dbOptions }]);
|
||||
@@ -867,6 +879,7 @@ const sqliteExtensionPaths = computed({
|
||||
const tlsCapableDatabaseTypes = new Set<DatabaseType>(["mysql", "postgres", "redshift", "gaussdb", "kwdb", "opengauss", "redis", "etcd", "clickhouse", "elasticsearch", "influxdb"]);
|
||||
const supportsTlsToggle = computed(() => tlsCapableDatabaseTypes.has(form.value.db_type));
|
||||
const supportsCaCertificatePath = computed(() => form.value.db_type === "clickhouse");
|
||||
const supportsGenericUrlParams = computed(() => form.value.db_type !== "manticoresearch");
|
||||
const bareMysqlProfiles = new Set(["doris", "starrocks", "selectdb", "oceanbase"]);
|
||||
const supportsMysqlTlsOptions = computed(() => form.value.db_type === "mysql" && !bareMysqlProfiles.has(selectedType.value));
|
||||
const mysqlTlsMode = computed({
|
||||
@@ -1072,6 +1085,9 @@ function connectionConfigForSubmit(id: string): ConnectionConfig {
|
||||
config.query_timeout_secs = Number.isFinite(queryTimeout) && queryTimeout >= 0 ? queryTimeout : 30;
|
||||
const idleTimeout = Number(config.idle_timeout_secs);
|
||||
config.idle_timeout_secs = Number.isFinite(idleTimeout) && idleTimeout >= 0 ? idleTimeout : 60;
|
||||
if (config.db_type === "manticoresearch") {
|
||||
config.url_params = "";
|
||||
}
|
||||
if (!config.one_time) config.one_time = undefined;
|
||||
if (!config.read_only) config.read_only = undefined;
|
||||
if (config.db_type === "mongodb" && !mongoUseUrl.value) {
|
||||
@@ -2606,7 +2622,7 @@ function openExternalUrl(url: string) {
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="grid grid-cols-4 items-center gap-4">
|
||||
<div v-if="supportsGenericUrlParams" class="grid grid-cols-4 items-center gap-4">
|
||||
<Label class="text-right">{{ t("connection.urlParams") }}</Label>
|
||||
<Input
|
||||
v-model="form.url_params"
|
||||
|
||||
@@ -52,6 +52,7 @@ const assetIcons: Record<string, string> = {
|
||||
bigquery: "bigquery",
|
||||
cassandra: "cassandra",
|
||||
doris: "doris",
|
||||
manticoresearch: "manticoresearch.png",
|
||||
selectdb: "selectdb",
|
||||
tdengine: "tdengine",
|
||||
starrocks: "starrocks",
|
||||
|
||||
@@ -82,6 +82,7 @@ export function connectionUrlPlaceholder(dbType: DatabaseType): string {
|
||||
case "mysql":
|
||||
case "doris":
|
||||
case "starrocks":
|
||||
case "manticoresearch":
|
||||
return "mysql://user:password@host:port/database";
|
||||
|
||||
case "postgres":
|
||||
@@ -162,4 +163,4 @@ export function connectionOptionSubtitle(connection?: ConnectionPresentationConf
|
||||
|
||||
export function connectionRedactedOptionSubtitle(connection?: ConnectionPresentationConfig): string {
|
||||
return [connectionDriverLabel(connection), connectionRedactedEndpointLabel(connection)].filter(Boolean).join(" · ");
|
||||
}
|
||||
}
|
||||
@@ -82,9 +82,9 @@ export function supportsObjectBrowserTreeNode(dbType: DatabaseType | undefined,
|
||||
}
|
||||
|
||||
export function supportsTableTruncate(dbType?: DatabaseType): boolean {
|
||||
return !!dbType && dbType !== "sqlite" && dbType !== "rqlite" && dbType !== "turso" && dbType !== "duckdb" && dbType !== "influxdb";
|
||||
return !!dbType && dbType !== "sqlite" && dbType !== "rqlite" && dbType !== "turso" && dbType !== "duckdb" && dbType !== "influxdb" && dbType !== "manticoresearch";
|
||||
}
|
||||
|
||||
export function usesPostgresLikeStructureCopy(dbType?: DatabaseType): boolean {
|
||||
return !!dbType && PG_LIKE_STRUCTURE_TYPES.has(dbType);
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,7 @@ const SYSTEM_DATABASE_RULES: Partial<Record<DatabaseType, ReadonlySet<string>>>
|
||||
mysql: new Set(["information_schema", "mysql", "performance_schema", "sys"]),
|
||||
doris: new Set(["information_schema", "mysql", "performance_schema", "sys"]),
|
||||
starrocks: new Set(["information_schema", "mysql", "performance_schema", "sys"]),
|
||||
manticoresearch: new Set(["information_schema", "mysql", "performance_schema", "sys"]),
|
||||
goldendb: new Set(["information_schema", "mysql", "performance_schema", "sys"]),
|
||||
gbase: new Set(["information_schema", "mysql", "performance_schema", "sys"]),
|
||||
postgres: new Set(["template0", "template1"]),
|
||||
@@ -94,4 +95,4 @@ export function filterDatabaseNamesForConnection(databaseNames: string[], connec
|
||||
return databaseNames;
|
||||
}
|
||||
return databaseNames.filter((name) => !isSystemDatabaseName(connection?.db_type, name));
|
||||
}
|
||||
}
|
||||
@@ -241,6 +241,7 @@ export const useConnectionStore = defineStore("connection", () => {
|
||||
elasticsearch: "Elasticsearch",
|
||||
doris: "Doris",
|
||||
starrocks: "StarRocks",
|
||||
manticoresearch: "Manticore Search",
|
||||
redshift: "Redshift",
|
||||
dameng: "DM (Dameng)",
|
||||
gaussdb: "GaussDB",
|
||||
@@ -2768,4 +2769,4 @@ export const useConnectionStore = defineStore("connection", () => {
|
||||
if (changed) updateLayoutAndRebuild(layout);
|
||||
},
|
||||
};
|
||||
});
|
||||
});
|
||||
@@ -13,6 +13,7 @@ export type DatabaseType =
|
||||
| "elasticsearch"
|
||||
| "doris"
|
||||
| "starrocks"
|
||||
| "manticoresearch"
|
||||
| "databend"
|
||||
| "redshift"
|
||||
| "dameng"
|
||||
@@ -542,4 +543,4 @@ export interface SavedSqlFile {
|
||||
export interface SavedSqlLibrary {
|
||||
folders: SavedSqlFolder[];
|
||||
files: SavedSqlFile[];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user