mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 22:11:36 +08:00
Update mongodb
This commit is contained in:
parent
e47c66aa58
commit
e999988ec3
@ -7,7 +7,7 @@ namespace MongoDb.Ado.data
|
||||
{
|
||||
public class MongoDbMethodUtils
|
||||
{
|
||||
public void ValidateOperation(string operation)
|
||||
public static void ValidateOperation(string operation)
|
||||
{
|
||||
if (ExecuteHandlerFactory.Items.TryGetValue(operation, out var handler))
|
||||
{
|
||||
|
@ -19,6 +19,7 @@ namespace MongoDb.Ado.data
|
||||
};
|
||||
public DbDataReader Handle(string operation, IMongoCollection<BsonDocument> collection, string json)
|
||||
{
|
||||
MongoDbMethodUtils.ValidateOperation(operation);
|
||||
var doc = MongoDB.Bson.Serialization.BsonSerializer.Deserialize<BsonValue>(json);
|
||||
DbDataReaderFactory.Items.TryGetValue(operation, out var handler);
|
||||
if (handler==null)
|
||||
|
@ -20,6 +20,7 @@ namespace MongoDb.Ado.data
|
||||
};
|
||||
public async Task<DbDataReader> HandleAsync(string operation, IMongoCollection<BsonDocument> collection, string json)
|
||||
{
|
||||
MongoDbMethodUtils.ValidateOperation(operation);
|
||||
var doc = MongoDB.Bson.Serialization.BsonSerializer.Deserialize<BsonValue>(json);
|
||||
DbDataReaderFactoryAsync.Items.TryGetValue(operation, out var handler);
|
||||
if (handler == null)
|
@ -23,6 +23,7 @@ namespace MongoDb.Ado.data
|
||||
|
||||
public static int Handler(string operation, string json, IMongoCollection<BsonDocument> collection)
|
||||
{
|
||||
MongoDbMethodUtils.ValidateOperation(operation);
|
||||
var handlers = ExecuteHandlerFactory.Items;
|
||||
|
||||
if (!handlers.TryGetValue(operation, out var handler))
|
||||
|
@ -24,6 +24,7 @@ namespace MongoDb.Ado.data
|
||||
|
||||
public static Task<int> HandlerAsync(string operation, string json, IMongoCollection<BsonDocument> collection)
|
||||
{
|
||||
MongoDbMethodUtils.ValidateOperation(operation);
|
||||
var handlers = ExecuteHandlerFactoryAsync.Items;
|
||||
|
||||
if (!handlers.TryGetValue(operation, out var handler))
|
Loading…
Reference in New Issue
Block a user