úÎjūb―E      !"#$%&'()*+,-./0123456789:;<=>?@ABCD experimental#Janne Hellsten <jjhellst@gmail.com> Safe-Inferred<a way to reify a list of exceptions into a single exception ETwo  4 cases are considered equal, regardless of what the " list of exceptions looks like.  FGHIJE   FGHIJEportable experimental#Janne Hellsten <jjhellst@gmail.com>None5A Field represents metadata about a particular field  Connection to an open database.       portable experimental#Janne Hellsten <jjhellst@gmail.com>None>A composite type to parse your custom data structures without 5 having to define dummy newtype wrappers every time.  # instance FromRow MyData where ...  $ instance FromRow MyData2 where ... &then I can do the following for free:   res <- query' c ...  forM res $ \"(MyData{..} :. MyData2{..}) -> do  .... A single-value " collection". AThis is useful if you need to supply a single parameter to a SQL 6 query, or extract a single column from a SQL result. Parameter example:  query c " select x from scores where x > ?" ( (42::Int))Result example: xs < - query_ c "select id from users"  forM_ xs $ \( id) -> {- ... -}!>A query string. This type is intended to make it difficult to E construct a SQL query by concatenating string fragments, as that is A an extremely common way to accidentally introduce SQL injection & vulnerabilities into an application. This type is an instance of K, so the easiest way to $ construct a query is to enable the OverloadedStrings language = extension and then simply write the query in double quotes.  $ {-# LANGUAGE OverloadedStrings #-}  # import Database.PostgreSQL.Simple   q :: Query  q = "select ?" The underlying type is a Text#, and literal Haskell strings that D contain Unicode characters will be correctly transformed to UTF-8. $A placeholder for the SQL NULL value.  !"#$%LMNOP  !"#$% $% !"#  !"#$%LMNOPportable experimental#Janne Hellsten <jjhellst@gmail.com>None&.A type that may be converted from a SQL type. '(Convert a SQL value to a Haskell value. FReturns a list of exceptions if the conversion fails. In the case of 3 library instances, this will usually be a single ), but  may be a UnicodeException. Implementations of '% should not retain any references to  the  nor the Q arguments after the result has = been evaluated to WHNF. Such a reference causes the entire  LibPQ.   to be retained. For example, the instance for Q uses R to avoid @ such a reference, and that using bytestring functions such as S  and T+ alone will also trigger this memory leak. )=Exception thrown if conversion from a SQL value to a Haskell  value fails. *0The SQL value could not be parsed, or could not 0 be represented as a valid Haskell value, or an 4 unexpected low-level error occurred (e.g. mismatch - between metadata and actual data in a row). +A SQL NULL" was encountered when the Haskell  type did not permit it. ,.The SQL and Haskell types are not compatible. 0>Return the actual SQL data for a database field. This allows  user-defined &" instances to access the SQL data ' associated with a field being parsed. 1#Given one of the constructors from ), the field,  and an /), this fills in the other fields in the ' exception value and returns it in a 'Left . SomeException'  constructor. &'()*+,-./UVW01XYZ[\]^_`abcde &'()*+,-./01&'(),+*-./-./-./01&'() ,+*-./-./-./UVW01XYZ[\]^_`abcdeportable experimental#Janne Hellsten <jjhellst@gmail.com>None2CA collection type that can be converted from a sequence of fields. N Instances are provided for tuples up to 10 elements and lists of any length. DNote that instances can defined outside of sqlite-simple, which is " often useful. For example, here''s an instance for a user-defined pair:  6data User = User { name :: String, fileQuota :: Int }   instance 2 User where  fromRow = User <$> 5 <*> 5 The number of calls to 5* must match the number of fields returned 5 in a single row of the query result. Otherwise, a *  exception will be thrown. ANote the caveats associated with user-defined implementations of  3. 2345f6ghijklmnopqr 2345623 5462345f6ghijklmnopqrportable experimental#Janne Hellsten <jjhellst@gmail.com>None7>A type that may be used as a single parameter to a SQL query. 86Prepare a value for substitution into a query string. 78stuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š787878stuvwxyz{|}~€‚ƒ„…†‡ˆ‰Športable experimental#Janne Hellsten <jjhellst@gmail.com>None9<A collection type that can be turned into a list of SQLData  elements. : ToField a collection of values. 9:‹ŒŽ‘’“”•–—9:9:9:‹ŒŽ‘’“”•–—portable experimental#Janne Hellsten <jjhellst@gmail.com>None;Exception thrown if a ! was malformed. ! This may occur if the number of '?' characters in the query : string does not match the number of parameters provided. ?;Open a database connection to a given file. Will throw an ! exception if it cannot connect. Every ? must be closed with a call to @. If you specify ":memory:"+ or an empty string as the input filename, A then a private, temporary in-memory database is created for the ; connection. This database will vanish when you close the  connection. @Close a database connection. A Execute an INSERT, UPDATE!, or other SQL query that is not  expected to return results. Throws ;0 if the query could not be formatted correctly. B Perform a SELECT/ or other SQL query that is expected to return > results. All results are retrieved and converted before this  function returns. CWhen processing large results, this function will consume a lot of % client-side memory. Consider using fold instead. Exceptions that may be thrown:  ;4: the query string mismatched with given arguments.  ): result conversion failed. C A version of B+ that does not perform query substitution. D A version of A+ that does not perform query substitution. ;˜<=>?@™ABCDš›œ" !"#)-./2359:;<=>?@ABCD(!"#9:23 ?@BCAD5;<=>)-./-./-./ ;˜<=>?@™ABCDš›œ        !"##$$%&&'(()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXVYZVY[V\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ >ĄĒĢĪĨsqlite-simple-0.2.0.0Database.SQLite.SimpleDatabase.SQLite.Simple.OkDatabase.SQLite.Simple.InternalDatabase.SQLite.Simple.Types Database.SQLite.Simple.FromFieldDatabase.SQLite.Simple.FromRowDatabase.SQLite.Simple.ToFieldDatabase.SQLite.Simple.ToRowPQResultdirect-sqlite-2.2Database.SQLite3 SQLIntegerSQLFloatSQLTextSQLBlobSQLNullSQLData ManyErrorsOkErrors RowParserRPunRPRowrow rowresultFieldresultcolumn Connection gettypenameexecstepStmt:.OnlyfromOnlyQuery fromQueryNull FromField fromField FieldParser ResultErrorConversionFailedUnexpectedNull Incompatible errSQLTypeerrHaskellType errMessage fieldData returnErrorFromRowfromRow fieldWithfieldnumFieldsRemainingToFieldtoFieldToRowtoRow FormatError fmtMessagefmtQuery fmtParamsopencloseexecutequeryquery_execute_$fEqOk$fExceptionManyErrors $fMonadOk $fMonadPlusOk$fAlternativeOk$fApplicativeOkbase Data.StringIsString $fMonoidQuery$fIsStringQuery $fReadQuery $fShowQuery$fEqNullbytestring-0.10.0.0Data.ByteString.Internal ByteStringData.ByteStringcopydropData.ByteString.Char8 takeWhilelefttakeInt fieldTypename$fFromFieldDay$fFromFieldUTCTime$fFromFieldByteString $fFromField[]$fFromFieldText$fFromFieldDouble$fFromFieldInteger$fFromFieldInt64$fFromFieldInt$fFromFieldInt32$fFromFieldInt16$fFromFieldNull$fFromFieldMaybe$fExceptionResultErrorellipsis $fFromRow:. $fFromRow[]$fFromRow(,,,,,,,,,)$fFromRow(,,,,,,,,)$fFromRow(,,,,,,,)$fFromRow(,,,,,,)$fFromRow(,,,,,)$fFromRow(,,,,)$fFromRow(,,,) $fFromRow(,,) $fFromRow(,) $fFromRowOnly $fToFieldDay$fToFieldUTCTime $fToFieldText $fToField[]$fToFieldText0$fToFieldByteString$fToFieldByteString0$fToFieldDouble$fToFieldFloat$fToFieldWord64 $fToFieldWord$fToFieldWord32$fToFieldWord16$fToFieldWord8$fToFieldInteger$fToFieldInt64 $fToFieldInt$fToFieldInt32$fToFieldInt16 $fToFieldInt8 $fToFieldBool $fToFieldNull$fToFieldMaybe$fToFieldSQLData $fToRow:. $fToRow[]$fToRow(,,,,,,,,,)$fToRow(,,,,,,,,)$fToRow(,,,,,,,)$fToRow(,,,,,,)$fToRow(,,,,,) $fToRow(,,,,) $fToRow(,,,) $fToRow(,,) $fToRow(,) $fToRowOnly $fToRow()withBind finishQueryfmtError$fExceptionFormatError