prowdsponsor / esqueleto

Bare bones, type-safe EDSL for SQL queries on persistent backends.
http://hackage.haskell.org/package/esqueleto
BSD 3-Clause "New" or "Revised" License
177 stars 51 forks source link

Adds haddock example usage of 'in_' operator #122

Closed rzetterberg closed 8 years ago

rzetterberg commented 8 years ago

I couldn't find an example for how you use the in_ operator and I didn't understand directly how to use it.

So I thought maybe it would help to add a short example for people with less experience like me.

meteficha commented 8 years ago

Nice, thanks! Just a style note, though:

-- Instead of:
'where_' $ 'in_' (person '^.' PersonId) ('valList' personIds)

-- Write this:
'where_' $ person '^.' PersonId `in_` 'valList' personIds
rzetterberg commented 8 years ago

Thanks for the feedback! I have made the suggested changes and squashed the two commits.

meteficha commented 8 years ago

Thanks!