lpsmith / postgresql-simple

Mid-level client library for accessing PostgreSQL from Haskell
Other
206 stars 71 forks source link

Documentation suggestion: Mention "sql" quasiquoter in haddock intro overview doc #254

Open bitc opened 6 years ago

bitc commented 6 years ago

Multi-line SQL string literals are practically a must, even for simple programs.

Luckily, this library comes with the "sql" quasiquoter for handling this. Unfortunately, this is hidden away in the module Database.PostgreSQL.Simple.SqlQQ And this is among many other modules, that look like they are only for advanced functionality, so it is not clearly visible.

I was actually using a different haskell library for doing multiline SQL strings with postgresql-simple, because I didn't realize that "sql" existed. It was only by accident that I discovered it existed.

I suggest adding to the haddock overview in Database.PostgreSQL.Simple a section that mentions this feature (perhaps with the subheading "Multi-line SQL queries"), with a short example of how to use it.

Thank you

lpsmith commented 5 years ago

Sounds like a great idea! I'll try to get this done for the next release, though I don't know when that might happen.