-
-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bumped version to 2.2, added test, small fixes
- Loading branch information
1 parent
886af95
commit 133e6af
Showing
4 changed files
with
32 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
using System.Threading.Tasks; | ||
using ClickHouse.Client.ADO; | ||
using ClickHouse.Client.Utility; | ||
using NUnit.Framework; | ||
|
||
namespace ClickHouse.Client.Tests | ||
{ | ||
public class ParameterizedInsertTests | ||
{ | ||
private readonly ClickHouseConnection connection = TestUtilities.GetTestClickHouseConnection(); | ||
|
||
[Test] | ||
public async Task ShouldInsertParameterizedArray() | ||
{ | ||
await connection.ExecuteStatementAsync("TRUNCATE TABLE IF EXISTS test.float_array"); | ||
await connection.ExecuteStatementAsync("CREATE TABLE IF NOT EXISTS test.float_array (arr Array(Float64)) ENGINE Memory"); | ||
|
||
var command = connection.CreateCommand(); | ||
command.AddParameter("values", new[] { 1.0, 2.0, 3.0 }); | ||
command.CommandText = "INSERT INTO test.float_array VALUES ({values:Array(Float32)})"; | ||
await command.ExecuteNonQueryAsync(); | ||
|
||
var count = await connection.ExecuteScalarAsync("SELECT COUNT(*) FROM test.float_array"); | ||
Assert.AreEqual(1, count); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
version: 2.1.0.{build} | ||
version: 2.2.0.{build} | ||
image: | ||
- Visual Studio 2019 | ||
- Ubuntu | ||
|