Update mongodb

This commit is contained in:
sunkaixuan 2025-05-02 15:50:20 +08:00
parent 13d2c81fa5
commit dc0e1af9f8
4 changed files with 4 additions and 4 deletions

View File

@ -29,7 +29,7 @@ namespace MongoDb.Ado.data
ExecuteHandlerFactory.Handler(operation,json, collection); ExecuteHandlerFactory.Handler(operation,json, collection);
return new DataTable().CreateDataReader(); return new DataTable().CreateDataReader();
} }
return queryHandler.Find(collection, doc); return queryHandler.Handler(collection, doc);
} }
} }

View File

@ -6,6 +6,6 @@ namespace MongoDb.Ado.data
{ {
public interface IQueryHandler public interface IQueryHandler
{ {
DbDataReader Find(IMongoCollection<BsonDocument> collection, BsonValue doc); DbDataReader Handler(IMongoCollection<BsonDocument> collection, BsonValue doc);
} }
} }

View File

@ -11,7 +11,7 @@ namespace MongoDb.Ado.data
{ {
public class QueryAggregateHandler : IQueryHandler public class QueryAggregateHandler : IQueryHandler
{ {
public DbDataReader Find(IMongoCollection<BsonDocument> collection, BsonValue doc) public DbDataReader Handler(IMongoCollection<BsonDocument> collection, BsonValue doc)
{ {
// 解析 JSON 字符串为 BsonArray // 解析 JSON 字符串为 BsonArray
var pipeline = doc.AsBsonArray; ; var pipeline = doc.AsBsonArray; ;

View File

@ -10,7 +10,7 @@ namespace MongoDb.Ado.data
{ {
public class QueryFindHandler : IQueryHandler public class QueryFindHandler : IQueryHandler
{ {
public DbDataReader Find(IMongoCollection<BsonDocument> collection, BsonValue doc) public DbDataReader Handler(IMongoCollection<BsonDocument> collection, BsonValue doc)
{ {
BsonDocument filter; BsonDocument filter;
BsonDocument projection = null; BsonDocument projection = null;