h&83      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ Safe-Inferred!,(c) 2011 MailRank, Inc.BSD3Paul Rouse  experimentalportable Safe-Inferred!5;  mysql-simple-A type that may be converted from a SQL type.A default implementation is provided for any type which is an instance of both  and , providing a simple mechanism for user-defined decoding from text- or blob-like fields (including JSON). mysql-simple'Convert a SQL value to a Haskell value. Throws a  if conversion fails. mysql-simple$A type that can be converted from a 8. Any type which is an instance of this class, and is ), can use the default implementation of . This provides a method of implementing a decoder for any text-like column, such as TEXT, BLOB, or JSON, instead of implementing  directly.-The first component of the tuple returned by ? is a list of acceptable column types, expressed in terms of . mysql-simpleException thrown if conversion from a SQL value to a Haskell value fails. mysql-simple-The SQL and Haskell types are not compatible. mysql-simpleA SQL NULL: was encountered when the Haskell type did not permit it. mysql-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).  (c) 2011 MailRank, Inc.BSD3Paul Rouse  experimentalportable Safe-Inferred57? mysql-simple9Wrap a mostly-binary string to be escaped in hexadecimal.A mysql-simpleWrap a list of values for use in a function with variable arguments. Replaces a single "?>" character with a non-parenthesized list of rendered values.Example: query conn "SELECT * FROM example_table ORDER BY field(f,?)" (Only (VaArgs [3,2,1]))C mysql-simple$Wrap a list of values for use in an IN clause. Replaces a single "?:" character with a parenthesized list of rendered values.Example: query c "select * from whatever where id in ?" (Only (In [3,4,5]))E mysql-simpleA single-value "collection".This 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 > ?" (E (42::Int))Result example: 3xs <- query_ c "select id from users" forM_ xs $ \(E id) -> {- ... -}H mysql-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 OverloadedStrings language extension and then simply write the query in double quotes. {-# LANGUAGE OverloadedStrings #-} import Database.MySQL.Simple q :: Query q = "select ?"The underlying type is a , and literal Haskell strings that contain Unicode characters will be correctly transformed to UTF-8.K mysql-simpleA placeholder for the SQL NULL value.?@ABCDEFGHIJKLKLEFGCDAB?@HIJ(c) 2011 MailRank, Inc.BSD3Paul Rouse  experimentalportable Safe-Inferred!6k mysql-simple?A collection type that can be converted from a list of strings.Instances should use the  method of the  class to perform conversion of each element of the collection.This example instance demonstrates how to convert a two-column row into a Haskell pair. Each field in the metadata is paired up with each value from the row, and the two are passed to .  instance ( a,  b) => k (a,b) where l, [fa,fb] [va,vb] = (a,b) where !a =  fa va !b =  fb vb l fs vs = m fs vs 2 Notice that this instance evaluates each element to WHNF before constructing the pair. By doing this, we guarantee two important properties:Keep resource usage under control by preventing the construction of potentially long-lived thunks.Ensure that any  that might arise is thrown immediately, rather than some place later in application code that cannot handle it.You can also declare Haskell types of your own to be instances of k. data User = User { firstName :: String, lastName :: String } instance k User where l [fa,fb] [va,vb] = User  $ a  * b where !a =  fa va !b =  fb vb l fs vs = m fs vs 2 l mysql-simple4Convert values from a row into a Haskell collection.This function will throw a ( if conversion of the collection fails.m mysql-simpleThrow a  exception, indicating a mismatch between the number of columns in the ? and row, and the number in the collection to be converted to.m mysql-simple&Descriptors of fields to be converted. mysql-simple$Contents of the row to be converted. mysql-simpleNumber of columns expected for conversion. For instance, if converting to a 3-tuple, the number to provide here would be 3.klmklm(c) 2011 MailRank, Inc.BSD3Paul Rouse  experimentalportable Safe-Inferred!57; mysql-simple=A type that may be used as a single parameter to a SQL query.A default implementation is provided for any type which is an instance of , providing a simple mechanism for user-defined encoding to text- or blob-like fields (including JSON). mysql-simple5Prepare a value for substitution into a query string. mysql-simple"A type that can be converted to a ) for use as a parameter to an SQL query.Any type which is an instance of this class can use the default implementation of !, which will wrap encodings with . mysql-simple;How to render an element when substituting it into a query. mysql-simpleRender without escaping or quoting. Use for non-text types such as numbers, when you are certain that they will not introduce formatting vulnerabilities via use of characters such as spaces or "'". mysql-simpleEscape and enclose in quotes before substituting. Use for all text-like types, and anything else that may contain unsafe characters when rendered. mysql-simple*Concatenate a series of rendering actions. mysql-simple1Surround a string with single-quote characters: "'"This function does not perform any other escaping.  (c) 2011 MailRank, Inc.BSD3Paul Rouse  experimentalportable Safe-Inferred e mysql-simple?A collection type that can be turned into a list of rendering s.Instances should use the  method of the  class to perform conversion of each element of the collection. mysql-simpleRender a collection of values.(c) 2011 MailRank, Inc.BSD3Paul Rouse  experimentalportable Safe-Inferred!53 mysql-simpleException thrown if  is used to perform an INSERT-like operation, or  is used to perform a SELECT-like operation. mysql-simpleException thrown if a H could not be formatted correctly. This may occur if the number of '?' characters in the query string does not match the number of parameters provided. mysql-simpleFormat a query string.This function is exposed to help with debugging and logging. Do not use it to prepare queries for execution.String parameters are escaped according to the character set in use on the .Throws 7 if the query string could not be formatted correctly. mysql-simple5Format a query string with a variable number of rows.This function is exposed to help with debugging and logging. Do not use it to prepare queries for execution.The query string must contain exactly one substitution group, identified by the SQL keyword "VALUES&" (case insensitive) followed by an "(&" character, a series of one or more "?*" characters separated by commas, and a ")?" character. White space in a substitution group is permitted.Throws 7 if the query string could not be formatted correctly. mysql-simple*Split a query into fragments separated by ? characters. Does not break a fragment if the question mark is in a string literal. mysql-simple Execute an INSERT, UPDATE=, or other SQL query that is not expected to return results.$Returns the number of rows affected.Throws / if the query could not be formatted correctly. mysql-simple A version of * that does not perform query substitution. mysql-simpleExecute a multi-row INSERT, UPDATE=, or other SQL query that is not expected to return results.$Returns the number of rows affected.Throws / if the query could not be formatted correctly. mysql-simple Perform a SELECT or other SQL query that is expected to return results. All results are retrieved and converted before this function returns.When processing large results, this function will consume a lot of client-side memory. Consider using  instead.Exceptions that may be thrown:4: the query string could not be formatted correctly.>: the result contains no columns (i.e. you should be using  instead of ).: result conversion failed. mysql-simple A version of * that does not perform query substitution. mysql-simple Perform a SELECT or other SQL query that is expected to return results. Results are streamed incrementally from the server, and consumed via a left fold.The result consumer must be carefully written to execute quickly. If the consumer is slow, server resources will be tied up, and other clients may not be able to update the tables from which the results are being streamed.When dealing with small results, it may be simpler (and perhaps faster) to use  instead. This fold is not strict. The stream consumer is responsible for forcing the evaluation of its result to avoid space leaks.Exceptions that may be thrown:4: the query string could not be formatted correctly.>: the result contains no columns (i.e. you should be using  instead of ).: result conversion failed. mysql-simple A version of * that does not perform query substitution. mysql-simple A version of ' that does not transform a state value. mysql-simple A version of * that does not perform query substitution. mysql-simple+Execute an action inside a SQL transaction..This function initiates a transaction with a "begin transaction" statement, then executes the supplied action. If the action succeeds, the transaction will be completed with  before this function returns.If the action throws any kind of exception (not just a MySQL-related exception), the transaction will be rolled back using &, then the exception will be rethrown. mysql-simpleQuery template. mysql-simpleQuery parameters. mysql-simple"Initial state for result consumer. mysql-simpleResult consumer. mysql-simpleQuery. mysql-simple"Initial state for result consumer. mysql-simpleResult consumer. mysql-simpleQuery template. mysql-simpleQuery parameters. mysql-simpleResult consumer. mysql-simpleQuery template. mysql-simpleResult consumer.: ?@ABCDEFGH: HCDAB?@EFG                   !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHHIIJJKKLMMNOOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~)mysql-simple-0.4.9-CURcR1PYrDoIuP9VQVEMT4Database.MySQL.SimpleDatabase.MySQL.Simple.ResultDatabase.MySQL.Simple.Types"Database.MySQL.Simple.QueryResultsDatabase.MySQL.Simple.Param!Database.MySQL.Simple.QueryParamsDatabase.MySQL.Internal.Blaze"mysql-0.2.1-CN3VKNiWZ9x27a43GbWETfDatabase.MySQL.BaserollbackcommitinsertID autocommitcloseconnectdefaultConnectInfo connectSSL connectPathconnectOptionsconnectDatabaseconnectPassword connectUser connectPort connectHost ConnectInfo ConnectionResultconvert FromField fromField ResultError IncompatibleUnexpectedNullConversionFailed errSQLTypeerrHaskellType errFieldName errMessage$fExceptionResultError$fFromFieldTimeOfDay$fFromFieldUTCTime$fResultTimeOfDay $fResultDay$fResultUTCTime $fResult[] $fResultText $fResultText0$fResultByteString$fResultByteString0 $fResultRatio$fResultDouble $fResultFloat$fResultWord64 $fResultWord$fResultWord32$fResultWord16 $fResultWord8$fResultInteger $fResultInt64 $fResultInt $fResultInt32 $fResultInt16 $fResultInt8 $fResultBool $fResultMaybe$fMonadFailFailable$fFunctorFailable$fApplicativeFailable$fMonadFailable$fEqResultError$fShowResultErrorBinaryVaArgsInOnlyfromOnlyQuery fromQueryNull$fEqNull $fMonoidQuery$fSemigroupQuery$fIsStringQuery $fReadQuery $fShowQuery $fEqBinary $fOrdBinary $fReadBinary $fShowBinary$fFunctorBinary $fEqVaArgs $fOrdVaArgs $fReadVaArgs $fShowVaArgs$fFunctorVaArgs$fEqIn$fOrdIn$fReadIn$fShowIn $fFunctorIn$fEqOnly $fOrdOnly $fReadOnly $fShowOnly $fFunctorOnly $fEqQuery $fOrdQuery $fReadNull $fShowNull QueryResultsconvertResults convertError'$fQueryResults(,,,,,,,,,,,,,,,,,,,,,,,)&$fQueryResults(,,,,,,,,,,,,,,,,,,,,,,)%$fQueryResults(,,,,,,,,,,,,,,,,,,,,,)$$fQueryResults(,,,,,,,,,,,,,,,,,,,,)#$fQueryResults(,,,,,,,,,,,,,,,,,,,)"$fQueryResults(,,,,,,,,,,,,,,,,,,)!$fQueryResults(,,,,,,,,,,,,,,,,,) $fQueryResults(,,,,,,,,,,,,,,,,)$fQueryResults(,,,,,,,,,,,,,,,)$fQueryResults(,,,,,,,,,,,,,,)$fQueryResults(,,,,,,,,,,,,,)$fQueryResults(,,,,,,,,,,,,)$fQueryResults(,,,,,,,,,,,)$fQueryResults(,,,,,,,,,,)$fQueryResults(,,,,,,,,,)$fQueryResults(,,,,,,,,)$fQueryResults(,,,,,,,)$fQueryResults(,,,,,,)$fQueryResults(,,,,,)$fQueryResults(,,,,)$fQueryResults(,,,)$fQueryResults(,,)$fQueryResults(,)$fQueryResultsOnlyParamrenderToFieldtoFieldActionPlainEscapeManyinQuotes $fShowAction$fParamTimeOfDay $fParamDay$fParamUTCTime $fParamText $fParam[] $fParamText0$fParamByteString$fParamByteString0 $fParamDouble $fParamFloat $fParamWord64 $fParamWord $fParamWord32 $fParamWord16 $fParamWord8$fParamInteger $fParamInt64 $fParamInt $fParamInt32 $fParamInt16 $fParamInt8 $fParamBool $fParamNull $fParamBinary$fParamBinary0 $fParamVaArgs $fParamIn $fParamIn0 $fParamMaybe $fParamAction QueryParams renderParams$fQueryParams[]&$fQueryParams(,,,,,,,,,,,,,,,,,,,,,,,)%$fQueryParams(,,,,,,,,,,,,,,,,,,,,,,)$$fQueryParams(,,,,,,,,,,,,,,,,,,,,,)#$fQueryParams(,,,,,,,,,,,,,,,,,,,,)"$fQueryParams(,,,,,,,,,,,,,,,,,,,)!$fQueryParams(,,,,,,,,,,,,,,,,,,) $fQueryParams(,,,,,,,,,,,,,,,,,)$fQueryParams(,,,,,,,,,,,,,,,,)$fQueryParams(,,,,,,,,,,,,,,,)$fQueryParams(,,,,,,,,,,,,,,)$fQueryParams(,,,,,,,,,,,,,)$fQueryParams(,,,,,,,,,,,,)$fQueryParams(,,,,,,,,,,,)$fQueryParams(,,,,,,,,,,)$fQueryParams(,,,,,,,,,)$fQueryParams(,,,,,,,,)$fQueryParams(,,,,,,,)$fQueryParams(,,,,,,)$fQueryParams(,,,,,)$fQueryParams(,,,,)$fQueryParams(,,,)$fQueryParams(,,)$fQueryParams(,)$fQueryParamsOnly$fQueryParams() QueryError qeMessageqeQuery FormatError fmtMessagefmtQuery fmtParams formatQuery formatMany splitQueryexecuteexecute_ executeManyqueryquery_foldfold_forEachforEach_withTransaction$fExceptionFormatError$fExceptionQueryError$fEqQueryError$fShowQueryError$fEqFormatError$fShowFormatErrorintegralfloatdoublebaseData.Typeable.InternalTypeablebytestring-0.10.12.1Data.ByteString.Internal ByteStringDatabase.MySQL.Base.TypesType Data.StringIsStringField