‚S      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdef g h i j klmnopqrstuvwxyz{|}~ @(c) 2012 Leon P Smith (c) 2012-2014 Janne HellstenBSD3#Janne Hellsten <jjhellst@gmail.com>None JK.Output YYYY-MM-DD HH:MM:SS with an optional .SSS fraction part. Explicit timezone attribute is not appended as per SQLite3's datetime conventions.*p assumes its input is in the range [0..9].pad2 assumes its input is in the range [0..99]"pad4 assumes its input is positive)*+,-.)*+,-.)*.+,-)*+,-. @(c) 2012 Leon P Smith (c) 2012-2014 Janne HellstenBSD3#Janne Hellsten <jjhellst@gmail.com>None JK)*+,-.?(c) 2012 Leon P Smith (c) 2012-2013 Janne HellstenBSD3#Janne Hellsten <jjhellst@gmail.com> Safe-Inferred +-JK/;a way to reify a list of exceptions into a single exception9Two 3U cases are considered equal, regardless of what the list of exceptions looks like. /0123456789/0123 13298765/04/0132456789E(c) 2011-2012 Leon P Smith (c) 2012-2013 Janne HellstenBSD3#Janne Hellsten <jjhellst@gmail.com>portableNone +BJK@4A Field represents metadata about a particular fieldGConnection to an open database. You can use I# 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.:;<=>?@ABCDEFGHIJK:;<=>?@ABCDEFGHIJGHIDEFK@ABC=>?:;<J:;<=>?@ABCDEFGHIJKk(c) 2011 MailRank, Inc. (c) 2011-2012 Leon P Smith (c) 2012-2013 Janne HellstenBSD3#Janne Hellsten <jjhellst@gmail.com>portableNone +-BJKLrA 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 .... NA single-value "collection".vThis is useful if you need to supply a single parameter to a SQL query, or extract a single column from a SQL result.Parameter example: ,query c "select x from scores where x > ?" (N (42::Int))Result example: 3xs <- query_ c "select id from users" forM_ xs $ \(N id) -> {- ... -}QA 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.TA placeholder for the SQL NULL value.LMNOPQRSTU LMNOPQRSTU TUNOPQRSLM LMNOPQRSTULMk(c) 2011 MailRank, Inc. (c) 2011-2012 Leon P Smith (c) 2012-2013 Janne HellstenBSD3#Janne Hellsten <jjhellst@gmail.com>portableNone  +-24JKMV-A type that may be converted from a SQL type.W'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 Y, but may be a UnicodeException.Implementations of W* 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 J to avoid such a reference, and that using bytestring functions such as  and * alone will also trigger this memory leak.YJException thrown if conversion from a SQL value to a Haskell value fails.ZThe 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).[A SQL NULL: was encountered when the Haskell type did not permit it.\-The SQL and Haskell types are not compatible.`LReturn the actual SQL data for a database field. This allows user-defined VH instances to access the SQL data associated with a field being parsed.a#Given one of the constructors from Y, the field, and an _v, this fills in the other fields in the exception value and returns it in a 'Left . SomeException' constructor.'VWXYZ[\]^_`a @VWXYZ[\]^_`aVWXY\[Z]^_]^_]^_@`a VWXY \[Z]^_]^_]^_`ak(c) 2011 MailRank, Inc. (c) 2011-2012 Leon P Smith (c) 2012-2013 Janne HellstenBSD3#Janne Hellsten <jjhellst@gmail.com>portableNone  +-24JKb=A type that may be used as a single parameter to a SQL query.c5Prepare a value for substitution into a query string.bcbcbcbck(c) 2011 MailRank, Inc. (c) 2011-2012 Leon P Smith (c) 2012-2013 Janne HellstenBSD3#Janne Hellsten <jjhellst@gmail.com>portableNone JKd4A collection type that can be turned into a list of  elements.eb a collection of values.dededede E(c) 2011-2012 Leon P Smith (c) 2012-2013 Janne HellstenBSD3#Janne Hellsten <jjhellst@gmail.com>portableNone JKfA 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 f$ User where fromRow = User <$> i <*> i @The number of calls to i_ must match the number of fields returned in a single row of the query result. Otherwise, a Z exception will be thrown.BNote the caveats associated with user-defined implementations of g.fghij:fghijfg:ihjfghijk(c) 2011 MailRank, Inc. (c) 2011-2012 Leon P Smith (c) 2012-2013 Janne HellstenBSD3#Janne Hellsten <jjhellst@gmail.com>portableNone  !"+BJKMkException thrown if a Q2 was malformed. This may occur if the number of '?S' characters in the query string does not match the number of parameters provided.r?Index of a column in a result set. Column indices start from 0.tAn SQLite prepared statement.u[Open a database connection to a given file. Will throw an exception if it cannot connect.Every u must be closed with a call to v.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.vClose a database connection.wOpens a database connection, executes an action using this connection, and closes the connection, even in the presence of exceptions.x (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!y/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 .z/Binds named parameters to a prepared statement.{Resets a statement. This does not reset bound parameters, if any, but allows the statement to be reexecuted again by invoking .|AReturn the name of a a particular column in the result set of a t . Throws an & if the colum index is out of bounds. ,http://www.sqlite.org/c3ref/column_name.html}.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 .~eOpens 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 .Closes a prepared statement.Opens a prepared statement, executes an action using this statement, and closes the statement, even in the presence of exceptions. Execute an INSERT, UPDATE=, or other SQL query that is not expected to return results.Throws k/ if the query could not be formatted correctly. 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:k3: the query string mismatched with given arguments.Y: result conversion failed. A version of * that does not perform query substitution. A version of A that does not perform query substitution and takes an explicit :. A version of 6 where the query parameters (placeholders) are named.Example: r <- = c "SELECT * FROM posts WHERE id=:id AND date>=:date" [":id" q postId, ":date" q afterDate]  A version of * that does not perform query substitution. A version of 6 where the query parameters (placeholders) are named. 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:k3: the query string mismatched with given arguments.Y: result conversion failed. A version of / which does not perform parameter substitution. A version of 6 where the query parameters (placeholders) are named.2Extracts the next row from the prepared statement.YReturns the rowid of the most recent successful INSERT on the given database connection. See also  2http://www.sqlite.org/c3ref/last_insert_rowid.html.7Run 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./klmnopqrstuvwxyz{|}~c  !"#$%&'(GHILMNOPQRSYZ[\]^_defgiklmnopqrstuvwxyz{|}~iQRSGHIdefgNOPLMtrspquvwxi~yz{|}klmnoY\[Z]^_]^_]^_ (  !"#$%&'(klmnopqrstuvwxyz{|}~q                   ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 789:;<=>>??@ABCDEFGHIJJKLLMNOOPQQRSTUUVVWXXYZZ[\]^_`abcdefghij k l m n oppqrstuvvwxyz{|}~ w     sqlite-simple-0.4.9.0Database.SQLite.Simple*Database.SQLite.Simple.Time.ImplementationDatabase.SQLite.Simple.OkDatabase.SQLite.Simple.InternalDatabase.SQLite.Simple.Types Database.SQLite.Simple.FromFieldDatabase.SQLite.Simple.ToFieldDatabase.SQLite.Simple.ToRowDatabase.SQLite.Simple.FromRowDatabase.SQLite.Simple.TimePQResultdirect-sqlite-2.3.15Database.SQLite3 SQLIntegerSQLFloatSQLTextSQLBlobSQLNullSQLDatasqlErrorContextsqlErrorDetailssqlErrorSQLErrorDatabase.SQLite3.Bindings.TypesErrorOK ErrorError ErrorInternalErrorPermission ErrorAbort ErrorBusy ErrorLocked ErrorNoMemory ErrorReadOnlyErrorInterruptErrorIO ErrorCorrupt ErrorNotFound ErrorFullErrorCan'tOpen ErrorProtocol ErrorEmpty ErrorSchema ErrorTooBigErrorConstraint ErrorMismatch ErrorMisuseErrorNoLargeFileSupportErrorAuthorization ErrorFormat ErrorRangeErrorNotADatabaseErrorRow ErrorDoneError parseUTCTimeparseDay dayToBuildertimeOfDayToBuildertimeZoneToBuilderutcTimeToBuilder ManyErrorsOkErrors$fExceptionManyErrors $fMonadOk $fMonadPlusOk$fAlternativeOk$fApplicativeOk$fEqOk RowParserRPunRP RowParseROnColumnsFieldresultcolumnColumnOutOfBoundserrorColumnIndex ConnectionconnectionHandle gettypename$fExceptionColumnOutOfBounds:.OnlyfromOnlyQuery fromQueryNull FromField fromField FieldParser ResultErrorConversionFailedUnexpectedNull Incompatible errSQLTypeerrHaskellType errMessage fieldData returnErrorToFieldtoFieldToRowtoRowFromRowfromRow fieldWithfieldnumFieldsRemaining FormatError fmtMessagefmtQuery fmtParams NamedParam:= ColumnIndex StatementopenclosewithConnectionsetTracebind bindNamedreset columnNamewithBind openStatementcloseStatement withStatementexecutequeryquery_ queryWith_ queryNamedexecute_ executeNamedfoldfold_ foldNamednextRowlastInsertRowIdwithTransactionppad2pad4++getDaydecimal getTimeOfDay getTimeZone getUTCTimetoNumdigitdigits showSecondspad6showD6pad3showD3base Data.StringIsString $fMonoidQuery$fIsStringQuery $fReadQuery $fShowQuery$fEqNullbytestring-0.10.4.0Data.ByteString.Internal ByteStringData.ByteStringcopydropData.ByteString.Char8 takeWhilelefttakeInt fieldTypename$fFromFieldDay$fFromFieldUTCTime$fFromFieldByteString$fFromFieldByteString0 $fFromField[]$fFromFieldText$fFromFieldText0$fFromFieldBool$fFromFieldFloat$fFromFieldDouble$fFromFieldWord$fFromFieldWord64$fFromFieldWord32$fFromFieldWord16$fFromFieldWord8$fFromFieldInteger$fFromFieldInt64$fFromFieldInt$fFromFieldInt32$fFromFieldInt16$fFromFieldInt8$fFromFieldNull$fFromFieldMaybe$fExceptionResultError $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() $fFromRow:. $fFromRow[]$fFromRow(,,,,,,,,,)$fFromRow(,,,,,,,,)$fFromRow(,,,,,,,)$fFromRow(,,,,,,)$fFromRow(,,,,,)$fFromRow(,,,,)$fFromRow(,,,) $fFromRow(,,) $fFromRow(,) $fFromRowOnly Data.MaybeNothingGHC.IO.ExceptionArrayExceptionunUtf8withStatementParamswithStatementNamedParams doFoldToListdoFold nextRowWith convertRowfmtErrorgetQuery$fExceptionFormatError$fShowNamedParam