#ڌ      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~       ?(c) 2012 Leon P Smith (c) 2012-2013 Janne HellstenBSD3#Janne Hellsten <jjhellst@gmail.com>Safe%24UV. sqlite-simple;a way to reify a list of exceptions into a single exception8 sqlite-simpleTwo 1U cases are considered equal, regardless of what the list of exceptions looks like../021021./E(c) 2011-2012 Leon P Smith (c) 2012-2013 Janne HellstenBSD3#Janne Hellsten <jjhellst@gmail.com>portableNone%2MUVC sqlite-simple4A Field represents metadata about a particular fieldJ sqlite-simpleConnection to an open database. You can use L# 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.=>?@ABCDEFGHIJKLMJKLGHICDEF@AB=>?M@(c) 2012 Leon P Smith (c) 2012-2014 Janne HellstenBSD3#Janne Hellsten <jjhellst@gmail.com>None%UV#[ sqlite-simpleOutput YYYY-MM-DD HH:MM:SS with an optional .SSS fraction part. Explicit timezone attribute is not appended as per SQLite3's datetime conventions. sqlite-simple*p assumes its input is in the range [0..9] sqlite-simple.pad2 assumes its input is in the range [0..99] sqlite-simple"pad4 assumes its input is positiveVWXYZ[VW[XYZ5 @(c) 2012 Leon P Smith (c) 2012-2014 Janne HellstenBSD3#Janne Hellsten <jjhellst@gmail.com>None%UV%VWXYZ[k(c) 2011 MailRank, Inc. (c) 2011-2012 Leon P Smith (c) 2012-2013 Janne HellstenBSD3#Janne Hellsten <jjhellst@gmail.com>portableNone %24MUV8\ sqlite-simplerA composite type to parse your custom data structures without having to define dummy newtype wrappers every time. !instance FromRow MyData where ... "instance FromRow MyData2 where ...%then I can do the following for free: Kres <- query' c "..." forM res $ \(MyData{..} :. MyData2{..}) -> do .... ^ sqlite-simpleA query string. This type is intended to make it difficult to construct a SQL query by concatenating string fragments, as that is an extremely common way to accidentally introduce SQL injection vulnerabilities into an application.This type is an instance of <, so the easiest way to construct a query is to enable the OverloadedStringsF 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 Textf, and literal Haskell strings that contain Unicode characters will be correctly transformed to UTF-8.a sqlite-simpleA placeholder for the SQL NULL value. \]^_`ab ab^_`\]\3]3k(c) 2011 MailRank, Inc. (c) 2011-2012 Leon P Smith (c) 2012-2013 Janne HellstenBSD3#Janne Hellsten <jjhellst@gmail.com>portableNone %24=?UV>aq sqlite-simple=A type that may be used as a single parameter to a SQL query.r sqlite-simple5Prepare a value for substitution into a query string.qrqrk(c) 2011 MailRank, Inc. (c) 2011-2012 Leon P Smith (c) 2012-2013 Janne HellstenBSD3#Janne Hellsten <jjhellst@gmail.com>portableNone%UVC$ sqlite-simple4A collection type that can be turned into a list of  elements. sqlite-simpleq a collection of values.@(c) 2011-2012 Leon P Smith (c) 2018 Janne HellstenBSD3#Janne Hellsten <jjhellst@gmail.com>portableNone%UVI* sqlite-simpleA quasiquoter for writing big SQL queries.#One should consider turning on the  -XQuasiQuotes pragma in that module: l myQuery = query conn [sql| SELECT * FROM users WHERE jobTitle = ? |] jobTitle  k(c) 2011 MailRank, Inc. (c) 2011-2012 Leon P Smith (c) 2012-2013 Janne HellstenBSD3#Janne Hellsten <jjhellst@gmail.com>portableNone %24=?UVXb sqlite-simple-A type that may be converted from a SQL type. sqlite-simple'Convert a SQL value to a Haskell value.yReturns a list of exceptions if the conversion fails. In the case of library instances, this will usually be a single , but may be a UnicodeException.Implementations of * should not retain any references to the C 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 J to avoid such a reference, and that using bytestring functions such as  and * alone will also trigger this memory leak. sqlite-simpleJException thrown if conversion from a SQL value to a Haskell value fails. sqlite-simple-The SQL and Haskell types are not compatible. sqlite-simpleA SQL NULL: was encountered when the Haskell type did not permit it. sqlite-simpleThe SQL value could not be parsed, or could not be represented as a valid Haskell value, or an unexpected low-level error occurred (e.g. mismatch between metadata and actual data in a row). sqlite-simpleLReturn the actual SQL data for a database field. This allows user-defined H instances to access the SQL data associated with a field being parsed. sqlite-simple#Given one of the constructors from , the field, and an v, this fills in the other fields in the exception value and returns it in a 'Left . SomeException' constructor. C C E(c) 2011-2012 Leon P Smith (c) 2012-2013 Janne HellstenBSD3#Janne Hellsten <jjhellst@gmail.com>portableNone"#%UVo sqlite-simpleA collection type that can be converted from a sequence of fields. Instances are provided for tuples up to 10 elements and lists of any length.Note that instances can defined outside of sqlite-simple, which is often useful. For example, here's an instance for a user-defined pair:6@data User = User { name :: String, fileQuota :: Int } instance $ User where fromRow = User <$>  <*>  @The number of calls to _ must match the number of fields returned in a single row of the query result. Otherwise, a  exception will be thrown.BNote the caveats associated with user-defined implementations of .==k(c) 2011 MailRank, Inc. (c) 2011-2012 Leon P Smith (c) 2012-2013 Janne HellstenBSD3#Janne Hellsten <jjhellst@gmail.com>portableNone %&'2MUVXg# sqlite-simpleException thrown if a ^2 was malformed. This may occur if the number of '?S' characters in the query string does not match the number of parameters provided. sqlite-simple?Index of a column in a result set. Column indices start from 0. sqlite-simpleAn SQLite prepared statement. sqlite-simple[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, then a private, temporary in-memory database is created for the connection. This database will vanish when you close the connection. sqlite-simpleClose a database connection. sqlite-simpleOpens a database connection, executes an action using this connection, and closes the connection, even in the presence of exceptions. sqlite-simple (http://www.sqlite.org/c3ref/profile.htmlNEnable/disable tracing of SQL execution. Tracing can be disabled by setting  as the logger callback.oWarning: If the logger callback throws an exception, your whole program may crash. Enable only for debugging! sqlite-simple/Binds parameters to a prepared statement. Once  returns (, the statement must be reset with the 6 function before it can be executed again by calling . sqlite-simple/Binds named parameters to a prepared statement. sqlite-simpleResets a statement. This does not reset bound parameters, if any, but allows the statement to be reexecuted again by invoking . sqlite-simpleAReturn 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 sqlite-simple%Return number of columns in the query sqlite-simple.Binds parameters to a prepared statement, and Qs the statement when the callback completes, even in the presence of exceptions.Use + to reuse prepared statements. Because it s the statement after} each usage, it avoids a pitfall involving implicit transactions. SQLite creates an implicit transaction if you don't say BEGINZ explicitly, and does not commit it until all active statements are finished with either  or . sqlite-simpleeOpens a prepared statement. A prepared statement must always be closed with a corresponding call to % before closing the connection. Use ) to iterate on the values returned. Once  returns , you need to invoke . before reexecuting the statement again with . sqlite-simpleCloses a prepared statement. sqlite-simpleOpens a prepared statement, executes an action using this statement, and closes the statement, even in the presence of exceptions. sqlite-simple Execute an INSERT, UPDATE=, or other SQL query that is not expected to return results.Throws / if the query could not be formatted correctly. sqlite-simpleExecute a multi-row INSERT, UPDATE=, or other SQL query that is not expected to return results.Throws / if the query could not be formatted correctly. sqlite-simple Perform a SELECT or other SQL query that is expected to return results. All results are retrieved and converted before this function returns.hWhen processing large results, this function will consume a lot of client-side memory. Consider using  instead.Exceptions that may be thrown:3: the query string mismatched with given arguments.: result conversion failed. sqlite-simple A version of * that does not perform query substitution. sqlite-simple A version of  that takes an explicit =. sqlite-simple A version of A that does not perform query substitution and takes an explicit =. sqlite-simple A version of 6 where the query parameters (placeholders) are named.Example: r <- = c "SELECT * FROM posts WHERE id=:id AND date>=:date" [":id"  postId, ":date"  afterDate]  sqlite-simple A version of * that does not perform query substitution. sqlite-simple A version of 6 where the query parameters (placeholders) are named. sqlite-simple Perform a SELECT` or other SQL query that is expected to return results. Results are converted and fed into the action9 callback as they are being retrieved from the database.oThis allows gives the possibility of processing results in constant space (for instance writing them to disk).Exceptions that may be thrown:3: the query string mismatched with given arguments.: result conversion failed. sqlite-simple A version of / which does not perform parameter substitution. sqlite-simple A version of 6 where the query parameters (placeholders) are named. sqlite-simple2Extracts the next row from the prepared statement. sqlite-simple7Run an IO action inside a SQL transaction started with BEGIN IMMEDIATE TRANSACTION^, which immediately blocks all other database connections from writing. The default SQLite3 BEGIN TRANSACTION% does not acquire the write lock on BEGIN nor on SELECT but waits until you try to change data. If the action throws any kind of an exception, the transaction will be rolled back with ROLLBACK TRANSACTION-. Otherwise the results are committed with COMMIT TRANSACTION. sqlite-simple7Run an IO action inside a SQL transaction started with BEGIN EXCLUSIVE TRANSACTION, which immediately blocks all other database connections from writing, and other connections from reading (exception: read_uncommitted connections are allowed to read.) If the action throws any kind of an exception, the transaction will be rolled back with ROLLBACK TRANSACTION,. Otherwise the results are committed with COMMIT TRANSACTION. sqlite-simpleYReturns the rowid of the most recent successful INSERT on the given database connection. See also  2http://www.sqlite.org/c3ref/last_insert_rowid.html. sqlite-simple (http://www.sqlite.org/c3ref/changes.htmlVReturn the number of rows that were changed, inserted, or deleted by the most recent INSERT, DELETE, or UPDATE statement. sqlite-simple .http://www.sqlite.org/c3ref/total_changes.html1Return the total number of row changes caused by INSERT, DELETE, or UPDATE statements since the Database was opened. sqlite-simple7Run an IO action inside a SQL transaction started with BEGIN TRANSACTION\. If the action throws any kind of an exception, the transaction will be rolled back with ROLLBACK TRANSACTION,. Otherwise the results are committed with COMMIT TRANSACTION.n -,+*)('&%$#"! JKL\]^_`n^_`JKL\] -,+*)('&%$#"! 3 None %=?UVXp       !"#$%&'()*+,-./0123456789:;<=>?@@ABACDEFGHIJKLMNOPPQRRSTUUVWWXYZ[\]^_`abcdefghhiijkklmnopqrstuvwxyz{|}~                    !"#$%&'(-sqlite-simple-0.4.17.0-6ppXccQryMrHLQC23DOmqPDatabase.SQLite.Simple.TypesDatabase.SQLite.SimpleDatabase.SQLite.Simple.OkDatabase.SQLite.Simple.Internal*Database.SQLite.Simple.Time.ImplementationDatabase.SQLite.Simple.ToFieldDatabase.SQLite.Simple.ToRowDatabase.SQLite.Simple.QQ Database.SQLite.Simple.FromFieldDatabase.SQLite.Simple.FromRowDatabase.SQLite.Simple.FunctionDatabase.SQLite.Simple.TimePQResultOnly-0.1-IJIAET7WRoQFFeBfrGSvp2Data.Tuple.OnlyfromOnlyOnly+direct-sqlite-2.3.26-3gtWKAaxrI16y1EVdRQQivDatabase.SQLite3SQLNullSQLBlobSQLTextSQLFloat SQLIntegerSQLDatasqlErrorContextsqlErrorDetailssqlErrorSQLErrorDatabase.SQLite3.Bindings.Types ErrorDoneErrorRow ErrorWarning ErrorNoticeErrorNotADatabase ErrorRange ErrorFormatErrorAuthorizationErrorNoLargeFileSupport ErrorMisuse ErrorMismatchErrorConstraint ErrorTooBig ErrorSchema ErrorEmpty ErrorProtocolErrorCan'tOpen ErrorFull ErrorNotFound ErrorCorruptErrorIOErrorInterrupt ErrorReadOnly ErrorNoMemory ErrorLocked ErrorBusy ErrorAbortErrorPermission ErrorInternal ErrorErrorErrorOKError ManyErrorsOkErrors $fMonadFailOk $fMonadOk $fMonadPlusOk$fAlternativeOk$fApplicativeOk$fEqOk$fExceptionManyErrors$fShowOk $fFunctorOk$fShowManyErrors RowParserRPunRP RowParseROnColumnsFieldresultcolumnColumnOutOfBoundserrorColumnIndex ConnectionconnectionHandle gettypename$fExceptionColumnOutOfBounds$fEqColumnOutOfBounds$fShowColumnOutOfBounds$fFunctorRowParser$fApplicativeRowParser$fAlternativeRowParser$fMonadRowParser$fMonadPlusRowParser parseUTCTimeparseDay dayToBuildertimeOfDayToBuildertimeZoneToBuilderutcTimeToBuilder:.Query fromQueryNull$fEqNull $fMonoidQuery$fSemigroupQuery$fIsStringQuery $fReadQuery $fShowQuery $fReadNull $fShowNull $fEqQuery $fOrdQuery$fEq:.$fOrd:.$fShow:.$fRead:.ToFieldtoField $fToFieldDay$fToFieldUTCTime $fToFieldText $fToField[]$fToFieldText0$fToFieldByteString$fToFieldByteString0$fToFieldDouble$fToFieldFloat$fToFieldWord64 $fToFieldWord$fToFieldWord32$fToFieldWord16$fToFieldWord8$fToFieldInteger$fToFieldInt64 $fToFieldInt$fToFieldInt32$fToFieldInt16 $fToFieldInt8 $fToFieldBool $fToFieldNull$fToFieldMaybe$fToFieldSQLDataToRowtoRow $fToRow:. $fToRow[]$fToRow(,,,,,,,,,)$fToRow(,,,,,,,,)$fToRow(,,,,,,,)$fToRow(,,,,,,)$fToRow(,,,,,) $fToRow(,,,,) $fToRow(,,,) $fToRow(,,) $fToRow(,) $fToRowOnly $fToRow()sql FromField fromField FieldParser ResultError IncompatibleUnexpectedNullConversionFailed errSQLTypeerrHaskellType errMessage fieldData returnError$fExceptionResultError$fFromFieldSQLData$fFromFieldDay$fFromFieldUTCTime$fFromFieldByteString$fFromFieldByteString0 $fFromField[]$fFromFieldText$fFromFieldText0$fFromFieldBool$fFromFieldFloat$fFromFieldDouble$fFromFieldWord$fFromFieldWord64$fFromFieldWord32$fFromFieldWord16$fFromFieldWord8$fFromFieldInteger$fFromFieldInt64$fFromFieldInt$fFromFieldInt32$fFromFieldInt16$fFromFieldInt8$fFromFieldNull$fFromFieldMaybe$fEqResultError$fShowResultErrorFromRowfromRow fieldWithfieldnumFieldsRemaining $fFromRow:. $fFromRow[]$fFromRow(,,,,,,,,,)$fFromRow(,,,,,,,,)$fFromRow(,,,,,,,)$fFromRow(,,,,,,)$fFromRow(,,,,,)$fFromRow(,,,,)$fFromRow(,,,) $fFromRow(,,) $fFromRow(,) $fFromRowOnly FormatError fmtMessagefmtQuery fmtParams NamedParam:= ColumnIndex Statement unStatementopenclosewithConnectionsetTracebind bindNamedreset columnName columnCountwithBind openStatementcloseStatement withStatementexecute executeManyqueryquery_ queryWith queryWith_ queryNamedexecute_ executeNamedfoldfold_ foldNamednextRowwithImmediateTransactionwithExclusiveTransactionlastInsertRowIdchanges totalChangeswithTransaction$fShowNamedParam$fExceptionFormatError$fEqColumnIndex$fOrdColumnIndex$fEnumColumnIndex$fNumColumnIndex$fRealColumnIndex$fIntegralColumnIndex$fEqFormatError$fShowFormatErrorFunctioncreateFunctiondeleteFunction $fFunction-> $fFunctionIO $fFunctionappad2pad4++base Data.StringIsStringbytestring-0.10.10.0Data.ByteString.Internal ByteStringData.ByteStringcopydropData.ByteString.Char8 takeWhile GHC.MaybeNothingGHC.IO.ExceptionArrayException