}QR      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQ experimental#Janne Hellsten <jjhellst@gmail.com> Safe-Inferred<a way to reify a list of exceptions into a single exception RTwo  4 cases are considered equal, regardless of what the " list of exceptions looks like.  STUVWR   STUVWRportable experimental#Janne Hellsten <jjhellst@gmail.com>None5A Field represents metadata about a particular field  Connection to an open database.  You can use " to gain access to the underlying   0http://hackage.haskell.org/package/direct-sqlite connection. = This may be useful if you need to access some direct-sqlite  functionality that'.s not exposed in the sqlite-simple API. This ; should be a safe thing to do although mixing both APIs is  discouraged.      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 X, 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.SQLite.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.  !"YZ[\]  !" !"   !"YZ[\]portable 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 ^ arguments after the result has = been evaluated to WHNF. Such a reference causes the entire  LibPQ.   to be retained. For example, the instance for ^ uses _ to avoid @ such a reference, and that using bytestring functions such as `  and a+ 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. ->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. .#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. #$%&'()*+,bcd-.efghijklmnopqrstu #$%&'()*+,-.#$%&)('*+,*+,*+,-.#$%& )('*+,*+,*+,bcd-.efghijklmnopqrstuportable experimental#Janne Hellsten <jjhellst@gmail.com>None/CA 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 / User where  fromRow = User <$> 2 <*> 2 The number of calls to 2* 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  0. /012v3wxyz{|}~ /0123/0 213/012v3wxyz{|}~portable experimental#Janne Hellsten <jjhellst@gmail.com>None4>A type that may be used as a single parameter to a SQL query. 56Prepare a value for substitution into a query string. 45454545portable experimental#Janne Hellsten <jjhellst@gmail.com>None6<A collection type that can be turned into a list of SQLData  elements. 7 ToField a collection of values. 67676767portable experimental#Janne Hellsten <jjhellst@gmail.com>None8Exception 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. <@Index of a column in a result set. Column indices start from 0. >An SQLite prepared statement. ?;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. AKOpens a database connection, executes an action using this connection, and < closes the connection, even in the presence of exceptions. B (http://www.sqlite.org/c3ref/profile.html Enable/;disable tracing of SQL execution. Tracing can be disabled  by setting  as the logger callback. @Warning: If the logger callback throws an exception, your whole 0 program may crash. Enable only for debugging! C/Binds parameters to a prepared statement. Once P returns , & the statement must be reset with the D function before it can be  executed again by calling P. DFResets a statement. This does not reset bound parameters, if any, but 9 allows the statement to be reexecuted again by invoking P. E@Return the name of a a particular column in the result set of a  > . Throws an  if the colum index is out  of bounds.  ,http://www.sqlite.org/c3ref/column_name.html F.Binds parameters to a prepared statement, and Ds the statement when = the callback completes, even in the presence of exceptions. Use F+ to reuse prepared statements. Because it Ds the  statement after4 each usage, it avoids a pitfall involving implicit A transactions. SQLite creates an implicit transaction if you don't say  BEGIND explicitly, and does not commit it until all active statements are  finished with either D or H. GLOpens a prepared statement. A prepared statement must always be closed with  a corresponding call to H$ before closing the connection. Use  P) to iterate on the values returned. Once P returns  , you need to invoke D( before reexecuting the statement again  with P. HCloses a prepared statement. IIOpens a prepared statement, executes an action using this statement, and ; closes the statement, even in the presence of exceptions. J Execute an INSERT, UPDATE!, or other SQL query that is not  expected to return results. Throws 80 if the query could not be formatted correctly. K 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 N instead. Exceptions that may be thrown:  84: the query string mismatched with given arguments.  &: result conversion failed. L A version of K+ that does not perform query substitution. M A version of J+ that does not perform query substitution. N Perform a SELECT8 or other SQL query that is expected to return results. ( Results are converted and fed into the action callback as they are being  retrieved from the database. JThis allows gives the possibility of processing results in constant space & (for instance writing them to disk). Exceptions that may be thrown:  84: the query string mismatched with given arguments.  &: result conversion failed. O A version of N0 which does not perform parameter substitution. P3Extracts the next row from the prepared statement. Q>Returns the rowid of the most recent successful INSERT on the  given database connection.  See also  2http://www.sqlite.org/c3ref/last_insert_rowid.html. $89:;<=>?@ABCDEFGHIJKLMNOPQ4 &*+,/026789:;<=>?@ABCDEFGHIJKLMNOPQ: 67/0><=?@ABKLQJM2NOGHICDEFP89:;&*+,*+,*+,89:;<=>?@ABCDEFGHIJKLMNOPQ       !!""#$$%&&'()*+,-./0123456789:;<=>?@@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdecfgcfhcijklmnopqrstuvwxyz{|}~[[<Asqlite-simple-0.4.2.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.3.4Database.SQLite3 SQLIntegerSQLFloatSQLTextSQLBlobSQLNullSQLData ManyErrorsOkErrors RowParserRPunRPRow rowresultFieldresultcolumn ConnectionconnectionHandle gettypename:.OnlyfromOnlyQuery fromQueryNull FromField fromField FieldParser ResultErrorConversionFailedUnexpectedNull Incompatible errSQLTypeerrHaskellType errMessage fieldData returnErrorFromRowfromRow fieldWithfieldnumFieldsRemainingToFieldtoFieldToRowtoRow FormatError fmtMessagefmtQuery fmtParams ColumnIndex StatementopenclosewithConnectionsetTracebindreset columnNamewithBind openStatementcloseStatement withStatementexecutequeryquery_execute_foldfold_nextRowlastInsertRowId$fEqOk$fExceptionManyErrors $fMonadOk $fMonadPlusOk$fAlternativeOk$fApplicativeOkbase Data.StringIsString $fMonoidQuery$fIsStringQuery $fReadQuery $fShowQuery$fEqNullbytestring-0.10.0.2Data.ByteString.Internal ByteStringData.ByteStringcopydropData.ByteString.Char8 takeWhilelefttakeInt fieldTypename$fFromFieldDay$fFromFieldUTCTime$fFromFieldByteString$fFromFieldByteString0 $fFromField[]$fFromFieldText$fFromFieldText0$fFromFieldBool$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() Data.MaybeNothingGHC.IO.ExceptionArrayExceptionunUtf8withStatementP doFoldToListdoFold convertRowfmtErrorgetQuery$fExceptionFormatError