feat(mongodb): support db.getSiblingDB()

This commit is contained in:
Loc Nguyen authored and GitHub committed 2026-09-18 15:38:53 +08:00
1 parent b44e1080a8
commit f1e0f54a2b
9 files changed
+262 -8

No files matched your search

+3
View File
@@ -1049,6 +1049,9 @@ pub async fn execute_mongo_command_core(
.await
.map(|version| scalar_query_result("version", Value::String(version))),
MongoCommand::Use { database } => Ok(scalar_query_result("database", Value::String(database.clone()))),
MongoCommand::InDatabase { database, command } => {
Box::pin(execute_mongo_command_core(state, connection_id, database, command, max_rows)).await
}
MongoCommand::ShowDatabases => {
let result = mongo_show_databases_core(state, connection_id).await?;
mongo_show_databases_query_result(result.documents, max_rows)