Update Mongodb

This commit is contained in:
sunkaixuan
2025-05-02 15:42:18 +08:00
parent bad7a86c23
commit 54264afde5
2 changed files with 16 additions and 8 deletions

View File

@@ -57,14 +57,8 @@ namespace MongoDb.Ado.data
public override int ExecuteNonQuery()
{
var (operation, collectionName, json) = ParseCommand(_commandText);
var collection = GetCollection(collectionName);
var handlers = ExecuteHandlerFactory.Items;
if (!handlers.TryGetValue(operation, out var handler))
throw new NotSupportedException($"不支持的操作类型: {operation}");
return handler.Handle(collection, json);
var collection = GetCollection(collectionName);
return ExecuteHandlerFactory.Handler(operation, json, collection);
}
public override object ExecuteScalar()