1

I've tried

users :: [Users] <- sqlQuery "SELECT * FROM users u … WHERE u.id IN ?" (userIds :: [Id User])

and (Only userIds) and (In userIds) but no success. I can't find any examples in the docs.

unhammer
  • 4,306
  • 2
  • 39
  • 52

1 Answers1

2

I guess it's using postgres-simple under the hood, https://hackage.haskell.org/package/postgresql-simple-0.6.5/docs/Database-PostgreSQL-Simple.html#g:6 gave the answer:

users :: [Users] <- sqlQuery "SELECT * FROM users u … WHERE u.id IN ?" (Only (In userIds))
unhammer
  • 4,306
  • 2
  • 39
  • 52