2025-05-02 07:54:16 +08:00
|
|
|
|
using MongoDB.Bson;
|
|
|
|
|
using MongoDB.Driver;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
|
|
|
|
namespace MongoDb.Ado.data
|
|
|
|
|
{
|
2025-05-02 11:39:41 +08:00
|
|
|
|
public class NonFindHandler : IMongoOperationHandler
|
2025-05-02 07:54:16 +08:00
|
|
|
|
{
|
2025-05-02 16:55:48 +08:00
|
|
|
|
public string operation { get; set; }
|
2025-05-02 07:54:16 +08:00
|
|
|
|
public int Handle(IMongoCollection<BsonDocument> collection, string json)
|
|
|
|
|
{
|
2025-05-02 16:55:48 +08:00
|
|
|
|
using (var dr = new DbDataReaderFactory().Handle(operation, collection, json))
|
|
|
|
|
{
|
|
|
|
|
if (dr.Read())
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-05-02 07:54:16 +08:00
|
|
|
|
return 0; // 查询不改变数据库
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|