Skip to content

Commit 85fc923

Browse files
committed
加入终止查询的方法
1 parent da5dba5 commit 85fc923

File tree

5 files changed

+13
-9
lines changed

5 files changed

+13
-9
lines changed

src/EFCore.Taos.Core/Maikebing.EntityFrameworkCore.Taos.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@
2525
<Compile Include="..\Shared\*.cs" />
2626
</ItemGroup>
2727
<ItemGroup>
28-
<PackageReference Include="Microsoft.EntityFrameworkCore.Abstractions" Version="5.0.6" />
29-
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.6" />
30-
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="5.0.6">
28+
<PackageReference Include="Microsoft.EntityFrameworkCore.Abstractions" Version="5.0.7" />
29+
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.7" />
30+
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="5.0.7">
3131
<PrivateAssets>all</PrivateAssets>
3232
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
3333
</PackageReference>
34-
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="5.0.6" />
34+
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="5.0.7" />
3535
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="5.0.0" />
3636
</ItemGroup>
3737
<ItemGroup>

src/Example/Example.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
<ItemGroup>
3434
<PackageReference Include="ConsoleTableExt" Version="3.1.7" />
35-
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.6" />
35+
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.7" />
3636
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.10.8" />
3737
<PackageReference Include="System.Text.Encoding.CodePages" Version="5.0.0" />
3838
</ItemGroup>

src/Maikebing.Data.Taos/Driver/TDengineDriver.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -485,6 +485,9 @@ public static string Error(IntPtr conn)
485485
[DllImport("taos", EntryPoint = "taos_query", CallingConvention = CallingConvention.Cdecl)]
486486
public static extern IntPtr Query(IntPtr taos, string sqlstr);
487487

488+
[DllImport("taos", EntryPoint = "taos_stop_query", CallingConvention = CallingConvention.Cdecl)]
489+
public static extern void StopQuery(IntPtr taos);
490+
488491
[DllImport("taos", EntryPoint = "taos_affected_rows", CallingConvention = CallingConvention.Cdecl)]
489492
public static extern int AffectRows(IntPtr res);
490493

src/Maikebing.Data.Taos/TaosCommand.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -357,8 +357,9 @@ public override void Prepare()
357357
_endcommandtext = _commandText;
358358
}
359359
var code = Task.Run(() => TDengine.Query(_taos, _endcommandtext));
360-
bool isok= code.Wait(TimeSpan.FromSeconds(CommandTimeout));
361-
if (isok && TDengine.ErrorNo(code.Result)==0)
360+
bool isok = code.Wait(TimeSpan.FromSeconds(CommandTimeout));
361+
TDengine.StopQuery(_taos);
362+
if (isok && TDengine.ErrorNo(code.Result) == 0)
362363
{
363364
List<TDengineMeta> metas = TDengine.FetchFields(code.Result);
364365
for (int j = 0; j < metas.Count; j++)

src/Maikebing.HealthChecks.Taos/Maikebing.HealthChecks.Taos.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
</PropertyGroup>
1818

1919
<ItemGroup>
20-
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="5.0.6" />
21-
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions" Version="5.0.6" />
20+
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="5.0.7" />
21+
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions" Version="5.0.7" />
2222
</ItemGroup>
2323

2424
<ItemGroup>

0 commit comments

Comments
 (0)