forked from CollaboratingPlatypus/PetaPoco
-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Description
Hi,
At this moment it is not possible to use Postgresql's ANY() operator to pass arrays as sql input parameters.
When trying code such as
public class SomeEntity
{
public int Id {get; set; }
}
public Task<List<SomeEntity>> AcceptRejectRule (AsyncPoco.Database dbConn) {
object ids = new [] { 1, 2, 3, 4 };
return dbConn.FetchAsync<SomeEntity>("where id = ANY(@0)", ids);
}It fails because it generates:
sql query: select id from SomeEntity where id = ANY(@0, @1, @2, @3)
query parameters: SqlParameter(@0, 1), SqlParameter(@1, 2),SqlParameter(@2, 3),SqlParameter(@3, 4)
Implementation proposal as PR will follow shortly.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels