feat(nebula): add NebulaGraph 3.x browser support

This commit is contained in:
Hand Sonic authored and GitHub committed 2026-09-29 21:03:12 +08:00
1 parent e59a8c1bd4
commit ef05a6a19b
69 files changed
+1737 -41

No files matched your search

@@ -12,6 +12,7 @@ describe("supportsDataDictionary", () => {
it("is hidden for engines that cannot list table metadata", () => {
expect(supportsDataDictionary("redis")).toBe(false);
expect(supportsDataDictionary("nebula")).toBe(false);
expect(supportsDataDictionary("plugin")).toBe(false);
});
});
@@ -147,7 +147,7 @@ export function supportsQueryExecution(dbType?: DatabaseType): boolean {
* that hierarchy, so they must not be offered by sidebar "Add to AI" actions.
*/
export function supportsAiAssistantContext(dbType?: DatabaseType): boolean {
return supportsQueryExecution(dbType) && !usesConnectionOnlyQueryTarget(dbType);
return supportsQueryExecution(dbType) && !usesConnectionOnlyQueryTarget(dbType) && dbType !== "nebula";
}
export function supportsConnectionScopedQueryExecution(dbType?: DatabaseType): boolean {
@@ -182,7 +182,7 @@ export function supportsSqlFileExecution(dbType?: DatabaseType): boolean {
return supportsDatabaseFeature(dbType, "sqlFileExecution");
}
const NON_SQL_IN_LIST_PASTE_TYPES = new Set<DatabaseType>(["neo4j"]);
const NON_SQL_IN_LIST_PASTE_TYPES = new Set<DatabaseType>(["neo4j", "nebula"]);
export function supportsSqlInListPaste(dbType?: DatabaseType): boolean {
if (!dbType) return true;
@@ -200,7 +200,7 @@ export function supportsSchemaDiagram(dbType?: DatabaseType): boolean {
/** Relational engines that can list tables and columns. Independent of diagram support. */
export function supportsDataDictionary(dbType?: DatabaseType): boolean {
return supportsDatabaseFeature(dbType, "metadataBrowse");
return dbType !== "nebula" && supportsDatabaseFeature(dbType, "metadataBrowse");
}
export function supportsDatabaseSearch(dbType?: DatabaseType): boolean {
@@ -256,7 +256,19 @@ export function supportsObjectBrowserTreeNode(dbType: DatabaseType | undefined,
export function supportsTableTruncate(dbType?: DatabaseType): boolean {
return (
!!dbType && dbType !== "impala" && dbType !== "sqlite" && dbType !== "rqlite" && dbType !== "turso" && dbType !== "cloudflare-d1" && dbType !== "duckdb" && dbType !== "influxdb" && dbType !== "influxdb3" && dbType !== "victoriametrics" && dbType !== "manticoresearch" && dbType !== "salesforce"
!!dbType &&
dbType !== "impala" &&
dbType !== "sqlite" &&
dbType !== "rqlite" &&
dbType !== "turso" &&
dbType !== "cloudflare-d1" &&
dbType !== "duckdb" &&
dbType !== "influxdb" &&
dbType !== "influxdb3" &&
dbType !== "victoriametrics" &&
dbType !== "manticoresearch" &&
dbType !== "salesforce" &&
dbType !== "nebula"
);
}
@@ -77,6 +77,7 @@ export const DATABASE_NAMESPACE_CREATION_MATRIX = {
db2: { database: "schema" },
informix: { connection: "database" },
neo4j: { deferred: "database creation depends on edition/admin privileges" },
nebula: { deferred: "space creation requires partition, replica and VID type options" },
cassandra: { deferred: "keyspace creation requires replication options" },
bigquery: { deferred: "dataset creation needs project/location options" },
spanner: { deferred: "database creation requires the Cloud Spanner Admin API" },
@@ -97,6 +97,7 @@ const DATABASE_TYPE_OBJECTS = new Map<DatabaseType, SidebarObjectKind[]>([
["tdengine", TABLE_VIEW_OBJECTS],
["iotdb", TABLE_VIEW_OBJECTS],
["neo4j", TABLE_VIEW_OBJECTS],
["nebula", TABLE_VIEW_OBJECTS],
// others
["influxdb", ["TABLE"]],
["influxdb3", ["TABLE"]],
@@ -78,6 +78,7 @@ export const DATABASE_PROPERTY_EDITING_MATRIX = {
db2: { deferred: "schema properties need product-specific handling" },
informix: { deferred: "schema properties need product-specific handling" },
neo4j: { deferred: "database properties depend on edition/admin privileges" },
nebula: { deferred: "space properties require NebulaGraph-specific administration" },
cassandra: { deferred: "keyspace properties require replication option handling" },
bigquery: { deferred: "dataset properties need project/location-specific handling" },
spanner: { deferred: "database/schema properties are Cloud Spanner Admin API operations" },