feat(mongodb): collection stats and create database on legacy agent

This commit is contained in:
Loc Nguyen authored and GitHub committed 2026-09-21 18:34:15 +08:00
1 parent 3687a9cbfb
commit c30f6821d3
5 files changed
+126 -29

No files matched your search

@@ -1,5 +1,4 @@
import type { ConnectionConfig, DatabaseType, TreeNodeType } from "@/types/database";
import { isMongoLegacyDriverProfile } from "@/lib/mongo/mongoCapabilities";
import { connectionIsEffectivelyReadOnly } from "@/lib/database/readOnlyWriteAccess";
export type DatabaseNamespaceCreationTarget = "database" | "schema" | "attach" | "special";
@@ -114,7 +113,6 @@ function namespaceCreationMatrixEntry(connection: NonNullable<CreationConnection
export function connectionNamespaceCreationTarget(connection: CreationConnection): ConnectionCreationTarget | null {
if (!connection || connectionIsEffectivelyReadOnly(connection)) return null;
if (connection.db_type === "mongodb" && isMongoLegacyDriverProfile(connection.driver_profile)) return null;
if (connection.db_type === "sqlite" && (connection.host?.trim().toLowerCase() === ":memory:" || Boolean(connection.password))) {
return null;
}