-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when use in #52
Comments
Hello, @Genuineh The right side of You may modify your query and pass the array of values as a table with a single column: using var cnn = new ClickHouseConnection(settings.ToString());
await cnn.OpenAsync().ConfigureAwait(false);
var cmd = cnn.CreateCommand("SELECT * FROM cktest WHERE id IN ids");
var ids = new long[] { 1, 2 };
var tableProvider = new ClickHouseTableProvider("ids", ids.Length);
tableProvider.AddColumn(ids);
cmd.TableProviders.Add(tableProvider);
var res = await cmd.ExecuteReaderAsync().ConfigureAwait(false); |
Hi, @victor-sushko |
hi, @victor-sushko codeawait cnn.QueryAsync<object>("SELECT * FROM cktest WHERE id IN @ids", new { ids = new[] { 1L, 2L } }); errorOctonica.ClickHouseClient.Exceptions.ClickHouseServerException : DB::Exception: Types of column 1 in section IN don't match: Int64 on the left, Array(Int64) on the right Whether not support array parameters with dapper style |
Code
Error
The text was updated successfully, but these errors were encountered: