Îõ³h&‰è      Safe-Inferred"%&(/25;?ÂÌÑÔÜãï¶postgresql-simple-named3Type alias for monads that can throw errors of the  type.postgresql-simple-named PostgreSQL! error type for named parameters.postgresql-simple-named!Named parameter is not specified.postgresql-simple-named>Query has no names inside but was called with named functions.postgresql-simple-namedQuery contains an empty name.postgresql-simple-named,Data type to represent each named parameter. postgresql-simple-named"Wrapper over name of the argument.postgresql-simple-namedChecks whether the  * is in the list and returns its parameter. postgresql-simple-namedÄThis function takes query with named parameters specified like this: SELECT name, user FROM users WHERE id = ?id Ôand returns either the error or the query with all names replaced by question marks ?= with the list of the names in the order of their appearance. For example:ÑextractNames "SELECT * FROM users WHERE foo = ?foo AND bar = ?bar AND baz = ?foo"ÚRight ("SELECT * FROM users WHERE foo = ? AND bar = ? AND baz = ?","foo" :| ["bar","foo"])ÍextractNames "SELECT foo FROM my_table WHERE (foo->'bar' ??| ?selectedTags);"ÐRight ("SELECT foo FROM my_table WHERE (foo->'bar' ?| ?);","selectedTags" :| [])ûWhen the operator is not escaped, it's treated as a named parameter >>> extractNames "SELECT foo FROM my_table WHERE (foo->barÿ ?| ?selectedTags);" Left PostgreSQL named parameter error: Query contains an empty name: SELECT foo FROM my_table WHERE (foo->bar ?| ?selectedTags); postgresql-simple-namedSo it can be used in creating the list of the named arguments:  dbConnection [sql| SELECT * FROM users WHERE foo = ?foo AND bar = ?bar AND baz = ?foo |] [ "foo"  "fooBar" , "bar"  "barVar" ] postgresql-simple-namedâQueries the database with a given query and named parameters and expects a list of rows in return.  dbConnection [sql| SELECT id FROM table WHERE foo = ?foo |] [ "foo"  "bar" ] postgresql-simple-named.Queries the database with a given row parser, <, and named parameters and expects a list of rows in return.£Sometimes there are multiple ways to parse tuples returned by PostgreSQL into the same data type. However, it's not possible to implement multiple intances of the $ typeclass (or any other typeclass).!Consider the following data type: dataÒ Person = Person { personName :: !Text , personAge :: !(Maybe Int) } %We might want to parse values of the Person data type in two ways: Default by parsing all fields.Parse only name and age to .;If you want to have multiple instances, you need to create newtype for each case. However, in some cases it might not be convenient to deal with newtypes around large data types. So you can implement custom  and use it with . " rowParser dbConnection [sql| SELECT id FROM table WHERE foo = ?foo |] [ "foo"  "bar" ] postgresql-simple-namedèModifies the database with a given query and named parameters and expects a number of the rows affected.  dbConnection [sql| UPDATE table SET foo = 'bar' WHERE id = ?id |] [ "id"  someId ] postgresql-simple-namedSame as ÿ but discard the nubmer of rows affected by the given query. This function is useful when you're not interested in this number.postgresql-simple-namedÙHelper to use named parameters. Use it to implement named wrappers around functions from postgresql-simpleÜ library. If you think that the function is useful, consider opening feature request to the postgresql-simple-named library: 9https://github.com/Holmusk/postgresql-simple-named/issues postgresql-simple-namedList of the names used in querypostgresql-simple-namedList of the named parameterspostgresql-simple-namedDatabase connectionpostgresql-simple-named"Query with named parameters insidepostgresql-simple-named4The list of named parameters to be used in the querypostgresql-simple-namedResulting rowspostgresql-simple-namedCustom defined row parserpostgresql-simple-namedDatabase connectionpostgresql-simple-named"Query with named parameters insidepostgresql-simple-named4The list of named parameters to be used in the querypostgresql-simple-namedResulting rowspostgresql-simple-namedDatabase connectionpostgresql-simple-named"Query with named parameters insidepostgresql-simple-named4The list of named parameters to be used in the querypostgresql-simple-named.Number of the rows affected by the given querypostgresql-simple-namedDatabase connectionpostgresql-simple-named"Query with named parameters insidepostgresql-simple-named4The list of named parameters to be used in the query   1        !"#$%&6postgresql-simple-named-0.0.4.0-3SFdiV4pQiM1sIKYFVn49APgNamedWithNamedError PgNamedError PgNamedParam PgNoNames PgEmptyName NamedParamnamedParamNamenamedParamParamNameunName extractNames namesToRow=? queryNamedqueryWithNamed executeNamed executeNamed_ withNamedArgs$fShowPgNamedError$fEqPgNamedError$fShowNamedParam $fShowName$fEqName $fOrdName$fIsStringName lookupName.postgresql-simple-0.6.5-A1V2MItYuRX1xGtF3aU6DL Database.PostgreSQL.Simple.TypesQuery"Database.PostgreSQL.Simple.FromRowFromRowbase GHC.MaybeNothing#Database.PostgreSQL.Simple.Internal RowParser