Skip to content

Commit

Permalink
报错定位
Browse files Browse the repository at this point in the history
  • Loading branch information
maikebing committed Dec 15, 2023
1 parent fec67ad commit 38d3d1f
Showing 1 changed file with 7 additions and 22 deletions.
29 changes: 7 additions & 22 deletions src/Example/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,17 @@ private static void Main(string[] args)
issues252.demo_code(builder);
#if DEBUG
// ExecSqlByNative(builder_cloud.UseCloud_DSN());
Console.WriteLine("ExecSqlByNative");
ExecSqlByNative(builder.UseNative());
Console.WriteLine("UseTaosEFCore");
UseTaosEFCore(builder.UseNative());
Console.WriteLine("ExecSqlByRESTFul");
ExecSqlByRESTFul(builder.UseRESTful());
Console.WriteLine("ExecSqlByStmt");
ExecSqlByStmt(builder.UseWebSocket());
Console.WriteLine("ExecSqlByWebSocket");
ExecSqlByWebSocket(builder.UseWebSocket());
Console.WriteLine("UseTaosEFCore");
UseTaosEFCore(builder.UseWebSocket());


Expand All @@ -84,6 +90,7 @@ private static void Main(string[] args)
ExecSqlByWebSocket(builder.UseWebSocket());
UseTaosEFCore(builder.UseWebSocket());
#endif
Console.WriteLine("select * from power.meters");
using (var connection = new TaosConnection(builder.ConnectionString))
{
try
Expand All @@ -109,28 +116,6 @@ private static void Main(string[] args)
connection.Close();
}
}


//using (var connection = new TaosConnection(builder.ConnectionString))
//{
// try
// {
// connection.Open();

// connection.CreateCommand($"select * from power.meters where current > 10")
// .ExecuteSubscribe<(DateTime ts, double current, double voltage, double phase, string location)>
// ("topic-meter-current-bg-10", data => Console.WriteLine($"ts:{data.ts} current:{data.current} voltage:{data.voltage} phase:{data.phase} location:{data.location} "));

// }
// catch (Exception ex)
// {
// Console.WriteLine("执行ExecuteSubscribe异常" + ex.Message);
// }
// finally
// {
// connection.Close();
// }
//}
}
/// <summary>
/// #259 #258
Expand Down

0 comments on commit 38d3d1f

Please sign in to comment.