feat(mongodb): collection stats and create database on legacy agent
This commit is contained in:
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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user