Support PostgreSQL array parameters
Currently to send in an integer array as a parameter, I have to use format.
var ids = "ARRAY[1,2,3]";
var sql = "SELECT 1 = ANY[{0}]".Fmt(ids);
Db.Query<Model>(sql);
I would rather use syntax like this:
var ids = new int[] {1, 2, 3};
var sql = "SELECT 1 = ANY(@ids)";
Db.Query<Model>(sql, new { ids });
9
votes

You can find our improved PostgreSQL Array support at:
https://github.com/ServiceStack/ServiceStack.OrmLite#custom-sql-using-postgresql-arrays