Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
maikebing committed Oct 22, 2024
2 parents da42075 + 20d4a33 commit c4918d3
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore EFCore.Taos.sln
- name: Build
Expand Down
4 changes: 4 additions & 0 deletions EFCore.Taos.sln
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,12 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{61AA7587-946B-4B2F-92C9-73D0BA670B97}"
ProjectSection(SolutionItems) = preProject
appveyor.yml = appveyor.yml
.workflow\BranchPipeline.yml = .workflow\BranchPipeline.yml
.github\workflows\dotnet.yml = .github\workflows\dotnet.yml
LICENSE = LICENSE
docs\logo.png = docs\logo.png
.workflow\MasterPipeline.yml = .workflow\MasterPipeline.yml
.workflow\PRPipeline.yml = .workflow\PRPipeline.yml
README.md = README.md
taos.cfg = taos.cfg
docs\taos_ch.png = docs\taos_ch.png
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ protected override Expression VisitExtension(Expression extensionExpression)


return exp;
}
}

private Expression VisitTaosMatchExpression(TaosMatchExpression matchExpression)
{
Expand Down
13 changes: 7 additions & 6 deletions src/EntityFrameworkCore.Taos.Tests/SqModelTest.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using IoTSharp.Data.Taos;
using Carbunql.Analysis;

Check failure on line 1 in src/EntityFrameworkCore.Taos.Tests/SqModelTest.cs

View workflow job for this annotation

GitHub Actions / build

The type or namespace name 'Carbunql' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 1 in src/EntityFrameworkCore.Taos.Tests/SqModelTest.cs

View workflow job for this annotation

GitHub Actions / build

The type or namespace name 'Carbunql' could not be found (are you missing a using directive or an assembly reference?)
using IoTSharp.Data.Taos;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using SqModel.Analysis;
using System;
using System.Collections.Generic;
using System.Linq;
Expand All @@ -20,17 +20,17 @@ public void TestExecuteBulkInsert_Json()
,station_uid,longitude,latitude,mn,dev_code,pol_name,pol_unit,pol_id FROM st_pmcm WHERE point_code = @p1;";
const string SQLDemo3 = "SELECT * FROM bytable WHERE t1 = @t1 AND t2 LIKE @t11 LIMIT @t3;";
// const string SQLDemo4 = "INSERT INTO t_status USING st_status (status_key) TAGS ('s1') (status_time, val) VALUES (@x1, @x2);";
var s1 = SqlParser.Parse(SQLDemo1);
var s1 = SelectQueryParser.Parse(SQLDemo1);
Assert.AreEqual(0, ((int?)s1.Parameters?.Count).GetValueOrDefault());
var s2 = SqlParser.Parse(SQLDemo2);
var s2 = SelectQueryParser.Parse(SQLDemo2);
Assert.AreEqual(5, ((int?)s2.Parameters?.Count).GetValueOrDefault());

Assert.AreEqual("@p1", s2.Parameters?.Keys.ToArray()[0]);

var pn2 = s2.Parameters;
Assert.AreEqual(1, pn2.Count);
Assert.AreEqual("@p1", pn2.Keys.ToArray()[0]);
var s3 = SqlParser.Parse(SQLDemo3);
var s3 = SelectQueryParser.Parse(SQLDemo3);
Assert.AreEqual(7, s3.Parameters?.Count);
Assert.AreEqual("@t1", s3.Parameters?.ToArray()[1].Key);
Assert.AreEqual("@t11", s3.Parameters?.ToArray()[3].Key);
Expand All @@ -57,7 +57,8 @@ public void TestExecuteBulkInsert_Json()
//Assert.AreEqual(2, pn4.Length);
//Assert.AreEqual("@x1", pn4[0]);
//Assert.AreEqual("@x2", pn4[1]);
var s5 = SqlParser.Parse("insert into #subtable using stable tags($t1,$t2,$t3,$t4,$t5,$t6,$t7,$t8,$t9,$t10,$t11,$t12,$t13) values (@t1,@t2,@t3,@t4,@t5,@t6,@t7,@t8,@t9,@t10,@t11,@t12,@t13,@t14)");

var s5 = SelectQueryParser.Parse("insert into #subtable using stable tags($t1,$t2,$t3,$t4,$t5,$t6,$t7,$t8,$t9,$t10,$t11,$t12,$t13) values (@t1,@t2,@t3,@t4,@t5,@t6,@t7,@t8,@t9,@t10,@t11,@t12,@t13,@t14)");
Assert.AreEqual(14, s5.Parameters?.Count);
Assert.AreEqual("#subtable", s5.Parameters?.ToArray()[0].Key);
Assert.AreEqual(13, s5.Parameters?.Count(k=>k.Key.StartsWith('$')));
Expand Down
12 changes: 6 additions & 6 deletions src/Example/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.

FROM mcr.microsoft.com/dotnet/runtime:7.0-bullseye-slim AS base
MAINTAINER Yanhong Ma 2023
RUN echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free" > /etc/apt/sources.list && \
echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free" >> /etc/apt/sources.list && \
echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free" >> /etc/apt/sources.list && \
FROM mcr.microsoft.com/dotnet/runtime:8.0-bookworm-slim AS base
MAINTAINER Yanhong Ma 2024
RUN echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free" > /etc/apt/sources.list && \
echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free" >> /etc/apt/sources.list && \
echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free" >> /etc/apt/sources.list && \
apt-get -y -q update && apt-get install -y --no-install-recommends -q apt-utils lsof net-tools wget curl iputils-ping inetutils-tools && \
apt-get autoremove -y && apt-get clean && apt-get autoclean && rm /var/cache/apt/* -rf && ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
RUN curl -o TDengine-client.tar.gz "https://www.taosdata.com/assets-download/3.0/TDengine-client-3.2.1.0-Linux-x64.tar.gz" && \
Expand All @@ -13,7 +13,7 @@ RUN curl -o TDengine-client.tar.gz "https://www.taosdata.com/assets-download/3.0
rm $(pwd) -rf
WORKDIR /app

FROM mcr.microsoft.com/dotnet/sdk:7.0-bullseye-slim AS build
FROM mcr.microsoft.com/dotnet/sdk:8.0-bookworm-slim AS build
WORKDIR /src

COPY ["src/Example/Example.csproj", "src/Example/"]
Expand Down
4 changes: 2 additions & 2 deletions src/IoTSharp.Data.Taos/IoTSharp.Data.Taos.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
IoTSharp.Data.Taos.TaosParameter
IoTSharp.Data.Taos.TaosTransaction
</Description>
<TargetFrameworks>net6;net7;net4.6;netstandard2.0</TargetFrameworks>
<TargetFrameworks>net6;net7;net8;net4.6;netstandard2.0</TargetFrameworks>
<LangVersion>10</LangVersion>
<PackageTags>Taos;Data;ADO.NET;Entity Framework,;EF; Core;Data O/RM,;entity-framework-core;TDengine;IoTSharp</PackageTags>
<Authors>Yanhong Ma</Authors>
Expand Down Expand Up @@ -56,7 +56,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net4.6'">
<PackageReference Include="System.Net.Http" Version="4.3.4" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ private bool _open_ws(TaosConnectionStringBuilder builder)

private bool _ws_conn(TaosConnectionStringBuilder builder, ClientWebSocket _client)
{
var rep = WSExecute<WSConnRsp, WSConnReq>(_client, new WSActionReq<WSConnReq>() { Action = "conn", Args = new WSConnReq() { user = builder.Username, password = builder.Password, req_id = 0, db = builder.DataBase } });
var rep = WSExecute<WSConnRsp, WSConnReq>(_client, new WSActionReq<WSConnReq>() { Action = "conn", Args = new WSConnReq() { user = builder.Username, password = builder.Password, req_id = 0 } });
if (rep.code == 899)
{
rep = WSExecute<WSConnRsp, WSConnReq>(_client, new WSActionReq<WSConnReq>() { Action = "conn", Args = new WSConnReq() { user = builder.Username, password = builder.Password, req_id = 0 } });
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6</TargetFramework>
<TargetFramework>net8</TargetFramework>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Version>1.0.1</Version>
<PackageLicenseExpression></PackageLicenseExpression>
Expand All @@ -17,8 +17,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="6.0.3" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions" Version="6.0.3" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions" Version="8.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/ORMExample/ORMExample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit c4918d3

Please sign in to comment.