I'm familiar with adding query paramaters for single comparisons, like:
Code: Select all
cmd.Paramaters.Add("id", PgSqlType.Int).Value = 1;
Thanks
Code: Select all
cmd.Paramaters.Add("id", PgSqlType.Int).Value = 1;
Code: Select all
select * from table where id in(:par)
Code: Select all
cmd.Paramaters.Add("id", PgSqlType.Int).Value = 1;
Code: Select all
PgSqlCommand comm = new PgSqlCommand("select * from table where id ANY(:par)", conn);
object[] elements = new object[] { 1, 2, 3, 4, 7, 8 };
PgSqlArray arr = new PgSqlArray(elements, PgSqlType.Int, 1, elements.Count());
comm.Parameters.Add("par", PgSqlType.Array).Value = arr;