mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-05-15 20:49:31 +08:00
Update Mongodb
This commit is contained in:
parent
f45f9975d8
commit
08116a9254
@ -6,6 +6,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="MongoDB.Driver" Version="3.3.0" />
|
||||
<PackageReference Include="System.Data.Common" Version="4.3.0" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
@ -8,6 +8,7 @@ using MongoDB.Bson.Serialization;
|
||||
using System.Collections.Generic;
|
||||
using System.Xml.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading;
|
||||
|
||||
namespace MongoDb.Ado.data
|
||||
{
|
||||
@ -78,25 +79,25 @@ namespace MongoDb.Ado.data
|
||||
return new DbDataReaderFactory().Handle(operation, collection, json);
|
||||
}
|
||||
|
||||
public new Task<int> ExecuteNonQueryAsync()
|
||||
public override Task<int> ExecuteNonQueryAsync(CancellationToken cancellationToken)
|
||||
{
|
||||
var (operation, collectionName, json) = ParseCommand(_commandText);
|
||||
var collection = GetCollection(collectionName);
|
||||
return ExecuteHandlerFactoryAsync.HandlerAsync(operation, json, collection);
|
||||
}
|
||||
public new Task<object> ExecuteScalarAsync()
|
||||
public override Task<object> ExecuteScalarAsync(CancellationToken cancellationToken)
|
||||
{
|
||||
var (operation, collectionName, json) = ParseCommand(_commandText);
|
||||
var collection = GetCollection(collectionName);
|
||||
return new ExecuteScalarHandlerAsync().HandleAsync(operation, collection, json);
|
||||
}
|
||||
public new Task<DbDataReader> ExecuteReaderAsync()
|
||||
public override Task<DbDataReader> ExecuteReaderAsync(CancellationToken cancellationToken)
|
||||
{
|
||||
var (operation, collectionName, json) = ParseCommand(_commandText);
|
||||
var collection = GetCollection(collectionName);
|
||||
return new DbDataReaderFactoryAsync().HandleAsync(operation, collection, json);
|
||||
}
|
||||
protected Task<DbDataReader> ExecuteDbDataReaderAsync(CommandBehavior behavior)
|
||||
protected override Task<DbDataReader> ExecuteDbDataReaderAsync(CommandBehavior behavior,CancellationToken cancellationToken)
|
||||
{
|
||||
return ExecuteReaderAsync();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user