{"repo":"Holmusk/postgresql-simple-named","free":true,"listed":false,"github":"https://github.com/Holmusk/postgresql-simple-named","clone":"git clone https://github.com/Holmusk/postgresql-simple-named.git","description":":question: Implementation of named parameters for `postgresql-simple` library","language":"Haskell","stars":40,"topics":["haskell","postgresql","named-parameters"],"license":"MPL-2.0","category":"databases-storage","readme_excerpt":"postgresql-simple-named This library introduces the implementation of named parameters for the [ postgresql-simple ][pgs] library. postgresql-simple-named is designed to be used along with the [ postgresql-simple ][pgs] library, so you could refer there for the original documentation of primary functions. This package solves exclusively one particular problem — gives the ability to use named parameters instead of ? in quasi-quoter queries and offers essential functions for substituting variables in queries ( queryNamed , executeNamed ). Example Operator =? binds named parameters with the corresponding values. Named parameters inside SQL query start with the '?' character and can contain lowercase and uppercase letters, digits and underscore. Below you can find a basic example of how query with named parameters could look like: This feature can be extremely helpful when the query uses some parameters more than once: This is how the query looks like with the postgresql-simple library. You can rewrite it the following way using the postgresql-simple-named library: How to build Build the library with either cabal new-build or stack build . How to test locally Run DB in a Docker in a separate terminal window using command: Run tests using cabal new-test or stack test [pgs]: https://hackage.haskell.org/package/postgresql-simple","default_branch":null,"files":null,"tree":[],"storefront":"/r/Holmusk","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/Holmusk/postgresql-simple-named/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}