HDBC 1.0.1 → 1.1.3
raw patch · 45 files changed
+651/−10989 lines, 45 filessetup-changednew-uploader
Files
- COPYRIGHT +1/−1
- Database/HDBC.hs +24/−17
- Database/HDBC/Statement.hs +482/−0
- Database/HDBC/Types.hs +59/−462
- Database/HDBC/Utils.hs +70/−5
- HDBC.cabal +14/−4
- Makefile +0/−11
- Memory.txt +0/−24
- README.txt +0/−39
- Setup.lhs +1/−1
- debian/README.Debian +0/−15
- debian/changelog +0/−39
- debian/compat +0/−1
- debian/control +0/−41
- debian/copyright +0/−27
- debian/hdbc.doc-base.EX +0/−22
- debian/rules +0/−147
- doc/Database-HDBC-ColTypes.html +0/−1232
- doc/Database-HDBC-DriverUtils.html +0/−253
- doc/Database-HDBC-Types.html +0/−1799
- doc/Database-HDBC.html +0/−3433
- doc/doc-index-A.html +0/−126
- doc/doc-index-C.html +0/−224
- doc/doc-index-D.html +0/−168
- doc/doc-index-E.html +0/−138
- doc/doc-index-F.html +0/−188
- doc/doc-index-G.html +0/−138
- doc/doc-index-H.html +0/−154
- doc/doc-index-I.html +0/−128
- doc/doc-index-N.html +0/−128
- doc/doc-index-O.html +0/−128
- doc/doc-index-P.html +0/−148
- doc/doc-index-Q.html +0/−126
- doc/doc-index-R.html +0/−138
- doc/doc-index-S.html +0/−748
- doc/doc-index-T.html +0/−128
- doc/doc-index-W.html +0/−126
- doc/doc-index.html +0/−112
- doc/haddock.css +0/−235
- doc/haddock.js +0/−15
- doc/haskell_icon.gif binary
- doc/hdbc.interface binary
- doc/index.html +0/−120
- doc/minus.gif binary
- doc/plus.gif binary
COPYRIGHT view
@@ -1,4 +1,4 @@-Copyright (C) 2005 John Goerzen <jgoerzen@complete.org>+Copyright (C) 2005-2007 John Goerzen <jgoerzen@complete.org> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public
Database/HDBC.hs view
@@ -19,7 +19,7 @@ {- | Module : Database.HDBC- Copyright : Copyright (C) 2005-2006 John Goerzen+ Copyright : Copyright (C) 2005-2007 John Goerzen License : GNU LGPL, version 2.1 or above Maintainer : John Goerzen <jgoerzen@complete.org>@@ -46,9 +46,12 @@ SqlValue(..), -- * Database Connections- Connection, disconnect, clone,+ IConnection,+ disconnect, clone,+ -- ** Wrapped Connections+ ConnWrapper, withWConn, -- ** Preparing Queries- run, sRun, prepare, quickQuery,+ run, sRun, prepare, quickQuery', quickQuery, -- ** Transaction Handling -- $transactions@@ -64,9 +67,10 @@ -- ** Execution execute, sExecute, executeMany, sExecuteMany, -- ** Fetching Results- fetchRow, fetchRowAL, fetchRowMap,- sFetchRow, fetchAllRows, fetchAllRowsAL, fetchAllRowsMap,- sFetchAllRows, getColumnNames,+ fetchRow, fetchRowAL, fetchRowMap, sFetchRow, + fetchAllRows, fetchAllRows', fetchAllRowsAL, fetchAllRowsAL',+ fetchAllRowsMap, fetchAllRowsMap', sFetchAllRows, sFetchAllRows',+ getColumnNames, -- ** Statement Inquires describeResult, -- ** Miscellaneous@@ -93,9 +97,12 @@ import Database.HDBC.Utils(catchSql, handleSql, sqlExceptions, handleSqlError, withTransaction, sFetchAllRows, fetchAllRows,+ sFetchAllRows', fetchAllRows', sRun, sExecute, sExecuteMany, sFetchRow, quickQuery, fetchRowMap, fetchAllRowsMap,- fetchRowAL, fetchAllRowsAL)+ quickQuery', fetchAllRowsMap',+ fetchRowAL, fetchAllRowsAL,+ fetchAllRowsAL') import Database.HDBC.Types import Database.HDBC.ColTypes @@ -153,30 +160,30 @@ Here is a list of known drivers as of March 28, 2006: -[@Sqlite v3@] Available from <http://quux.org/devel/hdbc>. Or, to+[@Sqlite v3@] Available from <http://software.complete.org/hdbc-sqlite3>. Or, to participate in development, use @darcs get --partial <http://darcs.complete.org/hdbc-sqlite3>@ -[@PostgreSQL@] Available from <http://quux.org/devel/hdbc>. Or, to+[@PostgreSQL@] Available from <http://software.complete.org/hdbc-postgresql>. Or, to participate in development, use @darcs get --partial <http://darcs.complete.org/hdbc-postgresql>@ -[@ODBC@] Available from <http://quux.org/devel/hdbc>. Or, to+[@ODBC@] Available from <http://software.complete.org/hdbc-odbc>. Or, to partitipace in development, use @darcs get --partial <http://darcs.complete.org/hdbc-odbc>@ [@MySQL@] MySQL users are encouraged to use the ODBC driver, which works and has been tested against MySQL on both Linux\/Unix and Windows platforms. -In addition, there is one integration package: /hdbc-missingh/. This-integrates with the MissingH library <http://quux.org/devel/missingh>.-Among other things, it lets any HDBC database act as a backend for the-AnyDBM interface. Available from <http://quux.org/devel/hdbc>. Or,+In addition, there is one integration package: /hdbc-anydbm/. This+integrates with the AnyDBM library <http://software.complete.org/anydbm>.+It lets any HDBC database act as a backend for the+AnyDBM interface. Available from <http://software.complete.org/hdbc-anydbm>. Or, to participate in development, use-@darcs get --partial <http://darcs.complete.org/hdbc-missingh>@+@darcs get --partial <http://darcs.complete.org/hdbc-anydbm>@ The latest version of HDBC itself is available from-<http://quux.org/devel/hdbc>. Or, to participate in development, use+<http://software.complete.org/hdbc>. Or, to participate in development, use @darcs get --partial <http://darcs.complete.org/hdbc>@. -} @@ -248,7 +255,7 @@ -} {- $legal-Copyright (C) 2005-2006 John Goerzen <jgoerzen@complete.org>+Copyright (C) 2005-2007 John Goerzen <jgoerzen@complete.org> This library is free software; you can redistribute it and\/or modify it under the terms of the GNU Lesser General Public
+ Database/HDBC/Statement.hs view
@@ -0,0 +1,482 @@+module Database.HDBC.Statement+ (+ Statement(..),+ SqlError(..),+ SqlType(..), nToSql, iToSql,+ SqlValue(..)+ )++where+import Data.Dynamic+import qualified Data.ByteString as B+import Data.Char(ord,toUpper)+import Data.Word+import Data.Int+import System.Time+import Database.HDBC.ColTypes++data Statement = Statement+ {+ {- | Execute the prepared statement, passing in the given positional+ parameters (that should take the place of the question marks+ in the call to 'prepare').++ For non-SELECT queries, the return value is the number of+ rows modified, if known. If no rows were modified, you get 0.+ If the value is unknown, you get -1. All current HDBC drivers+ support this function and should never return -1.++ For SELECT queries, you will always get 0.++ This function should automatically call finish() to finish the previous+ execution, if necessary.+ -}+ execute :: [SqlValue] -> IO Integer,++ {- | Execute the query with many rows. + The return value is the return value from the final row + as if you had called 'execute' on it.++ Due to optimizations that are possible due to different+ databases and driver designs, this can often be significantly+ faster than using 'execute' multiple times since queries+ need to be compiled only once.++ This is most useful for non-SELECT statements. -}+ executeMany :: [[SqlValue]] -> IO (),+ + {- | Abort a query in progress -- usually not needed. -}+ finish :: IO (),++ {- | Fetches one row from the DB. Returns 'Nothing' if there+ are no more rows. Will automatically call 'finish' when+ the last row is read. -}+ fetchRow :: IO (Maybe [SqlValue]),++ {- | Returns a list of the column names in the result.+ For maximum portability, you should not assume that+ information is available until after an 'execute' function+ has been run.+ + Information is returned here directly as returned+ by the underlying database layer. Note that different+ databases have different rules about capitalization+ of return values and about representation of names+ of columns that are not simple columns. For this reason,+ it is suggested that you treat this information for+ display purposes only. Failing that, you should convert+ to lower (or upper) case, and use @AS@ clauses for+ anything other than simple columns.++ A simple getColumnNames implementation could simply+ apply @map fst@ to the return value of 'describeResult'.+ -}+ getColumnNames :: IO [String],+++ {- | The original query that this 'Statement' was prepared+ with. -}+ originalQuery :: String,+ {- | Obtain information about the columns in the result set.+ Must be run only after 'execute'. The String in the result+ set is the column name.++ You should expect this to be returned in the same manner+ as a result from 'Database.HDBC.fetchAllRows''.++ All results should be converted to lowercase for you+ before you see them.++ Please see caveats under 'getColumnNames' for information+ on the column name field here.+ -}+ describeResult :: IO [(String, SqlColDesc)]+ }++{- | The main HDBC exception object. As much information as possible+is passed from the database through to the application through this object.++Errors generated in the Haskell layer will have seNativeError set to -1.+-}+data SqlError = SqlError {seState :: String,+ seNativeError :: Int,+ seErrorMsg :: String}+ deriving (Eq, Show, Read)++sqlErrorTc :: TyCon+sqlErrorTc = mkTyCon "Database.HDBC.SqlError"++instance Typeable SqlError where+ typeOf _ = mkTyConApp sqlErrorTc []++{- | Conversions to and from 'SqlValue's and standard Haskell types.++Conversions are powerful; for instance, you can call 'fromSql' on a SqlInt32+and get a String or a Double out of it. This class attempts to Do+The Right Thing whenever possible, and will raise an error when asked to+do something incorrect. In particular, when converting to any type+except a Maybe, 'SqlNull' as the input will cause an error to be raised.++Here are some notes about conversion:++ * Fractions of a second are not preserved on time values++See also 'nToSql', 'iToSql'.+-}++class (Show a) => SqlType a where+ toSql :: a -> SqlValue+ fromSql :: SqlValue -> a++{- | Converts any Integral type to a 'SqlValue' by using toInteger. -}+nToSql :: Integral a => a -> SqlValue+nToSql n = SqlInteger (toInteger n)++{- | Convenience function for using numeric literals in your program. -}+iToSql :: Int -> SqlValue+iToSql = toSql++{- | The main type for expressing Haskell values to SQL databases.++This type is used to marshall Haskell data to and from database APIs.+HDBC driver interfaces will do their best to use the most accurate and+efficient way to send a particular value to the database server.++Values read back from the server are put in the most appropriate 'SqlValue'+type. 'fromSql' can then be used to convert them into whatever type+is needed locally in Haskell.++Most people will use 'toSql' and 'fromSql' instead of manipulating+'SqlValue's directly.++The default representation of time values is an integer number of seconds.+Databases such as PostgreSQL with builtin timestamp types can will see+automatic conversion between these Haskell types to local types. Other+databases can just use an int or a string. ++This behavior also exists for other types. For instance, many databases don't+have a Rational type, so they'll just use Haskell's show function and+store a Rational as a string.++Two SqlValues are considered to be equal if one of these hold (first one that+is true holds; if none are true, they are not equal):+ * Both are NULL+ * Both represent the same type and the encapsulated values are equal+ * The values of each, when converted to a string, are equal. -}+data SqlValue = SqlString String + | SqlByteString B.ByteString+ | SqlWord32 Word32+ | SqlWord64 Word64+ | SqlInt32 Int32+ | SqlInt64 Int64+ | SqlInteger Integer+ | SqlChar Char+ | SqlBool Bool+ | SqlDouble Double+ | SqlRational Rational+ | SqlEpochTime Integer -- ^ Representation of ClockTime or CalendarTime+ | SqlTimeDiff Integer -- ^ Representation of TimeDiff+ | SqlNull -- ^ NULL in SQL or Nothing in Haskell+ deriving (Show)++instance Eq SqlValue where+ SqlString a == SqlString b = a == b+ SqlByteString a == SqlByteString b = a == b+ SqlWord32 a == SqlWord32 b = a == b+ SqlWord64 a == SqlWord64 b = a == b+ SqlInt32 a == SqlInt32 b = a == b+ SqlInt64 a == SqlInt64 b = a == b+ SqlInteger a == SqlInteger b = a == b+ SqlChar a == SqlChar b = a == b+ SqlBool a == SqlBool b = a == b+ SqlDouble a == SqlDouble b = a == b+ SqlRational a == SqlRational b = a == b+ SqlEpochTime a == SqlEpochTime b = a == b+ SqlTimeDiff a == SqlTimeDiff b = a == b+ SqlNull == SqlNull = True+ SqlNull == _ = False+ _ == SqlNull = False+ a == b = ((fromSql a)::String) == ((fromSql b)::String)++instance SqlType String where+ toSql = SqlString+ fromSql (SqlString x) = x+ fromSql (SqlByteString x) = byteString2String x+ fromSql (SqlInt32 x) = show x+ fromSql (SqlInt64 x) = show x+ fromSql (SqlWord32 x) = show x+ fromSql (SqlWord64 x) = show x+ fromSql (SqlInteger x) = show x+ fromSql (SqlChar x) = [x]+ fromSql (SqlBool x) = show x+ fromSql (SqlDouble x) = show x+ fromSql (SqlRational x) = show x+ fromSql (SqlEpochTime x) = show x+ fromSql (SqlTimeDiff x) = show x+ fromSql (SqlNull) = error "fromSql: cannot convert SqlNull to String"++instance SqlType B.ByteString where+ toSql = SqlByteString+ fromSql (SqlByteString x) = x+ fromSql (SqlNull) = error "fromSql: cannot convert SqlNull to ByteString"+ fromSql x = (string2ByteString . fromSql) x++string2ByteString :: String -> B.ByteString+string2ByteString = B.pack . map (toEnum . fromEnum)++instance SqlType Int where+ toSql x = SqlInt32 (fromIntegral x)+ fromSql (SqlString x) = read' x+ fromSql (SqlByteString x) = (read' . byteString2String) x+ fromSql (SqlInt32 x) = fromIntegral x+ fromSql (SqlInt64 x) = fromIntegral x+ fromSql (SqlWord32 x) = fromIntegral x+ fromSql (SqlWord64 x) = fromIntegral x+ fromSql (SqlInteger x) = fromIntegral x+ fromSql (SqlChar x) = ord x+ fromSql (SqlBool x) = if x then 1 else 0+ fromSql (SqlDouble x) = truncate $ x+ fromSql (SqlRational x) = truncate $ x+ fromSql (SqlEpochTime x) = fromIntegral x+ fromSql (SqlTimeDiff x) = fromIntegral x+ fromSql (SqlNull) = error "fromSql: cannot convert SqlNull to Int"++instance SqlType Int32 where+ toSql = SqlInt32+ fromSql (SqlString x) = read' x+ fromSql (SqlByteString x) = (read' . byteString2String) x+ fromSql (SqlInt32 x) = x+ fromSql (SqlInt64 x) = fromIntegral x+ fromSql (SqlWord32 x) = fromIntegral x+ fromSql (SqlWord64 x) = fromIntegral x+ fromSql (SqlInteger x) = fromIntegral x+ fromSql (SqlChar x) = fromIntegral $ ord x+ fromSql (SqlBool x) = if x then 1 else 0+ fromSql (SqlDouble x) = truncate $ x+ fromSql (SqlRational x) = truncate $ x+ fromSql (SqlEpochTime x) = fromIntegral x+ fromSql (SqlTimeDiff x) = fromIntegral x+ fromSql (SqlNull) = error "fromSql: cannot convert SqlNull to Int32"++instance SqlType Int64 where+ toSql = SqlInt64+ fromSql (SqlString x) = read' x+ fromSql (SqlByteString x) = (read' . byteString2String) x+ fromSql (SqlInt32 x) = fromIntegral x+ fromSql (SqlInt64 x) = x+ fromSql (SqlWord32 x) = fromIntegral x+ fromSql (SqlWord64 x) = fromIntegral x+ fromSql (SqlInteger x) = fromIntegral x+ fromSql (SqlChar x) = fromIntegral $ ord x+ fromSql (SqlBool x) = if x then 1 else 0+ fromSql (SqlDouble x) = truncate $ x+ fromSql (SqlRational x) = truncate $ x+ fromSql (SqlEpochTime x) = fromIntegral x+ fromSql (SqlTimeDiff x) = fromIntegral x+ fromSql (SqlNull) = error "fromSql: cannot convert SqlNull to Int64"++instance SqlType Word32 where+ toSql = SqlWord32+ fromSql (SqlString x) = read' x+ fromSql (SqlByteString x) = (read' . byteString2String) x+ fromSql (SqlInt32 x) = fromIntegral x+ fromSql (SqlInt64 x) = fromIntegral x+ fromSql (SqlWord32 x) = x+ fromSql (SqlWord64 x) = fromIntegral x+ fromSql (SqlInteger x) = fromIntegral x+ fromSql (SqlChar x) = fromIntegral $ ord x+ fromSql (SqlBool x) = if x then 1 else 0+ fromSql (SqlDouble x) = truncate $ x+ fromSql (SqlRational x) = truncate $ x+ fromSql (SqlEpochTime x) = fromIntegral x+ fromSql (SqlTimeDiff x) = fromIntegral x+ fromSql (SqlNull) = error "fromSql: cannot convert SqlNull to Word32"++instance SqlType Word64 where+ toSql = SqlWord64+ fromSql (SqlString x) = read' x+ fromSql (SqlByteString x) = (read' . byteString2String) x+ fromSql (SqlInt32 x) = fromIntegral x+ fromSql (SqlInt64 x) = fromIntegral x+ fromSql (SqlWord32 x) = fromIntegral x+ fromSql (SqlWord64 x) = x+ fromSql (SqlInteger x) = fromIntegral x+ fromSql (SqlChar x) = fromIntegral (ord x)+ fromSql (SqlBool x) = if x then 1 else 0+ fromSql (SqlDouble x) = truncate $ x+ fromSql (SqlRational x) = truncate $ x+ fromSql (SqlEpochTime x) = fromIntegral x+ fromSql (SqlTimeDiff x) = fromIntegral x+ fromSql (SqlNull) = error "fromSql: cannot convert SqlNull to Int64"++instance SqlType Integer where+ toSql = SqlInteger+ fromSql (SqlString x) = read' x+ fromSql (SqlByteString x) = (read' . byteString2String) x+ fromSql (SqlInt32 x) = fromIntegral x+ fromSql (SqlInt64 x) = fromIntegral x+ fromSql (SqlWord32 x) = fromIntegral x+ fromSql (SqlWord64 x) = fromIntegral x+ fromSql (SqlInteger x) = x+ fromSql (SqlChar x) = fromIntegral (ord x)+ fromSql (SqlBool x) = if x then 1 else 0+ fromSql (SqlDouble x) = truncate $ x+ fromSql (SqlRational x) = truncate $ x+ fromSql (SqlEpochTime x) = x+ fromSql (SqlTimeDiff x) = x+ fromSql (SqlNull) = error "fromSql: cannot convert SqlNull to Integer"++instance SqlType Bool where+ toSql = SqlBool+ fromSql (SqlString x) = + case map toUpper x of+ "TRUE" -> True+ "T" -> True+ "FALSE" -> False+ "F" -> False+ _ -> error $ "fromSql: cannot convert SqlString " + ++ show x ++ " to Bool"+ fromSql (SqlByteString x) = (fromSql . SqlString . byteString2String) x+ fromSql (SqlInt32 x) = numToBool x+ fromSql (SqlInt64 x) = numToBool x+ fromSql (SqlWord32 x) = numToBool x+ fromSql (SqlWord64 x) = numToBool x+ fromSql (SqlInteger x) = numToBool x+ fromSql (SqlChar x) = numToBool (ord x)+ fromSql (SqlBool x) = x+ fromSql (SqlDouble x) = numToBool x+ fromSql (SqlRational x) = numToBool x+ fromSql (SqlEpochTime x) = numToBool x+ fromSql (SqlTimeDiff x) = numToBool x+ fromSql (SqlNull) = error "fromSql: cannot convert SqlNull to Bool"++numToBool :: Num a => a -> Bool+numToBool x = x /= 0++instance SqlType Char where+ toSql = SqlChar+ fromSql (SqlString [x]) = x+ fromSql (SqlByteString x) = (head . byteString2String) x+ fromSql (SqlString _) = error "fromSql: cannot convert SqlString to Char"+ fromSql (SqlInt32 _) = error "fromSql: cannot convert SqlInt32 to Char"+ fromSql (SqlInt64 _) = error "fromSql: cannot convert SqlInt64 to Char"+ fromSql (SqlWord32 _) = error "fromSql: cannot convert SqlWord32 to Char"+ fromSql (SqlWord64 _) = error "fromSql: cannot convert SqlWord64 to Char"+ fromSql (SqlInteger _) = error "fromSql: cannot convert SqlInt to Char"+ fromSql (SqlChar x) = x+ fromSql (SqlBool x) = if x then '1' else '0'+ fromSql (SqlDouble _) = error "fromSql: cannot convert SqlDouble to Char"+ fromSql (SqlRational _) = error "fromSql: cannot convert SqlRational to Char"+ fromSql (SqlEpochTime _) = error "fromSql: cannot convert SqlEpochTime to Char"+ fromSql (SqlTimeDiff _) = error "fromSql: cannot convert SqlTimeDiff to Char"+ fromSql (SqlNull) = error "fromSql: cannot convert SqlNull to Char"++instance SqlType Double where+ toSql = SqlDouble+ fromSql (SqlString x) = read' x+ fromSql (SqlByteString x) = (read' . byteString2String) x+ fromSql (SqlInt32 x) = fromIntegral x+ fromSql (SqlInt64 x) = fromIntegral x+ fromSql (SqlWord32 x) = fromIntegral x+ fromSql (SqlWord64 x) = fromIntegral x+ fromSql (SqlInteger x) = fromIntegral x+ fromSql (SqlChar x) = fromIntegral . ord $ x+ fromSql (SqlBool x) = if x then 1.0 else 0.0+ fromSql (SqlDouble x) = x+ fromSql (SqlRational x) = fromRational x+ fromSql (SqlEpochTime x) = fromIntegral x+ fromSql (SqlTimeDiff x) = fromIntegral x+ fromSql (SqlNull) = error "fromSql: cannot convert SqlNull to Double"++instance SqlType Rational where+ toSql = SqlRational+ fromSql (SqlString x) = read' x+ fromSql (SqlByteString x) = (read' . byteString2String) x+ fromSql (SqlInt32 x) = fromIntegral x+ fromSql (SqlInt64 x) = fromIntegral x+ fromSql (SqlWord32 x) = fromIntegral x+ fromSql (SqlWord64 x) = fromIntegral x+ fromSql (SqlInteger x) = fromIntegral x+ fromSql (SqlChar x) = fromIntegral . ord $ x+ fromSql (SqlBool x) = fromIntegral $ ((fromSql (SqlBool x))::Int)+ fromSql (SqlDouble x) = toRational x+ fromSql (SqlRational x) = x+ fromSql (SqlEpochTime x) = fromIntegral x+ fromSql (SqlTimeDiff x) = fromIntegral x+ fromSql (SqlNull) = error "fromSql: cannot convert SqlNull to Double"++instance SqlType ClockTime where+ toSql (TOD x _) = SqlEpochTime x+ fromSql (SqlString x) = TOD (read' x) 0+ fromSql (SqlByteString x) = TOD ((read' . byteString2String) x) 0+ fromSql (SqlInt32 x) = TOD (fromIntegral x) 0+ fromSql (SqlInt64 x) = TOD (fromIntegral x) 0+ fromSql (SqlWord32 x) = TOD (fromIntegral x) 0+ fromSql (SqlWord64 x) = TOD (fromIntegral x) 0+ fromSql (SqlInteger x) = TOD x 0+ fromSql (SqlChar _) = error "fromSql: cannot convert SqlChar to ClockTime"+ fromSql (SqlBool _) = error "fromSql: cannot convert SqlBool to ClockTime"+ fromSql (SqlDouble x) = TOD (truncate x) 0+ fromSql (SqlRational x) = TOD (truncate x) 0+ fromSql (SqlEpochTime x) = TOD x 0+ fromSql (SqlTimeDiff _) = error "fromSql: cannot convert SqlTimeDiff to ClockTime"+ fromSql SqlNull = error "fromSql: cannot convert SqlNull to ClockTime"++instance SqlType TimeDiff where+ toSql x = SqlTimeDiff (timeDiffToSecs x)+ fromSql (SqlString x) = secs2td (read' x)+ fromSql (SqlByteString x) = secs2td ((read' . byteString2String) x)+ fromSql (SqlInt32 x) = secs2td (fromIntegral x)+ fromSql (SqlInt64 x) = secs2td (fromIntegral x)+ fromSql (SqlWord32 x) = secs2td (fromIntegral x)+ fromSql (SqlWord64 x) = secs2td (fromIntegral x)+ fromSql (SqlInteger x) = secs2td x+ fromSql (SqlChar _) = error "fromSql: cannot convert SqlChar to TimeDiff"+ fromSql (SqlBool _) = error "fromSql: cannot convert SqlBool to TimeDiff"+ fromSql (SqlDouble x) = secs2td (truncate x)+ fromSql (SqlRational x) = secs2td (truncate x)+ fromSql (SqlEpochTime _) = error "fromSql: cannot convert SqlEpochTime to TimeDiff"+ fromSql (SqlTimeDiff x) = secs2td x+ fromSql SqlNull = error "fromSql: cannot convert SqlNull to TimeDiff"++instance SqlType CalendarTime where+ toSql x = toSql (toClockTime x)+ fromSql = toUTCTime . fromSql++instance (SqlType a) => SqlType (Maybe a) where+ toSql Nothing = SqlNull+ toSql (Just a) = toSql a+ fromSql SqlNull = Nothing+ fromSql x = Just (fromSql x)++byteString2String :: B.ByteString -> String+byteString2String = map (toEnum . fromEnum) . B.unpack++secs2td :: Integer -> TimeDiff+secs2td x = diffClockTimes (TOD x 0) (TOD 0 0)+++-- | Read a value from a string, and give an informative message+-- if it fails.+read' :: (Typeable a,Read a) => String -> a+read' s = ret+ where ret = case reads s of+ [(x,"")] -> x+ _ -> error $ "fromSql: Cannot read " ++ show s + ++ " as " ++ t ++ "."+ t = show (typeOf ret)++--------------+-- The following function copied from MissingH.Time.hs++{- | Converts the given timeDiff to the number of seconds it represents.++Uses the same algorithm as normalizeTimeDiff in GHC. -}+timeDiffToSecs :: TimeDiff -> Integer+timeDiffToSecs td =+ (fromIntegral $ tdSec td) ++ 60 * ((fromIntegral $ tdMin td) ++ 60 * ((fromIntegral $ tdHour td) ++ 24 * ((fromIntegral $ tdDay td) ++ 30 * ((fromIntegral $ tdMonth td) ++ 365 * (fromIntegral $ tdYear td)))))
Database/HDBC/Types.hs view
@@ -1,5 +1,5 @@ {--Copyright (C) 2005 John Goerzen <jgoerzen@complete.org>+Copyright (C) 2005-2007 John Goerzen <jgoerzen@complete.org> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public@@ -18,7 +18,7 @@ {- | Module : Database.HDBC.Types- Copyright : Copyright (C) 2005 John Goerzen+ Copyright : Copyright (C) 2005-2007 John Goerzen License : GNU LGPL, version 2.1 or above Maintainer : John Goerzen <jgoerzen@complete.org>@@ -35,25 +35,22 @@ -} module Database.HDBC.Types- (Connection(..),- Statement(..),- SqlError(..),- SqlType(..), nToSql, iToSql,- SqlValue(..)-+ (IConnection(..),+ Statement(..),+ SqlError(..),+ SqlType(..), nToSql, iToSql,+ SqlValue(..),+ ConnWrapper,+ withWConn ) where-import Data.Dynamic-import Data.Char(ord,toUpper)-import Data.Word-import Data.Int-import System.Time+import Database.HDBC.Statement import Database.HDBC.ColTypes {- | Main database handle object. -A 'Connection' object is created by specific functions in the module for an+An 'IConnection' object is created by specific functions in the module for an individual database. That is, the connect function -- which creates this object -- is not standardized through the HDBC interface. @@ -63,11 +60,10 @@ to the database. In other words, HDBC has /no support for autocommit/, which we consider an outdated notion. -}-data Connection = - Connection {+class IConnection conn where {- | Disconnect from the remote database. -You do not need to explicitly close a Connection object, but you may do so if+You do not need to explicitly close an IConnection object, but you may do so if you so desire. If you don't, the object will disconnect from the database in a sane way when it is garbage-collected. However, a disconnection may raise an error, so you are encouraged to explicitly call 'disconnect'. Also,@@ -86,19 +82,19 @@ and vary by database. So don't do it. -}- disconnect :: IO (),+ disconnect :: conn -> IO () {- | Commit any pending data to the database. Required to make any changes take effect. -}- commit :: IO (),+ commit :: conn -> IO () {- | Roll back to the state the database was in prior to the last 'commit' or 'rollback'. -}- rollback :: IO (),+ rollback :: conn -> IO () {- | Execute a single SQL query. Returns the number of rows modified (see 'execute' for details). The second parameter is a list of replacement values, if any. -}- run :: String -> [SqlValue] -> IO Integer,+ run :: conn -> String -> [SqlValue] -> IO Integer {- | Prepares a statement for execution. Question marks in the statement will be replaced by@@ -108,7 +104,7 @@ and the driver, errors in your SQL may be raised either here or by 'execute'. Make sure you handle exceptions both places if necessary. -}- prepare :: String -> IO Statement,+ prepare :: conn -> String -> IO Statement {- | Create a new 'Connection' object, pointed at the same server as this object is. This will generally establish a separate physical connection.@@ -125,7 +121,7 @@ This can also be a handy utility function whenever you need a separate connection to whatever database you are connected to already. -}- clone :: IO Connection,+ clone :: conn -> IO conn {- | The name of the HDBC driver module for this connection.@@ -133,25 +129,25 @@ of the Cabal package name. For instance, \"sqlite3\" or \"odbc\". This is the layer that is bound most tightly to HDBC. -}- hdbcDriverName :: String,+ hdbcDriverName :: conn -> String {- | The version of the C (or whatever) client library that the HDBC driver module is bound to. The meaning of this is driver-specific. For an ODBC or similar proxying driver, this should be the version of the ODBC library, not the eventual DB client driver. -}- hdbcClientVer :: String,+ hdbcClientVer :: conn -> String {- | In the case of a system such as ODBC, the name of the database client\/server in use, if available. For others, identical to 'hdbcDriverName'. -}- proxiedClientName :: String,+ proxiedClientName :: conn -> String {- | In the case of a system such as ODBC, the version of the database client in use, if available. For others, identical to 'hdbcClientVer'. This is the next layer out past the HDBC driver. -}- proxiedClientVer :: String,+ proxiedClientVer :: conn -> String {- | The version of the database server, if available. -}- dbServerVer :: String,+ dbServerVer :: conn -> String {- | Whether or not the current database supports transactions. If False, then 'commit' and 'rollback' should be expected to raise errors.@@ -159,466 +155,67 @@ MySQL is the only commonly-used database that is known to not support transactions entirely. Please see the MySQL notes in the ODBC driver for more information. -}- dbTransactionSupport :: Bool,+ dbTransactionSupport :: conn -> Bool {- | The names of all tables accessible by the current connection, excluding special meta-tables (system tables). You should expect this to be returned in the same manner- as a result from 'Database.HDBC.fetchAllRows'.+ as a result from 'Database.HDBC.fetchAllRows''. All results should be converted to lowercase for you before you see them. -}- getTables :: IO [String],+ getTables :: conn -> IO [String] {- | Obtain information about the columns in a specific table. The String in the result set is the column name. You should expect this to be returned in the same manner- as a result from 'Database.HDBC.fetchAllRows'.+ as a result from 'Database.HDBC.fetchAllRows''. All results should be converted to lowercase for you before you see them. -}- describeTable :: String -> IO [(String, SqlColDesc)]- - }--data Statement = Statement- {- {- | Execute the prepared statement, passing in the given positional- parameters (that should take the place of the question marks- in the call to 'prepare').-- For non-SELECT queries, the return value is the number of- rows modified, if known. If no rows were modified, you get 0.- If the value is unknown, you get -1. All current HDBC drivers- support this function and should never return -1.-- For SELECT queries, you will always get 0.-- This function should automatically call finish() to finish the previous- execution, if necessary.- -}- execute :: [SqlValue] -> IO Integer,-- {- | Execute the query with many rows. - The return value is the return value from the final row - as if you had called 'execute' on it.-- Due to optimizations that are possible due to different- databases and driver designs, this can often be significantly- faster than using 'execute' multiple times since queries- need to be compiled only once.-- This is most useful for non-SELECT statements. -}- executeMany :: [[SqlValue]] -> IO (),- - {- | Abort a query in progress -- usually not needed. -}- finish :: IO (),-- {- | Fetches one row from the DB. Returns 'Nothing' if there- are no more rows. Will automatically call 'finish' when- the last row is read. -}- fetchRow :: IO (Maybe [SqlValue]),-- {- | Returns a list of the column names in the result.- For maximum portability, you should not assume that- information is available until after an 'execute' function- has been run.- - Information is returned here directly as returned- by the underlying database layer. Note that different- databases have different rules about capitalization- of return values and about representation of names- of columns that are not simple columns. For this reason,- it is suggested that you treat this information for- display purposes only. Failing that, you should convert- to lower (or upper) case, and use @AS@ clauses for- anything other than simple columns.-- A simple getColumnNames implementation could simply- apply @map fst@ to the return value of 'describeResult'.- -}- getColumnNames :: IO [String],--- {- | The original query that this 'Statement' was prepared- with. -}- originalQuery :: String,- {- | Obtain information about the columns in the result set.- Must be run only after 'execute'. The String in the result- set is the column name.-- You should expect this to be returned in the same manner- as a result from 'Database.HDBC.fetchAllRows'.+ describeTable :: conn -> String -> IO [(String, SqlColDesc)] - All results should be converted to lowercase for you- before you see them.+{- | Sometimes, it is annoying to use typeclasses with Haskell's type system.+In those situations, you can use a ConnWrapper. You can create one with: - Please see caveats under 'getColumnNames' for information- on the column name field here.- -}- describeResult :: IO [(String, SqlColDesc)]- }+>let wrapped = ConnWrapper iconn -{- | The main HDBC exception object. As much information as possible-is passed from the database through to the application through this object.+You can then use this directly, since a ConnWrapper is also an+'IConnection'. However, you will not be able to use private database+functions on it. -Errors generated in the Haskell layer will have seNativeError set to -1.+Or, you can use 'withWConn'. -}-data SqlError = SqlError {seState :: String,- seNativeError :: Int,- seErrorMsg :: String}- deriving (Eq, Show, Read)--sqlErrorTc :: TyCon-sqlErrorTc = mkTyCon "Database.HDBC.SqlError"--instance Typeable SqlError where- typeOf _ = mkTyConApp sqlErrorTc []--{- | Conversions to and from 'SqlValue's and standard Haskell types.--Conversions are powerful; for instance, you can call 'fromSql' on a SqlInt32-and get a String or a Double out of it. This class attempts to Do-The Right Thing whenever possible, and will raise an error when asked to-do something incorrect. In particular, when converting to any type-except a Maybe, 'SqlNull' as the input will cause an error to be raised.--Here are some notes about conversion:+data ConnWrapper = forall conn. IConnection conn => ConnWrapper conn - * Fractions of a second are not preserved on time values+{- | Unwrap a 'ConnWrapper' and pass the embedded 'IConnection' to+a function. Example: -See also 'nToSql', 'iToSql'.+>withWConn wrapped run $ "SELECT * from foo where bar = 1" [] -}--class (Show a) => SqlType a where- toSql :: a -> SqlValue- fromSql :: SqlValue -> a--{- | Converts any Integral type to a 'SqlValue' by using toInteger. -}-nToSql :: Integral a => a -> SqlValue-nToSql n = SqlInteger (toInteger n)--{- | Convenience function for using numeric literals in your program. -}-iToSql :: Int -> SqlValue-iToSql = toSql--{- | The main type for expressing Haskell values to SQL databases.--This type is used to marshall Haskell data to and from database APIs.-HDBC driver interfaces will do their best to use the most accurate and-efficient way to send a particular value to the database server.--Values read back from the server are put in the most appropriate 'SqlValue'-type. 'fromSql' can then be used to convert them into whatever type-is needed locally in Haskell.--Most people will use 'toSql' and 'fromSql' instead of manipulating-'SqlValue's directly.--The default representation of time values is an integer number of seconds.-Databases such as PostgreSQL with builtin timestamp types can will see-automatic conversion between these Haskell types to local types. Other-databases can just use an int or a string. --This behavior also exists for other types. For instance, many databases don't-have a Rational type, so they'll just use Haskell's show function and-store a Rational as a string.--Two SqlValues are considered to be equal if one of these hold (first one that-is true holds; if none are true, they are not equal):- * Both are NULL- * Both represent the same type and the encapsulated values are equal- * The values of each, when converted to a string, are equal. -}-data SqlValue = SqlString String - | SqlWord32 Word32- | SqlWord64 Word64- | SqlInt32 Int32- | SqlInt64 Int64- | SqlInteger Integer- | SqlChar Char- | SqlBool Bool- | SqlDouble Double- | SqlRational Rational- | SqlEpochTime Integer -- ^ Representation of ClockTime or CalendarTime- | SqlTimeDiff Integer -- ^ Representation of TimeDiff- | SqlNull -- ^ NULL in SQL or Nothing in Haskell- deriving (Show)--instance Eq SqlValue where- SqlString a == SqlString b = a == b- SqlWord32 a == SqlWord32 b = a == b- SqlWord64 a == SqlWord64 b = a == b- SqlInt32 a == SqlInt32 b = a == b- SqlInt64 a == SqlInt64 b = a == b- SqlInteger a == SqlInteger b = a == b- SqlChar a == SqlChar b = a == b- SqlBool a == SqlBool b = a == b- SqlDouble a == SqlDouble b = a == b- SqlRational a == SqlRational b = a == b- SqlEpochTime a == SqlEpochTime b = a == b- SqlTimeDiff a == SqlTimeDiff b = a == b- SqlNull == SqlNull = True- a == b = ((fromSql a)::String) == ((fromSql b)::String)--instance SqlType String where- toSql = SqlString- fromSql (SqlString x) = x- fromSql (SqlInt32 x) = show x- fromSql (SqlInt64 x) = show x- fromSql (SqlWord32 x) = show x- fromSql (SqlWord64 x) = show x- fromSql (SqlInteger x) = show x- fromSql (SqlChar x) = [x]- fromSql (SqlBool x) = show x- fromSql (SqlDouble x) = show x- fromSql (SqlRational x) = show x- fromSql (SqlEpochTime x) = show x- fromSql (SqlTimeDiff x) = show x- fromSql (SqlNull) = error "fromSql: cannot convert SqlNull to String"--instance SqlType Int where- toSql x = SqlInt32 (fromIntegral x)- fromSql (SqlString x) = read' x- fromSql (SqlInt32 x) = fromIntegral x- fromSql (SqlInt64 x) = fromIntegral x- fromSql (SqlWord32 x) = fromIntegral x- fromSql (SqlWord64 x) = fromIntegral x- fromSql (SqlInteger x) = fromIntegral x- fromSql (SqlChar x) = ord x- fromSql (SqlBool x) = if x then 1 else 0- fromSql (SqlDouble x) = truncate $ x- fromSql (SqlRational x) = truncate $ x- fromSql (SqlEpochTime x) = fromIntegral x- fromSql (SqlTimeDiff x) = fromIntegral x- fromSql (SqlNull) = error "fromSql: cannot convert SqlNull to Int"--instance SqlType Int32 where- toSql = SqlInt32- fromSql (SqlString x) = read' x- fromSql (SqlInt32 x) = x- fromSql (SqlInt64 x) = fromIntegral x- fromSql (SqlWord32 x) = fromIntegral x- fromSql (SqlWord64 x) = fromIntegral x- fromSql (SqlInteger x) = fromIntegral x- fromSql (SqlChar x) = fromIntegral $ ord x- fromSql (SqlBool x) = if x then 1 else 0- fromSql (SqlDouble x) = truncate $ x- fromSql (SqlRational x) = truncate $ x- fromSql (SqlEpochTime x) = fromIntegral x- fromSql (SqlTimeDiff x) = fromIntegral x- fromSql (SqlNull) = error "fromSql: cannot convert SqlNull to Int32"--instance SqlType Int64 where- toSql = SqlInt64- fromSql (SqlString x) = read' x- fromSql (SqlInt32 x) = fromIntegral x- fromSql (SqlInt64 x) = x- fromSql (SqlWord32 x) = fromIntegral x- fromSql (SqlWord64 x) = fromIntegral x- fromSql (SqlInteger x) = fromIntegral x- fromSql (SqlChar x) = fromIntegral $ ord x- fromSql (SqlBool x) = if x then 1 else 0- fromSql (SqlDouble x) = truncate $ x- fromSql (SqlRational x) = truncate $ x- fromSql (SqlEpochTime x) = fromIntegral x- fromSql (SqlTimeDiff x) = fromIntegral x- fromSql (SqlNull) = error "fromSql: cannot convert SqlNull to Int64"--instance SqlType Word32 where- toSql = SqlWord32- fromSql (SqlString x) = read' x- fromSql (SqlInt32 x) = fromIntegral x- fromSql (SqlInt64 x) = fromIntegral x- fromSql (SqlWord32 x) = x- fromSql (SqlWord64 x) = fromIntegral x- fromSql (SqlInteger x) = fromIntegral x- fromSql (SqlChar x) = fromIntegral $ ord x- fromSql (SqlBool x) = if x then 1 else 0- fromSql (SqlDouble x) = truncate $ x- fromSql (SqlRational x) = truncate $ x- fromSql (SqlEpochTime x) = fromIntegral x- fromSql (SqlTimeDiff x) = fromIntegral x- fromSql (SqlNull) = error "fromSql: cannot convert SqlNull to Word32"--instance SqlType Word64 where- toSql = SqlWord64- fromSql (SqlString x) = read' x- fromSql (SqlInt32 x) = fromIntegral x- fromSql (SqlInt64 x) = fromIntegral x- fromSql (SqlWord32 x) = fromIntegral x- fromSql (SqlWord64 x) = x- fromSql (SqlInteger x) = fromIntegral x- fromSql (SqlChar x) = fromIntegral (ord x)- fromSql (SqlBool x) = if x then 1 else 0- fromSql (SqlDouble x) = truncate $ x- fromSql (SqlRational x) = truncate $ x- fromSql (SqlEpochTime x) = fromIntegral x- fromSql (SqlTimeDiff x) = fromIntegral x- fromSql (SqlNull) = error "fromSql: cannot convert SqlNull to Int64"--instance SqlType Integer where- toSql = SqlInteger- fromSql (SqlString x) = read' x- fromSql (SqlInt32 x) = fromIntegral x- fromSql (SqlInt64 x) = fromIntegral x- fromSql (SqlWord32 x) = fromIntegral x- fromSql (SqlWord64 x) = fromIntegral x- fromSql (SqlInteger x) = x- fromSql (SqlChar x) = fromIntegral (ord x)- fromSql (SqlBool x) = if x then 1 else 0- fromSql (SqlDouble x) = truncate $ x- fromSql (SqlRational x) = truncate $ x- fromSql (SqlEpochTime x) = x- fromSql (SqlTimeDiff x) = x- fromSql (SqlNull) = error "fromSql: cannot convert SqlNull to Integer"--instance SqlType Bool where- toSql = SqlBool- fromSql (SqlString x) = - case map toUpper x of- "TRUE" -> True- "T" -> True- "FALSE" -> False- "F" -> False- _ -> error $ "fromSql: cannot convert SqlString " - ++ show x ++ " to Bool"- fromSql (SqlInt32 x) = numToBool x- fromSql (SqlInt64 x) = numToBool x- fromSql (SqlWord32 x) = numToBool x- fromSql (SqlWord64 x) = numToBool x- fromSql (SqlInteger x) = numToBool x- fromSql (SqlChar x) = numToBool (ord x)- fromSql (SqlBool x) = x- fromSql (SqlDouble x) = numToBool x- fromSql (SqlRational x) = numToBool x- fromSql (SqlEpochTime x) = numToBool x- fromSql (SqlTimeDiff x) = numToBool x- fromSql (SqlNull) = error "fromSql: cannot convert SqlNull to Bool"--numToBool :: Num a => a -> Bool-numToBool x = x /= 0--instance SqlType Char where- toSql = SqlChar- fromSql (SqlString [x]) = x- fromSql (SqlString _) = error "fromSql: cannot convert SqlString to Char"- fromSql (SqlInt32 _) = error "fromSql: cannot convert SqlInt32 to Char"- fromSql (SqlInt64 _) = error "fromSql: cannot convert SqlInt64 to Char"- fromSql (SqlWord32 _) = error "fromSql: cannot convert SqlWord32 to Char"- fromSql (SqlWord64 _) = error "fromSql: cannot convert SqlWord64 to Char"- fromSql (SqlInteger _) = error "fromSql: cannot convert SqlInt to Char"- fromSql (SqlChar x) = x- fromSql (SqlBool x) = if x then '1' else '0'- fromSql (SqlDouble _) = error "fromSql: cannot convert SqlDouble to Char"- fromSql (SqlRational _) = error "fromSql: cannot convert SqlRational to Char"- fromSql (SqlEpochTime _) = error "fromSql: cannot convert SqlEpochTime to Char"- fromSql (SqlTimeDiff _) = error "fromSql: cannot convert SqlTimeDiff to Char"- fromSql (SqlNull) = error "fromSql: cannot convert SqlNull to Char"--instance SqlType Double where- toSql = SqlDouble- fromSql (SqlString x) = read' x- fromSql (SqlInt32 x) = fromIntegral x- fromSql (SqlInt64 x) = fromIntegral x- fromSql (SqlWord32 x) = fromIntegral x- fromSql (SqlWord64 x) = fromIntegral x- fromSql (SqlInteger x) = fromIntegral x- fromSql (SqlChar x) = fromIntegral . ord $ x- fromSql (SqlBool x) = if x then 1.0 else 0.0- fromSql (SqlDouble x) = x- fromSql (SqlRational x) = fromRational x- fromSql (SqlEpochTime x) = fromIntegral x- fromSql (SqlTimeDiff x) = fromIntegral x- fromSql (SqlNull) = error "fromSql: cannot convert SqlNull to Double"--instance SqlType Rational where- toSql = SqlRational- fromSql (SqlString x) = read' x- fromSql (SqlInt32 x) = fromIntegral x- fromSql (SqlInt64 x) = fromIntegral x- fromSql (SqlWord32 x) = fromIntegral x- fromSql (SqlWord64 x) = fromIntegral x- fromSql (SqlInteger x) = fromIntegral x- fromSql (SqlChar x) = fromIntegral . ord $ x- fromSql (SqlBool x) = fromIntegral $ ((fromSql (SqlBool x))::Int)- fromSql (SqlDouble x) = toRational x- fromSql (SqlRational x) = x- fromSql (SqlEpochTime x) = fromIntegral x- fromSql (SqlTimeDiff x) = fromIntegral x- fromSql (SqlNull) = error "fromSql: cannot convert SqlNull to Double"--instance SqlType ClockTime where- toSql (TOD x _) = SqlEpochTime x- fromSql (SqlString x) = TOD (read' x) 0- fromSql (SqlInt32 x) = TOD (fromIntegral x) 0- fromSql (SqlInt64 x) = TOD (fromIntegral x) 0- fromSql (SqlWord32 x) = TOD (fromIntegral x) 0- fromSql (SqlWord64 x) = TOD (fromIntegral x) 0- fromSql (SqlInteger x) = TOD x 0- fromSql (SqlChar _) = error "fromSql: cannot convert SqlChar to ClockTime"- fromSql (SqlBool _) = error "fromSql: cannot convert SqlBool to ClockTime"- fromSql (SqlDouble x) = TOD (truncate x) 0- fromSql (SqlRational x) = TOD (truncate x) 0- fromSql (SqlEpochTime x) = TOD x 0- fromSql (SqlTimeDiff _) = error "fromSql: cannot convert SqlTimeDiff to ClockTime"- fromSql SqlNull = error "fromSql: cannot convert SqlNull to ClockTime"--instance SqlType TimeDiff where- toSql x = SqlTimeDiff (timeDiffToSecs x)- fromSql (SqlString x) = secs2td (read' x)- fromSql (SqlInt32 x) = secs2td (fromIntegral x)- fromSql (SqlInt64 x) = secs2td (fromIntegral x)- fromSql (SqlWord32 x) = secs2td (fromIntegral x)- fromSql (SqlWord64 x) = secs2td (fromIntegral x)- fromSql (SqlInteger x) = secs2td x- fromSql (SqlChar _) = error "fromSql: cannot convert SqlChar to TimeDiff"- fromSql (SqlBool _) = error "fromSql: cannot convert SqlBool to TimeDiff"- fromSql (SqlDouble x) = secs2td (truncate x)- fromSql (SqlRational x) = secs2td (truncate x)- fromSql (SqlEpochTime _) = error "fromSql: cannot convert SqlEpochTime to TimeDiff"- fromSql (SqlTimeDiff x) = secs2td x- fromSql SqlNull = error "fromSql: cannot convert SqlNull to TimeDiff"--instance SqlType CalendarTime where- toSql x = toSql (toClockTime x)- fromSql = toUTCTime . fromSql--instance (SqlType a) => SqlType (Maybe a) where- toSql Nothing = SqlNull- toSql (Just a) = toSql a- fromSql SqlNull = Nothing- fromSql x = Just (fromSql x)--secs2td :: Integer -> TimeDiff-secs2td x = diffClockTimes (TOD x 0) (TOD 0 0)----- | Read a value from a string, and give an informative message--- if it fails.-read' :: (Typeable a,Read a) => String -> a-read' s = ret- where ret = case reads s of- [(x,"")] -> x- _ -> error $ "fromSql: Cannot read " ++ show s - ++ " as " ++ t ++ "."- t = show (typeOf ret)------------------- The following function copied from MissingH.Time.hs+withWConn :: forall b. ConnWrapper -> (forall conn. IConnection conn => conn -> b) -> b+withWConn conn f =+ case conn of+ ConnWrapper x -> f x -{- | Converts the given timeDiff to the number of seconds it represents.+instance IConnection ConnWrapper where+ disconnect w = withWConn w disconnect+ commit w = withWConn w commit+ rollback w = withWConn w rollback+ run w = withWConn w run+ prepare w = withWConn w prepare+ clone w = withWConn w (\dbh -> clone dbh >>= return . ConnWrapper)+ hdbcDriverName w = withWConn w hdbcDriverName+ hdbcClientVer w = withWConn w hdbcClientVer+ proxiedClientName w = withWConn w proxiedClientName+ proxiedClientVer w = withWConn w proxiedClientVer+ dbServerVer w = withWConn w dbServerVer+ dbTransactionSupport w = withWConn w dbTransactionSupport+ getTables w = withWConn w getTables+ describeTable w = withWConn w describeTable -Uses the same algorithm as normalizeTimeDiff in GHC. -}-timeDiffToSecs :: TimeDiff -> Integer-timeDiffToSecs td =- (fromIntegral $ tdSec td) +- 60 * ((fromIntegral $ tdMin td) +- 60 * ((fromIntegral $ tdHour td) +- 24 * ((fromIntegral $ tdDay td) +- 30 * ((fromIntegral $ tdMonth td) +- 365 * (fromIntegral $ tdYear td)))))
Database/HDBC/Utils.hs view
@@ -41,6 +41,7 @@ import Data.Char import Data.Dynamic import System.IO.Unsafe+import Data.List(genericLength) {- | Execute the given IO action. @@ -68,7 +69,7 @@ where handler e = fail ("SQL error: " ++ show e) {- | Like 'run', but take a list of Maybe Strings instead of 'SqlValue's. -}-sRun :: Connection -> String -> [Maybe String] -> IO Integer+sRun :: IConnection conn => conn -> String -> [Maybe String] -> IO Integer sRun conn qry lst = run conn qry (map toSql lst) @@ -98,7 +99,7 @@ This function, therefore, encapsulates the logical property that a transaction is all about: all or nothing. -The 'Connection' object passed in is passed directly to the specified+The 'IConnection' object passed in is passed directly to the specified function as a convenience. This function traps /all/ uncaught exceptions, not just SqlErrors. Therefore,@@ -116,7 +117,7 @@ like to know about the root cause for all of this anyway.) Feedback on this behavior is solicited. -}-withTransaction :: Connection -> (Connection -> IO a) -> IO a+withTransaction :: IConnection conn => conn -> (conn -> IO a) -> IO a withTransaction conn func = do r <- try (func conn) case r of@@ -144,6 +145,9 @@ But then, similar caveats apply with hGetContents. Bottom line: this is a very convenient abstraction; use it wisely.++Use 'fetchAllRows'' if you need something that is strict, without+all these caveats. -} fetchAllRows :: Statement -> IO [[SqlValue]] fetchAllRows sth = unsafeInterleaveIO $@@ -153,12 +157,33 @@ Just x -> do remainder <- fetchAllRows sth return (x : remainder) +evalAll :: [[a]] -> IO Integer+evalAll inp =+ do r1 <- mapM (evaluate . genericLength) inp+ evaluate (sum r1)++{- | Strict version of 'fetchAllRows'. Does not have the side-effects+of 'fetchAllRows', but forces the entire result set to be buffered+in memory. -}+fetchAllRows' :: Statement -> IO [[SqlValue]]+fetchAllRows' sth =+ do res <- fetchAllRows sth+ evalAll res+ return res+ {- | Like 'fetchAllRows', but return Maybe Strings instead of 'SqlValue's. -} sFetchAllRows :: Statement -> IO [[Maybe String]] sFetchAllRows sth = do res <- fetchAllRows sth return $ map (map fromSql) res +{- | Strict version of 'sFetchAllRows'. -}+sFetchAllRows' :: Statement -> IO [[Maybe String]]+sFetchAllRows' sth =+ do res <- sFetchAllRows sth+ evalAll res+ return res+ {- | Like 'fetchRow', but instead of returning a list, return an association list from column name to value. @@ -175,6 +200,15 @@ let names = map (map toLower) names_raw return $ Just $ zip names r +{- | Strict version of 'fetchRowAL' -}+fetchRowAL' :: Statement -> IO (Maybe [(String, SqlValue)])+fetchRowAL' sth =+ do res <- fetchRowAL sth+ case res of+ Nothing -> return 0+ Just x -> evaluate ((genericLength x)::Integer)+ return res+ {- | Similar to 'fetchRowAL', but return a Map instead of an association list. -} fetchRowMap :: Statement -> IO (Maybe (Map.Map String SqlValue))@@ -184,6 +218,15 @@ Nothing -> return Nothing Just x -> return $ Just $ Map.fromList x +{- | Strict version of 'fetchRowMap' -}+fetchRowMap' :: Statement -> IO (Maybe (Map.Map String SqlValue))+fetchRowMap' sth = + do res <- fetchRowMap sth+ case res of+ Nothing -> return 0+ Just x -> evaluate ((genericLength (Map.toList x))::Integer)+ return res+ {- | Like 'fetchAllRows', but instead of returning a list for each row, return an association list for each row, from column name to value. @@ -195,15 +238,37 @@ rows <- fetchAllRows sth return $ map (zip names) rows +{- | Strict version of 'fetchAllRowsAL' -}+fetchAllRowsAL' :: Statement -> IO [[(String, SqlValue)]]+fetchAllRowsAL' sth =+ do res <- fetchAllRowsAL sth+ evalAll res+ return res+ {- | Like 'fetchAllRowsAL', but return a list of Maps instead of a list of association lists. -} fetchAllRowsMap :: Statement -> IO [Map.Map String SqlValue] fetchAllRowsMap sth = fetchAllRowsAL sth >>= (return . map Map.fromList) +{- | Strict version of 'fetchAllRowsMap' -}+fetchAllRowsMap' :: Statement -> IO [Map.Map String SqlValue]+fetchAllRowsMap' sth = + do res <- fetchAllRowsMap sth+ evaluate ((genericLength res)::Integer)+ return res+ {- | A quick way to do a query. Similar to preparing, executing, and-then calling 'fetchAllRows' on a statement. -}-quickQuery :: Connection -> String -> [SqlValue] -> IO [[SqlValue]]+then calling 'fetchAllRows' on a statement. See also 'quickQuery'' -}+quickQuery :: IConnection conn => conn -> String -> [SqlValue] -> IO [[SqlValue]] quickQuery conn qrystr args = do sth <- prepare conn qrystr execute sth args fetchAllRows sth++{- | Strict version of 'quickQuery'. -}+quickQuery' :: IConnection conn => conn -> String -> [SqlValue] -> IO [[SqlValue]]+quickQuery' conn qrystr args =+ do res <- quickQuery conn qrystr args+ evalAll res+ return res+
HDBC.cabal view
@@ -1,11 +1,21 @@ Name: HDBC-Version: 1.0.1+Version: 1.1.3 License: LGPL Maintainer: John Goerzen <jgoerzen@complete.org>-Stability: Alpha-Copyright: Copyright (c) 2005-2006 John Goerzen+Author: John Goerzen+Copyright: Copyright (c) 2005-2007 John Goerzen+license-file: COPYRIGHT+extra-source-files: COPYING+homepage: http://software.complete.org/hdbc+Category: Database+synopsis: Haskell Database Connectivity+Description: HDBC provides an abstraction layer between Haskell programs and SQL+ relational databases. This lets you write database code once, in+ Haskell, and have it work with any number of backend SQL databases+ (MySQL, Oracle, PostgreSQL, ODBC-compliant databases, etc.)+Stability: Stable Exposed-Modules: Database.HDBC, Database.HDBC.Types, Database.HDBC.DriverUtils,- Database.HDBC.ColTypes+ Database.HDBC.ColTypes, Database.HDBC.Statement Other-Modules: Database.HDBC.Utils --Extensions: ExistentialQuantification, AllowOverlappingInstances, -- AllowUndecidableInstances
− Makefile
@@ -1,11 +0,0 @@-all:- @echo "Please use Cabal to build this package; not make."--.PHONY: doc-doc:- -rm -r doc- mkdir doc- haddock -h -t 'Haskell Database Connectivity (HDBC)' \- -D doc/hdbc.interface \- -o doc `find Database -name "*.hs"`-
− Memory.txt
@@ -1,24 +0,0 @@-Notes on memory management-----------------------------ForeignPtrs are used wherever possible to make sure we don't have-memory leaks.--However, there is one potential problem with them. If a whole bunch-of database stuff goes out of scope all at once, then the Connection,-Statement, and everything else could become finalizable all at once.-And it is not guaranteed to be finalized in any particular order.--We don't want to have the Connection finalized before the Statements.-This could cause segfaults with some databases.--So we implement a simple reference counting system for the-Connection. Each use -- whether in a Connection or a Statement ---counts as one, and the whole thing is freed when the use count drops-to 0 (the last object using it has been finalized).--That solves almost every problem. We have one more: when somebody-calls disconnect on the parent, we really want to close all open-statements first. So a system of weak refs is used to handle that.-This makes sure that we free things in the proper order for explicit-disconnects as well.
− README.txt
@@ -1,39 +0,0 @@-Welcome to HDBC, Haskell Database Connectivity.--HDBC is modeled loosely on Perl's DBI interface, though it has also-been influenced by Python's DB-API v2, JDBC in Java, and HSQL in-Haskell.--Please see doc/Database-HDBC.html for an introduction to HDBC and its-various features.--INSTALLATION---------------You'll need either GHC 6.4.1 or above, or Hugs 2005xx or above.--The steps to install are:--1) ghc --make -o setup Setup.lhs--2) ./setup configure--3) ./setup build--4) ./setup install (as root)--If you're on Windows, you can omit the leading "./".--Documentation is in doc/ -- lots of information, including pointers to-drivers, is in doc/Database-HDBC.html.--USAGE--------To use with hugs, you'll want to use hugs -98.--To use with GHC, you'll want to use -package HDBC in your programs.-Or, with Cabal, use Build-Depends: HDBC.---- John Goerzen- December 2005
Setup.lhs view
@@ -1,4 +1,4 @@-#!/usr/bin/env runhugs+#!/usr/bin/env runhaskell > import Distribution.Simple
− debian/README.Debian
@@ -1,15 +0,0 @@-hdbc for Debian------------------To use HDBC in your programs, you'll need a driver package as well.--apt-cache search hdbc will give you a convenient list of the HDBC drivers-available in Debian.--To use HDBC in GHC, you'll need to use -package HDBC on your command line,-or, with Cabal, list a Build-Depends on HDBC.--You can find documentation for the HDBC API under -/usr/share/doc/libhdbc-ghc6-dev or /usr/share/doc/libhdbc-hugs.-- -- John Goerzen <jgoerzen@complete.org>, Tue Dec 27 10:40:56 2005
− debian/changelog
@@ -1,39 +0,0 @@-hdbc (1.0.1) unstable; urgency=low-- * Now accept T and F for True and False from the underlying database- layer -- compatibility with PostgreSQL-- -- John Goerzen <jgoerzen@complete.org> Sat, 22 Jul 2006 07:11:08 -0500--hdbc (1.0.0) unstable; urgency=low-- * Blessing this version as 1.0.0. Whee!-- -- John Goerzen <jgoerzen@complete.org> Thu, 29 Jun 2006 18:23:03 -0500--hdbc (0.99.3) unstable; urgency=low-- * [bringert] Better error messages when fromSql encounters- data it doesn't understand- * Rebuilt for GHC 6.4.2-- -- John Goerzen <jgoerzen@complete.org> Wed, 28 Jun 2006 15:00:09 -0500--hdbc (0.99.2) unstable; urgency=low-- * New call dbTransactionSupport-- -- John Goerzen <jgoerzen@complete.org> Tue, 28 Mar 2006 04:57:00 -0600--hdbc (0.99.1) unstable; urgency=low-- * Release 0.99.1. New features include generalized memory- management support and column metadata.-- -- John Goerzen <jgoerzen@complete.org> Mon, 27 Mar 2006 18:54:24 -0600--hdbc (0.99.0) unstable; urgency=low-- * Initial Release. Closes: #344913.-- -- John Goerzen <jgoerzen@complete.org> Tue, 27 Dec 2005 10:22:53 -0600
− debian/compat
@@ -1,1 +0,0 @@-4
− debian/control
@@ -1,41 +0,0 @@-Source: hdbc-Priority: optional-Maintainer: John Goerzen <jgoerzen@complete.org>-Build-Depends: debhelper (>= 4.0.0), ghc6 (>= 6.4.2), ghc6 (<< 6.4.2-999), haskell-devscripts (>= 0.5.6), cpphs, haddock-Build-Depends-Indep: debhelper (>= 4.0.0), haddock, hugs (>= 98.200503.08), haskell-devscripts (>= 0.5.6), ghc6 (>= 6.4.2)-Standards-Version: 3.6.2-Section: libs--Package: libghc6-hdbc-dev-Section: libdevel-Architecture: any-Depends: ${haskell:Depends}-Suggests: libghc6-hdbc-postgresql-dev | libghc6-hdbc-sqlite3-dev, libghc6-hdbc-missingh-dev-Description: Haskell Database Connectivity, GHC6 package- HDBC provides an abstraction layer between Haskell programs and SQL- relational databases. This lets you write database code once, in- Haskell, and have it work with any number of backend SQL databases- (MySQL, Oracle, PostgreSQL, ODBC-compliant databases, etc.)- .- HDBC is modeled loosely on Perl's DBI interface, though it has also been- influenced by Python's DB-API v2, JDBC in Java, and HSQL in Haskell.- .- To use HDBC, you'll need both this package, and a driver package such- as libghc6-hdbc-postgresql-dev.--Package: libhugs-hdbc-Section: libs-Architecture: all-Depends: ${haskell:Depends}-Description: Haskell Database Connectivity, Hugs package- HDBC provides an abstraction layer between Haskell programs and SQL- relational databases. This lets you write database code once, in- Haskell, and have it work with any number of backend SQL databases- (MySQL, Oracle, PostgreSQL, ODBC-compliant databases, etc.)- .- HDBC is modeled loosely on Perl's DBI interface, though it has also been- influenced by Python's DB-API v2, JDBC in Java, and HSQL in Haskell.- .- To use HDBC, you'll need both this package, and a driver package such- as libhugs-hdbc-postgresql.-
− debian/copyright
@@ -1,27 +0,0 @@-This is hdbc, written and maintained by John Goerzen <jgoerzen@complete.org>-on Tue, 27 Dec 2005 10:22:53 -0600.--The original source can always be found at:- ftp://ftp.debian.org/dists/unstable/main/source/--The Darcs repository for this program can be accessed with:- darcs get --partial http://darcs.complete.org/hdbc--Copyright (C) 2005-2006 John Goerzen <jgoerzen@complete.org>-- This library is free software; you can redistribute it and/or- modify it under the terms of the GNU Lesser General Public- License as published by the Free Software Foundation; either- version 2.1 of the License, or (at your option) any later version.-- This library is distributed in the hope that it will be useful,- but WITHOUT ANY WARRANTY; without even the implied warranty of- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU- Lesser General Public License for more details.-- You should have received a copy of the GNU Lesser General Public- License along with this library; if not, write to the Free Software- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA--On Debian systems, the complete text of the GNU Lesser General-Public License can be found in `/usr/share/common-licenses/LGPL'.
− debian/hdbc.doc-base.EX
@@ -1,22 +0,0 @@-Document: hdbc-Title: Debian hdbc Manual-Author: <insert document author here>-Abstract: This manual describes what hdbc is- and how it can be used to- manage online manuals on Debian systems.-Section: unknown--Format: debiandoc-sgml-Files: /usr/share/doc/hdbc/hdbc.sgml.gz--Format: postscript-Files: /usr/share/doc/hdbc/hdbc.ps.gz--Format: text-Files: /usr/share/doc/hdbc/hdbc.text.gz--Format: HTML-Index: /usr/share/doc/hdbc/html/index.html-Files: /usr/share/doc/hdbc/html/*.html--
− debian/rules
@@ -1,147 +0,0 @@-#!/usr/bin/make -f-# -*- makefile -*--# Sample debian/rules that uses debhelper.-# This file was originally written by Joey Hess and Craig Small.-# As a special exception, when this file is copied by dh-make into a-# dh-make output file, you may use that output file without restriction.-# This special exception was added by Craig Small in version 0.37 of dh-make.--# Uncomment this to turn on verbose mode.-#export DH_VERBOSE=1-----CFLAGS = -Wall -g--ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))- CFLAGS += -O0-else- CFLAGS += -O2-endif--# shared library versions, option 1-version=2.0.5-major=2-# option 2, assuming the library is created as src/.libs/libfoo.so.2.0.5 or so-#version=`ls src/.libs/lib*.so.* | \-# awk '{if (match($$0,/[0-9]+\.[0-9]+\.[0-9]+$$/)) print substr($$0,RSTART)}'`-#major=`ls src/.libs/lib*.so.* | \-# awk '{if (match($$0,/\.so\.[0-9]+$$/)) print substr($$0,RSTART+4)}'`--configure: configure-stamp-configure-stamp:- dh_testdir- # Add here commands to configure the package.-- touch configure-stamp---build: build-stamp-build-stamp: configure-stamp - dh_testdir-- # Add here commands to compile the package.- #$(MAKE)-- touch build-stamp--clean:- dh_testdir- dh_testroot- rm -f build-stamp configure-stamp-- # Add here commands to clean up after the build process.- #-$(MAKE) clean- -./setup clean- -rm -rf setup Setup.hi Setup.ho Setup.o .*config* dist-- dh_clean --install-a: build- dh_testdir- dh_testroot- dh_clean -k - dh_installdirs-- # Add here commands to install the package into debian/tmp- #$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp- dh_haskell -a--install-i: build- dh_testdir- dh_testroot- dh_clean -k - dh_installdirs-- # Add here commands to install the package into debian/tmp- #$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp- dh_haskell -i-----# Build architecture-independent files here.-binary-indep: build install-i- dh_testdir- dh_testroot- dh_installchangelogs -i- dh_installdocs -i README.txt doc/*- dh_installexamples -i-# dh_install-# dh_installmenu-# dh_installdebconf -# dh_installlogrotate-# dh_installemacsen-# dh_installpam-# dh_installmime-# dh_installinit-# dh_installcron-# dh_installinfo- dh_installman -i- dh_link -i- dh_strip -i- dh_compress -i- dh_fixperms -i-# dh_perl-# dh_python-# dh_makeshlibs- dh_installdeb -i- dh_shlibdeps -i- dh_gencontrol -i- dh_md5sums -i- dh_builddeb -i--# Build architecture-dependent files here.-binary-arch: build install-a- dh_testdir- dh_testroot- dh_installchangelogs -a- dh_installdocs -a README.txt doc/*- dh_installexamples -a-# dh_install-# dh_installmenu-# dh_installdebconf -# dh_installlogrotate-# dh_installemacsen-# dh_installpam-# dh_installmime-# dh_installinit-# dh_installcron-# dh_installinfo- dh_installman -a- dh_link -a- dh_strip -a- dh_compress -a- dh_fixperms -a-# dh_perl-# dh_python-# dh_makeshlibs- dh_installdeb -a- dh_shlibdeps -a- dh_gencontrol -a- dh_md5sums -a- dh_builddeb -a--binary: binary-indep binary-arch-.PHONY: build clean binary-indep binary-arch binary install configure
− doc/Database-HDBC-ColTypes.html
@@ -1,1232 +0,0 @@-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">-<!--Rendered using the Haskell Html Library v0.2-->-<HTML-><HEAD-><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"-><TITLE->Database.HDBC.ColTypes</TITLE-><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"-><SCRIPT SRC="haddock.js" TYPE="text/javascript"-></SCRIPT-></HEAD-><BODY-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="topbar"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD-><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "-></TD-><TD CLASS="title"->Haskell Database Connectivity (HDBC)</TD-><TD CLASS="topbut"-><A HREF="index.html"->Contents</A-></TD-><TD CLASS="topbut"-><A HREF="doc-index.html"->Index</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="modulebar"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD-><FONT SIZE="6"->Database.HDBC.ColTypes</FONT-></TD-><TD ALIGN="right"-><TABLE CLASS="narrow" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="infohead"->Portability</TD-><TD CLASS="infoval"->portable</TD-></TR-><TR-><TD CLASS="infohead"->Stability</TD-><TD CLASS="infoval"->provisional</TD-></TR-><TR-><TD CLASS="infohead"->Maintainer</TD-><TD CLASS="infoval"->John Goerzen <jgoerzen@complete.org></TD-></TR-></TABLE-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"->Description</TD-></TR-><TR-><TD CLASS="doc"-><P->Definitions of, and utilities for, specifying what type of data is represented-by a column.-</P-><P->Written by John Goerzen, jgoerzen@complete.org-</P-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"->Synopsis</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3ASqlColDesc"->SqlColDesc</A-> = <A HREF="#v%3ASqlColDesc"->SqlColDesc</A-> {<TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="recfield"-><A HREF="#v%3AcolType"->colType</A-> :: <A HREF="Database-HDBC-ColTypes.html#t%3ASqlTypeId"->SqlTypeId</A-></TD-></TR-><TR-><TD CLASS="recfield"-><A HREF="#v%3AcolSize"->colSize</A-> :: (Maybe Int)</TD-></TR-><TR-><TD CLASS="recfield"-><A HREF="#v%3AcolOctetLength"->colOctetLength</A-> :: (Maybe Int)</TD-></TR-><TR-><TD CLASS="recfield"-><A HREF="#v%3AcolDecDigits"->colDecDigits</A-> :: (Maybe Int)</TD-></TR-><TR-><TD CLASS="recfield"-><A HREF="#v%3AcolNullable"->colNullable</A-> :: (Maybe Bool)</TD-></TR-></TABLE->}</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3ASqlTypeId"->SqlTypeId</A-> </TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"->= <A HREF="#v%3ASqlCharT"->SqlCharT</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ASqlVarCharT"->SqlVarCharT</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ASqlLongVarCharT"->SqlLongVarCharT</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ASqlWCharT"->SqlWCharT</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ASqlWVarCharT"->SqlWVarCharT</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ASqlWLongVarCharT"->SqlWLongVarCharT</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ASqlDecimalT"->SqlDecimalT</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ASqlNumericT"->SqlNumericT</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ASqlSmallIntT"->SqlSmallIntT</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ASqlIntegerT"->SqlIntegerT</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ASqlRealT"->SqlRealT</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ASqlFloatT"->SqlFloatT</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ASqlDoubleT"->SqlDoubleT</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ASqlBitT"->SqlBitT</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ASqlTinyIntT"->SqlTinyIntT</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ASqlBigIntT"->SqlBigIntT</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ASqlBinaryT"->SqlBinaryT</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ASqlVarBinaryT"->SqlVarBinaryT</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ASqlLongVarBinaryT"->SqlLongVarBinaryT</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ASqlDateT"->SqlDateT</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ASqlTimeT"->SqlTimeT</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ASqlTimestampT"->SqlTimestampT</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ASqlUTCDateTimeT"->SqlUTCDateTimeT</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ASqlUTCTimeT"->SqlUTCTimeT</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ASqlIntervalT"->SqlIntervalT</A-> <A HREF="Database-HDBC-ColTypes.html#t%3ASqlInterval"->SqlInterval</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ASqlGUIDT"->SqlGUIDT</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ASqlUnknownT"->SqlUnknownT</A-> String</TD-></TR-></TABLE-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3ASqlInterval"->SqlInterval</A-> </TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"->= <A HREF="#v%3ASqlIntervalMonthT"->SqlIntervalMonthT</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ASqlIntervalYearT"->SqlIntervalYearT</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ASqlIntervalYearToMonthT"->SqlIntervalYearToMonthT</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ASqlIntervalDayT"->SqlIntervalDayT</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ASqlIntervalHourT"->SqlIntervalHourT</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ASqlIntervalMinuteT"->SqlIntervalMinuteT</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ASqlIntervalSecondT"->SqlIntervalSecondT</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ASqlIntervalDayToHourT"->SqlIntervalDayToHourT</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ASqlIntervalDayToMinuteT"->SqlIntervalDayToMinuteT</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ASqlIntervalDayToSecondT"->SqlIntervalDayToSecondT</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ASqlIntervalHourToMinuteT"->SqlIntervalHourToMinuteT</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ASqlIntervalHourToSecondT"->SqlIntervalHourToSecondT</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ASqlIntervalMinuteToSecondT"->SqlIntervalMinuteToSecondT</A-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"->Documentation</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3ASqlColDesc"-></A-><B->SqlColDesc</B-> </TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="ndoc"-><P->The description of a column.-</P-><P->Fields are Nothing if the database backend cannot supply the-requested information.-</P-><P->The colSize field works like this:-</P-><P->For character types, the maximum width of the column. For numeric-types, the total number of digits allowed. See the ODBC manual for more.-</P-><P->The colOctetLength field is defined for character and binary types, and-gives the number of bytes the column requires, regardless of encoding.-</P-></TD-></TR-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="5" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3ASqlColDesc"-></A-><B->SqlColDesc</B-></TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="body" COLSPAN="2"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3AcolType"-></A-><B->colType</B-> :: <A HREF="Database-HDBC-ColTypes.html#t%3ASqlTypeId"->SqlTypeId</A-></TD-><TD CLASS="rdoc"->Type of data stored here-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AcolSize"-></A-><B->colSize</B-> :: (Maybe Int)</TD-><TD CLASS="rdoc"->The size of a column-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AcolOctetLength"-></A-><B->colOctetLength</B-> :: (Maybe Int)</TD-><TD CLASS="rdoc"->The maximum size in octets-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AcolDecDigits"-></A-><B->colDecDigits</B-> :: (Maybe Int)</TD-><TD CLASS="rdoc"->Digits to the right of the period-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AcolNullable"-></A-><B->colNullable</B-> :: (Maybe Bool)</TD-><TD CLASS="rdoc"->Whether NULL is acceptable-</TD-></TR-></TABLE-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:SqlColDesc')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:SqlColDesc" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->Eq <A HREF="Database-HDBC-ColTypes.html#t%3ASqlColDesc"->SqlColDesc</A-></TD-></TR-><TR-><TD CLASS="decl"->Read <A HREF="Database-HDBC-ColTypes.html#t%3ASqlColDesc"->SqlColDesc</A-></TD-></TR-><TR-><TD CLASS="decl"->Show <A HREF="Database-HDBC-ColTypes.html#t%3ASqlColDesc"->SqlColDesc</A-></TD-></TR-><TR-><TD CLASS="decl"->Typeable <A HREF="Database-HDBC-ColTypes.html#t%3ASqlColDesc"->SqlColDesc</A-></TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3ASqlTypeId"-></A-><B->SqlTypeId</B-> </TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="ndoc"-><P->The type identifier for a given column. -</P-><P->This represents the type of data stored in the column in the underlying-SQL engine. It does not form the entire column type; see <TT-><A HREF="Database-HDBC-ColTypes.html#t%3ASqlColDesc"->SqlColDesc</A-></TT-> for-that.-</P-><P->These types correspond mainly to those defined by ODBC. -</P-></TD-></TR-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3ASqlCharT"-></A-><B->SqlCharT</B-></TD-><TD CLASS="rdoc"->Fixed-width character strings-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASqlVarCharT"-></A-><B->SqlVarCharT</B-></TD-><TD CLASS="rdoc"->Variable-width character strings-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASqlLongVarCharT"-></A-><B->SqlLongVarCharT</B-></TD-><TD CLASS="rdoc"->Variable-width character strings, max length implementation dependant-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASqlWCharT"-></A-><B->SqlWCharT</B-></TD-><TD CLASS="rdoc"->Fixed-width Unicode strings-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASqlWVarCharT"-></A-><B->SqlWVarCharT</B-></TD-><TD CLASS="rdoc"->Variable-width Unicode strings-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASqlWLongVarCharT"-></A-><B->SqlWLongVarCharT</B-></TD-><TD CLASS="rdoc"->Variable-width Unicode strings, max length implementation dependant-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASqlDecimalT"-></A-><B->SqlDecimalT</B-></TD-><TD CLASS="rdoc"->Signed exact values-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASqlNumericT"-></A-><B->SqlNumericT</B-></TD-><TD CLASS="rdoc"->Signed exact integer values-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASqlSmallIntT"-></A-><B->SqlSmallIntT</B-></TD-><TD CLASS="rdoc"->16-bit integer values-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASqlIntegerT"-></A-><B->SqlIntegerT</B-></TD-><TD CLASS="rdoc"->32-bit integer values-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASqlRealT"-></A-><B->SqlRealT</B-></TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASqlFloatT"-></A-><B->SqlFloatT</B-></TD-><TD CLASS="rdoc"->Signed inexact floating-point values-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASqlDoubleT"-></A-><B->SqlDoubleT</B-></TD-><TD CLASS="rdoc"->Signed inexact double-precision values-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASqlBitT"-></A-><B->SqlBitT</B-></TD-><TD CLASS="rdoc"->A single bit-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASqlTinyIntT"-></A-><B->SqlTinyIntT</B-></TD-><TD CLASS="rdoc"->8-bit integer values-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASqlBigIntT"-></A-><B->SqlBigIntT</B-></TD-><TD CLASS="rdoc"->64-bit integer values-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASqlBinaryT"-></A-><B->SqlBinaryT</B-></TD-><TD CLASS="rdoc"->Fixed-length binary data-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASqlVarBinaryT"-></A-><B->SqlVarBinaryT</B-></TD-><TD CLASS="rdoc"->Variable-length binary data-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASqlLongVarBinaryT"-></A-><B->SqlLongVarBinaryT</B-></TD-><TD CLASS="rdoc"->Variable-length binary data, max length implementation dependant-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASqlDateT"-></A-><B->SqlDateT</B-></TD-><TD CLASS="rdoc"->A date-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASqlTimeT"-></A-><B->SqlTimeT</B-></TD-><TD CLASS="rdoc"->A time-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASqlTimestampT"-></A-><B->SqlTimestampT</B-></TD-><TD CLASS="rdoc"->Combined date and time-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASqlUTCDateTimeT"-></A-><B->SqlUTCDateTimeT</B-></TD-><TD CLASS="rdoc"->UTC date/time-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASqlUTCTimeT"-></A-><B->SqlUTCTimeT</B-></TD-><TD CLASS="rdoc"->UTC time-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASqlIntervalT"-></A-><B->SqlIntervalT</B-> <A HREF="Database-HDBC-ColTypes.html#t%3ASqlInterval"->SqlInterval</A-></TD-><TD CLASS="rdoc"->A time or date difference-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASqlGUIDT"-></A-><B->SqlGUIDT</B-></TD-><TD CLASS="rdoc"->Global unique identifier-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASqlUnknownT"-></A-><B->SqlUnknownT</B-> String</TD-><TD CLASS="rdoc"->A type not represented here; implementation-specific information in the String-</TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:SqlTypeId')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:SqlTypeId" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->Eq <A HREF="Database-HDBC-ColTypes.html#t%3ASqlTypeId"->SqlTypeId</A-></TD-></TR-><TR-><TD CLASS="decl"->Read <A HREF="Database-HDBC-ColTypes.html#t%3ASqlTypeId"->SqlTypeId</A-></TD-></TR-><TR-><TD CLASS="decl"->Show <A HREF="Database-HDBC-ColTypes.html#t%3ASqlTypeId"->SqlTypeId</A-></TD-></TR-><TR-><TD CLASS="decl"->Typeable <A HREF="Database-HDBC-ColTypes.html#t%3ASqlTypeId"->SqlTypeId</A-></TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3ASqlInterval"-></A-><B->SqlInterval</B-> </TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="ndoc"->The different types of intervals in SQL. -</TD-></TR-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3ASqlIntervalMonthT"-></A-><B->SqlIntervalMonthT</B-></TD-><TD CLASS="rdoc"->Difference in months-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASqlIntervalYearT"-></A-><B->SqlIntervalYearT</B-></TD-><TD CLASS="rdoc"->Difference in years-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASqlIntervalYearToMonthT"-></A-><B->SqlIntervalYearToMonthT</B-></TD-><TD CLASS="rdoc"->Difference in years+months-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASqlIntervalDayT"-></A-><B->SqlIntervalDayT</B-></TD-><TD CLASS="rdoc"->Difference in days-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASqlIntervalHourT"-></A-><B->SqlIntervalHourT</B-></TD-><TD CLASS="rdoc"->Difference in hours-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASqlIntervalMinuteT"-></A-><B->SqlIntervalMinuteT</B-></TD-><TD CLASS="rdoc"->Difference in minutes-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASqlIntervalSecondT"-></A-><B->SqlIntervalSecondT</B-></TD-><TD CLASS="rdoc"->Difference in seconds-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASqlIntervalDayToHourT"-></A-><B->SqlIntervalDayToHourT</B-></TD-><TD CLASS="rdoc"->Difference in days+hours-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASqlIntervalDayToMinuteT"-></A-><B->SqlIntervalDayToMinuteT</B-></TD-><TD CLASS="rdoc"->Difference in days+minutes-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASqlIntervalDayToSecondT"-></A-><B->SqlIntervalDayToSecondT</B-></TD-><TD CLASS="rdoc"->Difference in days+seconds-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASqlIntervalHourToMinuteT"-></A-><B->SqlIntervalHourToMinuteT</B-></TD-><TD CLASS="rdoc"->Difference in hours+minutes-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASqlIntervalHourToSecondT"-></A-><B->SqlIntervalHourToSecondT</B-></TD-><TD CLASS="rdoc"->Difference in hours+seconds-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASqlIntervalMinuteToSecondT"-></A-><B->SqlIntervalMinuteToSecondT</B-></TD-><TD CLASS="rdoc"->Difference in minutes+seconds-</TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:SqlInterval')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:SqlInterval" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->Eq <A HREF="Database-HDBC-ColTypes.html#t%3ASqlInterval"->SqlInterval</A-></TD-></TR-><TR-><TD CLASS="decl"->Read <A HREF="Database-HDBC-ColTypes.html#t%3ASqlInterval"->SqlInterval</A-></TD-></TR-><TR-><TD CLASS="decl"->Show <A HREF="Database-HDBC-ColTypes.html#t%3ASqlInterval"->SqlInterval</A-></TD-></TR-><TR-><TD CLASS="decl"->Typeable <A HREF="Database-HDBC-ColTypes.html#t%3ASqlInterval"->SqlInterval</A-></TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="botbar"->Produced by <A HREF="http://www.haskell.org/haddock/"->Haddock</A-> version 0.7</TD-></TR-></TABLE-></BODY-></HTML->
− doc/Database-HDBC-DriverUtils.html
@@ -1,253 +0,0 @@-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">-<!--Rendered using the Haskell Html Library v0.2-->-<HTML-><HEAD-><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"-><TITLE->Database.HDBC.DriverUtils</TITLE-><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"-><SCRIPT SRC="haddock.js" TYPE="text/javascript"-></SCRIPT-></HEAD-><BODY-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="topbar"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD-><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "-></TD-><TD CLASS="title"->Haskell Database Connectivity (HDBC)</TD-><TD CLASS="topbut"-><A HREF="index.html"->Contents</A-></TD-><TD CLASS="topbut"-><A HREF="doc-index.html"->Index</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="modulebar"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD-><FONT SIZE="6"->Database.HDBC.DriverUtils</FONT-></TD-><TD ALIGN="right"-><TABLE CLASS="narrow" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="infohead"->Portability</TD-><TD CLASS="infoval"->portable</TD-></TR-><TR-><TD CLASS="infohead"->Stability</TD-><TD CLASS="infoval"->provisional</TD-></TR-><TR-><TD CLASS="infohead"->Maintainer</TD-><TD CLASS="infoval"->John Goerzen <jgoerzen@complete.org></TD-></TR-></TABLE-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"->Description</TD-></TR-><TR-><TD CLASS="doc"-><P->Utilities for database backend drivers.-</P-><P->Please note: this module is intended for authors of database driver libraries-only. Authors of applications using HDBC should use <TT-><A HREF="Database.html#t%3AHDBC"->HDBC</A-></TT->-exclusively.-</P-><P->Written by John Goerzen, jgoerzen@complete.org-</P-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"->Synopsis</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->type</SPAN-> <A HREF="#t%3AChildList"->ChildList</A-> = MVar [Weak <A HREF="Database-HDBC-Types.html#t%3AStatement"->Statement</A->]</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AcloseAllChildren"->closeAllChildren</A-> :: <A HREF="Database-HDBC-DriverUtils.html#t%3AChildList"->ChildList</A-> -> IO ()</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AaddChild"->addChild</A-> :: <A HREF="Database-HDBC-DriverUtils.html#t%3AChildList"->ChildList</A-> -> <A HREF="Database-HDBC-Types.html#t%3AStatement"->Statement</A-> -> IO ()</TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"->Documentation</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->type</SPAN-> <A NAME="t%3AChildList"-></A-><B->ChildList</B-> = MVar [Weak <A HREF="Database-HDBC-Types.html#t%3AStatement"->Statement</A->]</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="decl"-><A NAME="v%3AcloseAllChildren"-></A-><B->closeAllChildren</B-> :: <A HREF="Database-HDBC-DriverUtils.html#t%3AChildList"->ChildList</A-> -> IO ()</TD-></TR-><TR-><TD CLASS="doc"-><P->Close all children. Intended to be called by the <TT-><A HREF="Database-HDBC-Types.html#v%3Adisconnect"->disconnect</A-></TT-> function-in <TT-><A HREF="Database-HDBC-Types.html#t%3AConnection"->Connection</A-></TT->. -</P-><P->There may be a potential race condition wherein a call to newSth at the same-time as a call to this function may result in the new child not being closed.-</P-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="decl"-><A NAME="v%3AaddChild"-></A-><B->addChild</B-> :: <A HREF="Database-HDBC-DriverUtils.html#t%3AChildList"->ChildList</A-> -> <A HREF="Database-HDBC-Types.html#t%3AStatement"->Statement</A-> -> IO ()</TD-></TR-><TR-><TD CLASS="doc"->Adds a new child to the existing list. Also takes care of registering-a finalizer for it, to remove it from the list when possible. -</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="botbar"->Produced by <A HREF="http://www.haskell.org/haddock/"->Haddock</A-> version 0.7</TD-></TR-></TABLE-></BODY-></HTML->
− doc/Database-HDBC-Types.html
@@ -1,1799 +0,0 @@-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">-<!--Rendered using the Haskell Html Library v0.2-->-<HTML-><HEAD-><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"-><TITLE->Database.HDBC.Types</TITLE-><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"-><SCRIPT SRC="haddock.js" TYPE="text/javascript"-></SCRIPT-></HEAD-><BODY-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="topbar"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD-><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "-></TD-><TD CLASS="title"->Haskell Database Connectivity (HDBC)</TD-><TD CLASS="topbut"-><A HREF="index.html"->Contents</A-></TD-><TD CLASS="topbut"-><A HREF="doc-index.html"->Index</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="modulebar"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD-><FONT SIZE="6"->Database.HDBC.Types</FONT-></TD-><TD ALIGN="right"-><TABLE CLASS="narrow" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="infohead"->Portability</TD-><TD CLASS="infoval"->portable</TD-></TR-><TR-><TD CLASS="infohead"->Stability</TD-><TD CLASS="infoval"->provisional</TD-></TR-><TR-><TD CLASS="infohead"->Maintainer</TD-><TD CLASS="infoval"->John Goerzen <jgoerzen@complete.org></TD-></TR-></TABLE-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"->Description</TD-></TR-><TR-><TD CLASS="doc"-><P->Types for HDBC.-</P-><P->Please note: this module is intended for authors of database driver libraries-only. Authors of applications using HDBC should use <TT-><A HREF="Database.html#t%3AHDBC"->HDBC</A-></TT->-exclusively.-</P-><P->Written by John Goerzen, jgoerzen@complete.org-</P-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"->Synopsis</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3AConnection"->Connection</A-> = <A HREF="#v%3AConnection"->Connection</A-> {<TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="recfield"-><A HREF="#v%3Adisconnect"->disconnect</A-> :: (IO ())</TD-></TR-><TR-><TD CLASS="recfield"-><A HREF="#v%3Acommit"->commit</A-> :: (IO ())</TD-></TR-><TR-><TD CLASS="recfield"-><A HREF="#v%3Arollback"->rollback</A-> :: (IO ())</TD-></TR-><TR-><TD CLASS="recfield"-><A HREF="#v%3Arun"->run</A-> :: (String -> [<A HREF="Database-HDBC-Types.html#t%3ASqlValue"->SqlValue</A->] -> IO Integer)</TD-></TR-><TR-><TD CLASS="recfield"-><A HREF="#v%3Aprepare"->prepare</A-> :: (String -> IO <A HREF="Database-HDBC-Types.html#t%3AStatement"->Statement</A->)</TD-></TR-><TR-><TD CLASS="recfield"-><A HREF="#v%3Aclone"->clone</A-> :: (IO <A HREF="Database-HDBC-Types.html#t%3AConnection"->Connection</A->)</TD-></TR-><TR-><TD CLASS="recfield"-><A HREF="#v%3AhdbcDriverName"->hdbcDriverName</A-> :: String</TD-></TR-><TR-><TD CLASS="recfield"-><A HREF="#v%3AhdbcClientVer"->hdbcClientVer</A-> :: String</TD-></TR-><TR-><TD CLASS="recfield"-><A HREF="#v%3AproxiedClientName"->proxiedClientName</A-> :: String</TD-></TR-><TR-><TD CLASS="recfield"-><A HREF="#v%3AproxiedClientVer"->proxiedClientVer</A-> :: String</TD-></TR-><TR-><TD CLASS="recfield"-><A HREF="#v%3AdbServerVer"->dbServerVer</A-> :: String</TD-></TR-><TR-><TD CLASS="recfield"-><A HREF="#v%3AdbTransactionSupport"->dbTransactionSupport</A-> :: Bool</TD-></TR-><TR-><TD CLASS="recfield"-><A HREF="#v%3AgetTables"->getTables</A-> :: (IO [String])</TD-></TR-><TR-><TD CLASS="recfield"-><A HREF="#v%3AdescribeTable"->describeTable</A-> :: (String -> IO [(String, <A HREF="Database-HDBC-ColTypes.html#t%3ASqlColDesc"->SqlColDesc</A->)])</TD-></TR-></TABLE->}</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3AStatement"->Statement</A-> = <A HREF="#v%3AStatement"->Statement</A-> {<TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="recfield"-><A HREF="#v%3Aexecute"->execute</A-> :: ([<A HREF="Database-HDBC-Types.html#t%3ASqlValue"->SqlValue</A->] -> IO Integer)</TD-></TR-><TR-><TD CLASS="recfield"-><A HREF="#v%3AexecuteMany"->executeMany</A-> :: ([[<A HREF="Database-HDBC-Types.html#t%3ASqlValue"->SqlValue</A->]] -> IO ())</TD-></TR-><TR-><TD CLASS="recfield"-><A HREF="#v%3Afinish"->finish</A-> :: (IO ())</TD-></TR-><TR-><TD CLASS="recfield"-><A HREF="#v%3AfetchRow"->fetchRow</A-> :: (IO (Maybe [<A HREF="Database-HDBC-Types.html#t%3ASqlValue"->SqlValue</A->]))</TD-></TR-><TR-><TD CLASS="recfield"-><A HREF="#v%3AgetColumnNames"->getColumnNames</A-> :: (IO [String])</TD-></TR-><TR-><TD CLASS="recfield"-><A HREF="#v%3AoriginalQuery"->originalQuery</A-> :: String</TD-></TR-><TR-><TD CLASS="recfield"-><A HREF="#v%3AdescribeResult"->describeResult</A-> :: (IO [(String, <A HREF="Database-HDBC-ColTypes.html#t%3ASqlColDesc"->SqlColDesc</A->)])</TD-></TR-></TABLE->}</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3ASqlError"->SqlError</A-> = <A HREF="#v%3ASqlError"->SqlError</A-> {<TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="recfield"-><A HREF="#v%3AseState"->seState</A-> :: String</TD-></TR-><TR-><TD CLASS="recfield"-><A HREF="#v%3AseNativeError"->seNativeError</A-> :: Int</TD-></TR-><TR-><TD CLASS="recfield"-><A HREF="#v%3AseErrorMsg"->seErrorMsg</A-> :: String</TD-></TR-></TABLE->}</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->class</SPAN-> Show a => <A HREF="#t%3ASqlType"->SqlType</A-> a <SPAN CLASS="keyword"->where</SPAN-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"-><A HREF="#v%3AtoSql"->toSql</A-> :: a -> <A HREF="Database-HDBC-Types.html#t%3ASqlValue"->SqlValue</A-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AfromSql"->fromSql</A-> :: <A HREF="Database-HDBC-Types.html#t%3ASqlValue"->SqlValue</A-> -> a</TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AnToSql"->nToSql</A-> :: Integral a => a -> <A HREF="Database-HDBC-Types.html#t%3ASqlValue"->SqlValue</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AiToSql"->iToSql</A-> :: Int -> <A HREF="Database-HDBC-Types.html#t%3ASqlValue"->SqlValue</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3ASqlValue"->SqlValue</A-> </TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"->= <A HREF="#v%3ASqlString"->SqlString</A-> String</TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ASqlWord32"->SqlWord32</A-> Word32</TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ASqlWord64"->SqlWord64</A-> Word64</TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ASqlInt32"->SqlInt32</A-> Int32</TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ASqlInt64"->SqlInt64</A-> Int64</TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ASqlInteger"->SqlInteger</A-> Integer</TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ASqlChar"->SqlChar</A-> Char</TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ASqlBool"->SqlBool</A-> Bool</TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ASqlDouble"->SqlDouble</A-> Double</TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ASqlRational"->SqlRational</A-> Rational</TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ASqlEpochTime"->SqlEpochTime</A-> Integer</TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ASqlTimeDiff"->SqlTimeDiff</A-> Integer</TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ASqlNull"->SqlNull</A-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"->Documentation</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3AConnection"-></A-><B->Connection</B-> </TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="ndoc"-><P->Main database handle object.-</P-><P->A <TT-><A HREF="Database-HDBC-Types.html#t%3AConnection"->Connection</A-></TT-> object is created by specific functions in the module for an-individual database. That is, the connect function -- which creates-this object -- is not standardized through the HDBC interface.-</P-><P->A connection is closed by a call to <TT-><A HREF="Database-HDBC-Types.html#v%3Adisconnect"->disconnect</A-></TT->.-</P-><P->A call to <TT-><A HREF="Database-HDBC-Types.html#v%3Acommit"->commit</A-></TT-> is required to make sure that your changes get committed-to the database. In other words, HDBC has <EM->no support for autocommit</EM->, which-we consider an outdated notion.-</P-></TD-></TR-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="5" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3AConnection"-></A-><B->Connection</B-></TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="body" COLSPAN="2"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3Adisconnect"-></A-><B->disconnect</B-> :: (IO ())</TD-><TD CLASS="rdoc"-><P->Disconnect from the remote database.-</P-><P->You do not need to explicitly close a Connection object, but you may do so if-you so desire. If you don't, the object will disconnect from the database-in a sane way when it is garbage-collected. However, a disconnection may-raise an error, so you are encouraged to explicitly call <TT-><A HREF="Database-HDBC-Types.html#v%3Adisconnect"->disconnect</A-></TT->. Also,-garbage collection may not run when the program terminates, and some databases-really like an explicit disconnect.-</P-><P->So, bottom line is, you're best off calling <TT-><A HREF="Database-HDBC-Types.html#v%3Adisconnect"->disconnect</A-></TT-> directly, but the-world won't end if you forget.-</P-><P->This function discards any data not committed already. Database driver-implementators should explicitly call <TT-><A HREF="Database-HDBC-Types.html#v%3Arollback"->rollback</A-></TT-> if their databases don't-do this automatically on disconnect.-</P-><P->Bad Things (TM) could happen if you call this while you have <TT-><A HREF="Database-HDBC-Types.html#t%3AStatement"->Statement</A-></TT->s -active. In more precise language, the results in such situations are undefined-and vary by database. So don't do it.-</P-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3Acommit"-></A-><B->commit</B-> :: (IO ())</TD-><TD CLASS="rdoc"-><P->Commit any pending data to the database.-</P-><P->Required to make any changes take effect. -</P-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3Arollback"-></A-><B->rollback</B-> :: (IO ())</TD-><TD CLASS="rdoc"->Roll back to the state the database was in prior to the- last <TT-><A HREF="Database-HDBC-Types.html#v%3Acommit"->commit</A-></TT-> or <TT-><A HREF="Database-HDBC-Types.html#v%3Arollback"->rollback</A-></TT->. -</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3Arun"-></A-><B->run</B-> :: (String -> [<A HREF="Database-HDBC-Types.html#t%3ASqlValue"->SqlValue</A->] -> IO Integer)</TD-><TD CLASS="rdoc"->Execute a single SQL query. Returns the number- of rows modified (see <TT-><A HREF="Database-HDBC-Types.html#v%3Aexecute"->execute</A-></TT-> for details).- The second parameter is a list- of replacement values, if any. -</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3Aprepare"-></A-><B->prepare</B-> :: (String -> IO <A HREF="Database-HDBC-Types.html#t%3AStatement"->Statement</A->)</TD-><TD CLASS="rdoc"-><P->Prepares a statement for execution. -</P-><P->Question marks in the statement will be replaced by- positional parameters in a later call to <TT-><A HREF="Database-HDBC-Types.html#v%3Aexecute"->execute</A-></TT->.-</P-><P->Please note that, depending on the database- and the driver, errors in your SQL may be raised- either here or by <TT-><A HREF="Database-HDBC-Types.html#v%3Aexecute"->execute</A-></TT->. Make sure you- handle exceptions both places if necessary. -</P-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3Aclone"-></A-><B->clone</B-> :: (IO <A HREF="Database-HDBC-Types.html#t%3AConnection"->Connection</A->)</TD-><TD CLASS="rdoc"-><P->Create a new <TT-><A HREF="Database-HDBC-Types.html#t%3AConnection"->Connection</A-></TT-> object, pointed at the same- server as this object is. This will generally establish- a separate physical connection.-</P-><P->When you wish to establish multiple connections to a single- server, the correct way to do so is to establish the- first connection with the driver-specific connection- function, and then clone it for each additional connection.-</P-><P->This can be important when a database doesn't provide- much thread support itself, and the HDBC driver module- must serialize access to a particular database.-</P-><P->This can also be a handy utility function whenever you- need a separate connection to whatever database you are- connected to already. -</P-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AhdbcDriverName"-></A-><B->hdbcDriverName</B-> :: String</TD-><TD CLASS="rdoc"->The name of the HDBC driver module for this connection.- Ideally would be the same as the database name portion- of the Cabal package name. For instance, "sqlite3"- or "odbc". This is the layer that is bound most- tightly to HDBC. -</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AhdbcClientVer"-></A-><B->hdbcClientVer</B-> :: String</TD-><TD CLASS="rdoc"->The version of the C (or whatever) client library- that the HDBC driver module is bound to. The meaning- of this is driver-specific. For an ODBC or similar- proxying driver, this should be the version of the- ODBC library, not the eventual DB client driver. -</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AproxiedClientName"-></A-><B->proxiedClientName</B-> :: String</TD-><TD CLASS="rdoc"->In the case of a system such as ODBC, the name of- the database client/server in use, if available.- For others,- identical to <TT-><A HREF="Database-HDBC-Types.html#v%3AhdbcDriverName"->hdbcDriverName</A-></TT->. -</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AproxiedClientVer"-></A-><B->proxiedClientVer</B-> :: String</TD-><TD CLASS="rdoc"->In the case of a system such as ODBC, the version of- the database client in use, if available. For others,- identical to <TT-><A HREF="Database-HDBC-Types.html#v%3AhdbcClientVer"->hdbcClientVer</A-></TT->. This is the next layer- out past the HDBC driver. -</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AdbServerVer"-></A-><B->dbServerVer</B-> :: String</TD-><TD CLASS="rdoc"->The version of the database server, if available. -</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AdbTransactionSupport"-></A-><B->dbTransactionSupport</B-> :: Bool</TD-><TD CLASS="rdoc"-><P->Whether or not the current database supports transactions.- If False, then <TT-><A HREF="Database-HDBC-Types.html#v%3Acommit"->commit</A-></TT-> and <TT-><A HREF="Database-HDBC-Types.html#v%3Arollback"->rollback</A-></TT-> should be expected- to raise errors.-</P-><P->MySQL is the only commonly-used database that is known- to not support transactions entirely. Please see- the MySQL notes in the ODBC driver for more information. -</P-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AgetTables"-></A-><B->getTables</B-> :: (IO [String])</TD-><TD CLASS="rdoc"-><P->The names of all tables accessible by the current- connection, excluding special meta-tables (system tables).-</P-><P->You should expect this to be returned in the same manner- as a result from <TT-><A HREF="Database-HDBC.html#v%3AfetchAllRows"->fetchAllRows</A-></TT->.-</P-><P->All results should be converted to lowercase for you- before you see them.-</P-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AdescribeTable"-></A-><B->describeTable</B-> :: (String -> IO [(String, <A HREF="Database-HDBC-ColTypes.html#t%3ASqlColDesc"->SqlColDesc</A->)])</TD-><TD CLASS="rdoc"-><P->Obtain information about the columns in a specific- table. The String in the result- set is the column name.-</P-><P->You should expect this to be returned in the same manner- as a result from <TT-><A HREF="Database-HDBC.html#v%3AfetchAllRows"->fetchAllRows</A-></TT->.-</P-><P->All results should be converted to lowercase for you- before you see them.-</P-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3AStatement"-></A-><B->Statement</B-> </TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="5" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3AStatement"-></A-><B->Statement</B-></TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="body" COLSPAN="2"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3Aexecute"-></A-><B->execute</B-> :: ([<A HREF="Database-HDBC-Types.html#t%3ASqlValue"->SqlValue</A->] -> IO Integer)</TD-><TD CLASS="rdoc"-><P->Execute the prepared statement, passing in the given positional- parameters (that should take the place of the question marks- in the call to <TT-><A HREF="Database-HDBC-Types.html#v%3Aprepare"->prepare</A-></TT->).-</P-><P->For non-SELECT queries, the return value is the number of- rows modified, if known. If no rows were modified, you get 0.- If the value is unknown, you get -1. All current HDBC drivers- support this function and should never return -1.-</P-><P->For SELECT queries, you will always get 0.-</P-><P->This function should automatically call finish() to finish the previous- execution, if necessary.-</P-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AexecuteMany"-></A-><B->executeMany</B-> :: ([[<A HREF="Database-HDBC-Types.html#t%3ASqlValue"->SqlValue</A->]] -> IO ())</TD-><TD CLASS="rdoc"-><P->Execute the query with many rows. - The return value is the return value from the final row - as if you had called <TT-><A HREF="Database-HDBC-Types.html#v%3Aexecute"->execute</A-></TT-> on it.-</P-><P->Due to optimizations that are possible due to different- databases and driver designs, this can often be significantly- faster than using <TT-><A HREF="Database-HDBC-Types.html#v%3Aexecute"->execute</A-></TT-> multiple times since queries- need to be compiled only once.-</P-><P->This is most useful for non-SELECT statements. -</P-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3Afinish"-></A-><B->finish</B-> :: (IO ())</TD-><TD CLASS="rdoc"->Abort a query in progress -- usually not needed. -</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AfetchRow"-></A-><B->fetchRow</B-> :: (IO (Maybe [<A HREF="Database-HDBC-Types.html#t%3ASqlValue"->SqlValue</A->]))</TD-><TD CLASS="rdoc"->Fetches one row from the DB. Returns Nothing if there- are no more rows. Will automatically call <TT-><A HREF="Database-HDBC-Types.html#v%3Afinish"->finish</A-></TT-> when- the last row is read. -</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AgetColumnNames"-></A-><B->getColumnNames</B-> :: (IO [String])</TD-><TD CLASS="rdoc"-><P->Returns a list of the column names in the result.- For maximum portability, you should not assume that- information is available until after an <TT-><A HREF="Database-HDBC-Types.html#v%3Aexecute"->execute</A-></TT-> function- has been run.-</P-><P->Information is returned here directly as returned- by the underlying database layer. Note that different- databases have different rules about capitalization- of return values and about representation of names- of columns that are not simple columns. For this reason,- it is suggested that you treat this information for- display purposes only. Failing that, you should convert- to lower (or upper) case, and use <TT->AS</TT-> clauses for- anything other than simple columns.-</P-><P->A simple getColumnNames implementation could simply- apply <TT->map fst</TT-> to the return value of <TT-><A HREF="Database-HDBC-Types.html#v%3AdescribeResult"->describeResult</A-></TT->.-</P-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AoriginalQuery"-></A-><B->originalQuery</B-> :: String</TD-><TD CLASS="rdoc"->The original query that this <TT-><A HREF="Database-HDBC-Types.html#t%3AStatement"->Statement</A-></TT-> was prepared- with. -</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AdescribeResult"-></A-><B->describeResult</B-> :: (IO [(String, <A HREF="Database-HDBC-ColTypes.html#t%3ASqlColDesc"->SqlColDesc</A->)])</TD-><TD CLASS="rdoc"-><P->Obtain information about the columns in the result set.- Must be run only after <TT-><A HREF="Database-HDBC-Types.html#v%3Aexecute"->execute</A-></TT->. The String in the result- set is the column name.-</P-><P->You should expect this to be returned in the same manner- as a result from <TT-><A HREF="Database-HDBC.html#v%3AfetchAllRows"->fetchAllRows</A-></TT->.-</P-><P->All results should be converted to lowercase for you- before you see them.-</P-><P->Please see caveats under <TT-><A HREF="Database-HDBC-Types.html#v%3AgetColumnNames"->getColumnNames</A-></TT-> for information- on the column name field here.-</P-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3ASqlError"-></A-><B->SqlError</B-> </TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="ndoc"-><P->The main HDBC exception object. As much information as possible-is passed from the database through to the application through this object.-</P-><P->Errors generated in the Haskell layer will have seNativeError set to -1.-</P-></TD-></TR-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="5" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3ASqlError"-></A-><B->SqlError</B-></TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="body" COLSPAN="2"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3AseState"-></A-><B->seState</B-> :: String</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AseNativeError"-></A-><B->seNativeError</B-> :: Int</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AseErrorMsg"-></A-><B->seErrorMsg</B-> :: String</TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:SqlError')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:SqlError" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->Eq <A HREF="Database-HDBC-Types.html#t%3ASqlError"->SqlError</A-></TD-></TR-><TR-><TD CLASS="decl"->Read <A HREF="Database-HDBC-Types.html#t%3ASqlError"->SqlError</A-></TD-></TR-><TR-><TD CLASS="decl"->Show <A HREF="Database-HDBC-Types.html#t%3ASqlError"->SqlError</A-></TD-></TR-><TR-><TD CLASS="decl"->Typeable <A HREF="Database-HDBC-Types.html#t%3ASqlError"->SqlError</A-></TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->class</SPAN-> Show a => <A NAME="t%3ASqlType"-></A-><B->SqlType</B-> a <SPAN CLASS="keyword"->where</SPAN-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="ndoc"-><P->Conversions to and from <TT-><A HREF="Database-HDBC-Types.html#t%3ASqlValue"->SqlValue</A-></TT->s and standard Haskell types.-</P-><P->Conversions are powerful; for instance, you can call <TT-><A HREF="Database-HDBC-Types.html#v%3AfromSql"->fromSql</A-></TT-> on a SqlInt32-and get a String or a Double out of it. This class attempts to Do-The Right Thing whenever possible, and will raise an error when asked to-do something incorrect. In particular, when converting to any type-except a Maybe, <TT-><A HREF="Database-HDBC-Types.html#v%3ASqlNull"->SqlNull</A-></TT-> as the input will cause an error to be raised.-</P-><P->Here are some notes about conversion:-</P-><UL-><LI-> Fractions of a second are not preserved on time values-</LI-></UL-><P->See also <TT-><A HREF="Database-HDBC-Types.html#v%3AnToSql"->nToSql</A-></TT->, <TT-><A HREF="Database-HDBC-Types.html#v%3AiToSql"->iToSql</A-></TT->.-</P-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="section4"->Methods</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"-><A NAME="v%3AtoSql"-></A-><B->toSql</B-> :: a -> <A HREF="Database-HDBC-Types.html#t%3ASqlValue"->SqlValue</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A NAME="v%3AfromSql"-></A-><B->fromSql</B-> :: <A HREF="Database-HDBC-Types.html#t%3ASqlValue"->SqlValue</A-> -> a</TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:SqlType')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:SqlType" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"-><A HREF="Database-HDBC-Types.html#t%3ASqlType"->SqlType</A-> Bool</TD-></TR-><TR-><TD CLASS="decl"-><A HREF="Database-HDBC-Types.html#t%3ASqlType"->SqlType</A-> CalendarTime</TD-></TR-><TR-><TD CLASS="decl"-><A HREF="Database-HDBC-Types.html#t%3ASqlType"->SqlType</A-> Char</TD-></TR-><TR-><TD CLASS="decl"-><A HREF="Database-HDBC-Types.html#t%3ASqlType"->SqlType</A-> ClockTime</TD-></TR-><TR-><TD CLASS="decl"-><A HREF="Database-HDBC-Types.html#t%3ASqlType"->SqlType</A-> Double</TD-></TR-><TR-><TD CLASS="decl"-><A HREF="Database-HDBC-Types.html#t%3ASqlType"->SqlType</A-> Int</TD-></TR-><TR-><TD CLASS="decl"-><A HREF="Database-HDBC-Types.html#t%3ASqlType"->SqlType</A-> Int32</TD-></TR-><TR-><TD CLASS="decl"-><A HREF="Database-HDBC-Types.html#t%3ASqlType"->SqlType</A-> Int64</TD-></TR-><TR-><TD CLASS="decl"-><A HREF="Database-HDBC-Types.html#t%3ASqlType"->SqlType</A-> Integer</TD-></TR-><TR-><TD CLASS="decl"-><A HREF="Database-HDBC-Types.html#t%3ASqlType"->SqlType</A-> Rational</TD-></TR-><TR-><TD CLASS="decl"-><A HREF="Database-HDBC-Types.html#t%3ASqlType"->SqlType</A-> String</TD-></TR-><TR-><TD CLASS="decl"-><A HREF="Database-HDBC-Types.html#t%3ASqlType"->SqlType</A-> TimeDiff</TD-></TR-><TR-><TD CLASS="decl"-><A HREF="Database-HDBC-Types.html#t%3ASqlType"->SqlType</A-> Word32</TD-></TR-><TR-><TD CLASS="decl"-><A HREF="Database-HDBC-Types.html#t%3ASqlType"->SqlType</A-> Word64</TD-></TR-><TR-><TD CLASS="decl"-><A HREF="Database-HDBC-Types.html#t%3ASqlType"->SqlType</A-> a => <A HREF="Database-HDBC-Types.html#t%3ASqlType"->SqlType</A-> (Maybe a)</TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="decl"-><A NAME="v%3AnToSql"-></A-><B->nToSql</B-> :: Integral a => a -> <A HREF="Database-HDBC-Types.html#t%3ASqlValue"->SqlValue</A-></TD-></TR-><TR-><TD CLASS="doc"->Converts any Integral type to a <TT-><A HREF="Database-HDBC-Types.html#t%3ASqlValue"->SqlValue</A-></TT-> by using toInteger. -</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="decl"-><A NAME="v%3AiToSql"-></A-><B->iToSql</B-> :: Int -> <A HREF="Database-HDBC-Types.html#t%3ASqlValue"->SqlValue</A-></TD-></TR-><TR-><TD CLASS="doc"->Convenience function for using numeric literals in your program. -</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3ASqlValue"-></A-><B->SqlValue</B-> </TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="ndoc"-><P->The main type for expressing Haskell values to SQL databases.-</P-><P->This type is used to marshall Haskell data to and from database APIs.-HDBC driver interfaces will do their best to use the most accurate and-efficient way to send a particular value to the database server.-</P-><P->Values read back from the server are put in the most appropriate <TT-><A HREF="Database-HDBC-Types.html#t%3ASqlValue"->SqlValue</A-></TT->-type. <TT-><A HREF="Database-HDBC-Types.html#v%3AfromSql"->fromSql</A-></TT-> can then be used to convert them into whatever type-is needed locally in Haskell.-</P-><P->Most people will use <TT-><A HREF="Database-HDBC-Types.html#v%3AtoSql"->toSql</A-></TT-> and <TT-><A HREF="Database-HDBC-Types.html#v%3AfromSql"->fromSql</A-></TT-> instead of manipulating-<TT-><A HREF="Database-HDBC-Types.html#t%3ASqlValue"->SqlValue</A-></TT->s directly.-</P-><P->The default representation of time values is an integer number of seconds.-Databases such as PostgreSQL with builtin timestamp types can will see-automatic conversion between these Haskell types to local types. Other-databases can just use an int or a string. -</P-><P->This behavior also exists for other types. For instance, many databases don't-have a Rational type, so they'll just use Haskell's show function and-store a Rational as a string.-</P-><P->Two SqlValues are considered to be equal if one of these hold (first one that-is true holds; if none are true, they are not equal):- * Both are NULL- * Both represent the same type and the encapsulated values are equal- * The values of each, when converted to a string, are equal. -</P-></TD-></TR-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3ASqlString"-></A-><B->SqlString</B-> String</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASqlWord32"-></A-><B->SqlWord32</B-> Word32</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASqlWord64"-></A-><B->SqlWord64</B-> Word64</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASqlInt32"-></A-><B->SqlInt32</B-> Int32</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASqlInt64"-></A-><B->SqlInt64</B-> Int64</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASqlInteger"-></A-><B->SqlInteger</B-> Integer</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASqlChar"-></A-><B->SqlChar</B-> Char</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASqlBool"-></A-><B->SqlBool</B-> Bool</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASqlDouble"-></A-><B->SqlDouble</B-> Double</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASqlRational"-></A-><B->SqlRational</B-> Rational</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASqlEpochTime"-></A-><B->SqlEpochTime</B-> Integer</TD-><TD CLASS="rdoc"->Representation of ClockTime or CalendarTime-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASqlTimeDiff"-></A-><B->SqlTimeDiff</B-> Integer</TD-><TD CLASS="rdoc"->Representation of TimeDiff-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASqlNull"-></A-><B->SqlNull</B-></TD-><TD CLASS="rdoc"->NULL in SQL or Nothing in Haskell-</TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:SqlValue')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:SqlValue" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->Eq <A HREF="Database-HDBC-Types.html#t%3ASqlValue"->SqlValue</A-></TD-></TR-><TR-><TD CLASS="decl"->Show <A HREF="Database-HDBC-Types.html#t%3ASqlValue"->SqlValue</A-></TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="botbar"->Produced by <A HREF="http://www.haskell.org/haddock/"->Haddock</A-> version 0.7</TD-></TR-></TABLE-></BODY-></HTML->
− doc/Database-HDBC.html
@@ -1,3433 +0,0 @@-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">-<!--Rendered using the Haskell Html Library v0.2-->-<HTML-><HEAD-><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"-><TITLE->Database.HDBC</TITLE-><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"-><SCRIPT SRC="haddock.js" TYPE="text/javascript"-></SCRIPT-></HEAD-><BODY-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="topbar"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD-><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "-></TD-><TD CLASS="title"->Haskell Database Connectivity (HDBC)</TD-><TD CLASS="topbut"-><A HREF="index.html"->Contents</A-></TD-><TD CLASS="topbut"-><A HREF="doc-index.html"->Index</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="modulebar"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD-><FONT SIZE="6"->Database.HDBC</FONT-></TD-><TD ALIGN="right"-><TABLE CLASS="narrow" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="infohead"->Portability</TD-><TD CLASS="infoval"->portable</TD-></TR-><TR-><TD CLASS="infohead"->Stability</TD-><TD CLASS="infoval"->provisional</TD-></TR-><TR-><TD CLASS="infohead"->Maintainer</TD-><TD CLASS="infoval"->John Goerzen <jgoerzen@complete.org></TD-></TR-></TABLE-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"-><B->Contents</B-></TD-></TR-><TR-><TD-><DL-><DT-><A HREF="#1"->Introduction-</A-></DT-><DD-><DL-><DT-><A HREF="#2"->Features-</A-></DT-><DT-><A HREF="#3"->Available Drivers-</A-></DT-></DL-></DD-><DT-><A HREF="#4"->Typing of transfer data-</A-></DT-><DT-><A HREF="#5"->Database Connections-</A-></DT-><DD-><DL-><DT-><A HREF="#6"->Preparing Queries-</A-></DT-><DT-><A HREF="#7"->Transaction Handling-</A-></DT-><DT-><A HREF="#8"->Connection Inquiries-</A-></DT-></DL-></DD-><DT-><A HREF="#9"->Statements-</A-></DT-><DD-><DL-><DT-><A HREF="#10"->Execution-</A-></DT-><DT-><A HREF="#11"->Fetching Results-</A-></DT-><DT-><A HREF="#12"->Statement Inquires-</A-></DT-><DT-><A HREF="#13"->Miscellaneous-</A-></DT-></DL-></DD-><DT-><A HREF="#14"->Exceptions-</A-></DT-><DT-><A HREF="#15"->Column Types-</A-></DT-><DT-><A HREF="#16"->Threading-</A-></DT-><DT-><A HREF="#17"->Copyright and License-</A-></DT-></DL-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"->Description</TD-></TR-><TR-><TD CLASS="doc"-><P->Welcome to HDBC, the Haskell Database Connectivity library.-</P-><P->Written by John Goerzen, jgoerzen@complete.org-</P-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"->Synopsis</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->class</SPAN-> Show a => <A HREF="#t%3ASqlType"->SqlType</A-> a <SPAN CLASS="keyword"->where</SPAN-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"-><A HREF="#v%3AtoSql"->toSql</A-> :: a -> <A HREF="Database-HDBC.html#t%3ASqlValue"->SqlValue</A-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AfromSql"->fromSql</A-> :: <A HREF="Database-HDBC.html#t%3ASqlValue"->SqlValue</A-> -> a</TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AnToSql"->nToSql</A-> :: Integral a => a -> <A HREF="Database-HDBC.html#t%3ASqlValue"->SqlValue</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AiToSql"->iToSql</A-> :: Int -> <A HREF="Database-HDBC.html#t%3ASqlValue"->SqlValue</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3ASqlValue"->SqlValue</A-> </TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"->= <A HREF="#v%3ASqlString"->SqlString</A-> String</TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ASqlWord32"->SqlWord32</A-> Word32</TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ASqlWord64"->SqlWord64</A-> Word64</TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ASqlInt32"->SqlInt32</A-> Int32</TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ASqlInt64"->SqlInt64</A-> Int64</TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ASqlInteger"->SqlInteger</A-> Integer</TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ASqlChar"->SqlChar</A-> Char</TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ASqlBool"->SqlBool</A-> Bool</TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ASqlDouble"->SqlDouble</A-> Double</TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ASqlRational"->SqlRational</A-> Rational</TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ASqlEpochTime"->SqlEpochTime</A-> Integer</TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ASqlTimeDiff"->SqlTimeDiff</A-> Integer</TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ASqlNull"->SqlNull</A-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3AConnection"->Connection</A-> </TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Adisconnect"->disconnect</A-> :: <A HREF="Database-HDBC.html#t%3AConnection"->Connection</A-> -> IO ()</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Aclone"->clone</A-> :: <A HREF="Database-HDBC.html#t%3AConnection"->Connection</A-> -> IO <A HREF="Database-HDBC.html#t%3AConnection"->Connection</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Arun"->run</A-> :: <A HREF="Database-HDBC.html#t%3AConnection"->Connection</A-> -> String -> [<A HREF="Database-HDBC.html#t%3ASqlValue"->SqlValue</A->] -> IO Integer</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AsRun"->sRun</A-> :: <A HREF="Database-HDBC.html#t%3AConnection"->Connection</A-> -> String -> [Maybe String] -> IO Integer</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Aprepare"->prepare</A-> :: <A HREF="Database-HDBC.html#t%3AConnection"->Connection</A-> -> String -> IO <A HREF="Database-HDBC.html#t%3AStatement"->Statement</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AquickQuery"->quickQuery</A-> :: <A HREF="Database-HDBC.html#t%3AConnection"->Connection</A-> -> String -> [<A HREF="Database-HDBC.html#t%3ASqlValue"->SqlValue</A->] -> IO [[<A HREF="Database-HDBC.html#t%3ASqlValue"->SqlValue</A->]]</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Acommit"->commit</A-> :: <A HREF="Database-HDBC.html#t%3AConnection"->Connection</A-> -> IO ()</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Arollback"->rollback</A-> :: <A HREF="Database-HDBC.html#t%3AConnection"->Connection</A-> -> IO ()</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AwithTransaction"->withTransaction</A-> :: <A HREF="Database-HDBC.html#t%3AConnection"->Connection</A-> -> (<A HREF="Database-HDBC.html#t%3AConnection"->Connection</A-> -> IO a) -> IO a</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AhdbcDriverName"->hdbcDriverName</A-> :: <A HREF="Database-HDBC.html#t%3AConnection"->Connection</A-> -> String</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AhdbcClientVer"->hdbcClientVer</A-> :: <A HREF="Database-HDBC.html#t%3AConnection"->Connection</A-> -> String</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AproxiedClientName"->proxiedClientName</A-> :: <A HREF="Database-HDBC.html#t%3AConnection"->Connection</A-> -> String</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AproxiedClientVer"->proxiedClientVer</A-> :: <A HREF="Database-HDBC.html#t%3AConnection"->Connection</A-> -> String</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AdbServerVer"->dbServerVer</A-> :: <A HREF="Database-HDBC.html#t%3AConnection"->Connection</A-> -> String</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AdbTransactionSupport"->dbTransactionSupport</A-> :: <A HREF="Database-HDBC.html#t%3AConnection"->Connection</A-> -> Bool</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AgetTables"->getTables</A-> :: <A HREF="Database-HDBC.html#t%3AConnection"->Connection</A-> -> IO [String]</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AdescribeTable"->describeTable</A-> :: <A HREF="Database-HDBC.html#t%3AConnection"->Connection</A-> -> String -> IO [(String, <A HREF="Database-HDBC-ColTypes.html#t%3ASqlColDesc"->SqlColDesc</A->)]</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3AStatement"->Statement</A-> </TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Aexecute"->execute</A-> :: <A HREF="Database-HDBC.html#t%3AStatement"->Statement</A-> -> [<A HREF="Database-HDBC.html#t%3ASqlValue"->SqlValue</A->] -> IO Integer</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AsExecute"->sExecute</A-> :: <A HREF="Database-HDBC.html#t%3AStatement"->Statement</A-> -> [Maybe String] -> IO Integer</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AexecuteMany"->executeMany</A-> :: <A HREF="Database-HDBC.html#t%3AStatement"->Statement</A-> -> [[<A HREF="Database-HDBC.html#t%3ASqlValue"->SqlValue</A->]] -> IO ()</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AsExecuteMany"->sExecuteMany</A-> :: <A HREF="Database-HDBC.html#t%3AStatement"->Statement</A-> -> [[Maybe String]] -> IO ()</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AfetchRow"->fetchRow</A-> :: <A HREF="Database-HDBC.html#t%3AStatement"->Statement</A-> -> IO (Maybe [<A HREF="Database-HDBC.html#t%3ASqlValue"->SqlValue</A->])</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AfetchRowAL"->fetchRowAL</A-> :: <A HREF="Database-HDBC.html#t%3AStatement"->Statement</A-> -> IO (Maybe [(String, <A HREF="Database-HDBC.html#t%3ASqlValue"->SqlValue</A->)])</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AfetchRowMap"->fetchRowMap</A-> :: <A HREF="Database-HDBC.html#t%3AStatement"->Statement</A-> -> IO (Maybe (Map String <A HREF="Database-HDBC.html#t%3ASqlValue"->SqlValue</A->))</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AsFetchRow"->sFetchRow</A-> :: <A HREF="Database-HDBC.html#t%3AStatement"->Statement</A-> -> IO (Maybe [Maybe String])</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AfetchAllRows"->fetchAllRows</A-> :: <A HREF="Database-HDBC.html#t%3AStatement"->Statement</A-> -> IO [[<A HREF="Database-HDBC.html#t%3ASqlValue"->SqlValue</A->]]</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AfetchAllRowsAL"->fetchAllRowsAL</A-> :: <A HREF="Database-HDBC.html#t%3AStatement"->Statement</A-> -> IO [[(String, <A HREF="Database-HDBC.html#t%3ASqlValue"->SqlValue</A->)]]</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AfetchAllRowsMap"->fetchAllRowsMap</A-> :: <A HREF="Database-HDBC.html#t%3AStatement"->Statement</A-> -> IO [Map String <A HREF="Database-HDBC.html#t%3ASqlValue"->SqlValue</A->]</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AsFetchAllRows"->sFetchAllRows</A-> :: <A HREF="Database-HDBC.html#t%3AStatement"->Statement</A-> -> IO [[Maybe String]]</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AgetColumnNames"->getColumnNames</A-> :: <A HREF="Database-HDBC.html#t%3AStatement"->Statement</A-> -> IO [String]</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AdescribeResult"->describeResult</A-> :: <A HREF="Database-HDBC.html#t%3AStatement"->Statement</A-> -> IO [(String, <A HREF="Database-HDBC-ColTypes.html#t%3ASqlColDesc"->SqlColDesc</A->)]</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Afinish"->finish</A-> :: <A HREF="Database-HDBC.html#t%3AStatement"->Statement</A-> -> IO ()</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AoriginalQuery"->originalQuery</A-> :: <A HREF="Database-HDBC.html#t%3AStatement"->Statement</A-> -> String</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3ASqlError"->SqlError</A-> = <A HREF="#v%3ASqlError"->SqlError</A-> {<TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="recfield"-><A HREF="#v%3AseState"->seState</A-> :: String</TD-></TR-><TR-><TD CLASS="recfield"-><A HREF="#v%3AseNativeError"->seNativeError</A-> :: Int</TD-></TR-><TR-><TD CLASS="recfield"-><A HREF="#v%3AseErrorMsg"->seErrorMsg</A-> :: String</TD-></TR-></TABLE->}</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AcatchSql"->catchSql</A-> :: IO a -> (<A HREF="Database-HDBC.html#t%3ASqlError"->SqlError</A-> -> IO a) -> IO a</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AhandleSql"->handleSql</A-> :: (<A HREF="Database-HDBC.html#t%3ASqlError"->SqlError</A-> -> IO a) -> IO a -> IO a</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AsqlExceptions"->sqlExceptions</A-> :: Exception -> Maybe <A HREF="Database-HDBC.html#t%3ASqlError"->SqlError</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AhandleSqlError"->handleSqlError</A-> :: IO a -> IO a</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"->module <A HREF="Database-HDBC-ColTypes.html"->Database.HDBC.ColTypes</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"-><A NAME="1"->Introduction-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="doc"-><P->Welcome to HDBC, Haskell Database Connectivity.-</P-><P->HDBC provides an abstraction layer between Haskell programs and SQL-relational databases. This lets you write database code once, in-Haskell, and have it work with any number of backend SQL databases-(MySQL, Oracle, PostgreSQL, ODBC-compliant databases, etc.)-</P-><P->HDBC is modeled loosely on Perl's DBI interface-<A HREF="http://search.cpan.org/~timb/DBI/DBI.pm"->http://search.cpan.org/~timb/DBI/DBI.pm</A->, though it has also-been influenced by Python's DB-API v2, JDBC in Java, and HSQL in-Haskell.-</P-><P->HDBC is a from-scratch effort. It is not a reimplementation of HSQL,-though its purpose is the same.-</P-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section2"-><A NAME="2"->Features-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="doc"-><P->Features of HDBC include:-</P-><UL-><LI-> Ability to use replacable parameters to let one query be- executed multiple times (eliminates the need for an escape- function)-</LI-><LI-> Ability to access returned rows by column number-</LI-><LI-> Ability to read data from the SQL server on-demand rather than- reading the entire result set up front-</LI-><LI-> HUnit testsuite for each backend driver-</LI-><LI-> Well-defined standard API and easy backend driver implementation-</LI-><LI-> Lazy reading of the entire result set (think hGetContents, but- for the results of SELECT) (see <TT-><A HREF="Database-HDBC.html#v%3AsFetchAllRows"->sFetchAllRows</A-></TT->)-</LI-><LI-> Support for translation between Haskell and SQL types-</LI-><LI-> Support for querying database server properties-</LI-><LI-> Add-on package (hdbc-missingh) to integrate with MissingH,- providing a database backend for AnyDBM.-</LI-><LI-> Support for querying metadata such as column names.-</LI-><LI-> Support for querying additional metadata (column types, etc.)-</LI-></UL-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section2"-><A NAME="3"->Available Drivers-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="doc"-><P->Here is a list of known drivers as of March 28, 2006:-</P-><DL-><DT-><TT->Sqlite v3</TT-></DT-><DD-> Available from <A HREF="http://quux.org/devel/hdbc"->http://quux.org/devel/hdbc</A->. Or, to-participate in development, use -<TT->darcs get --partial <A HREF="http://darcs.complete.org/hdbc-sqlite3"->http://darcs.complete.org/hdbc-sqlite3</A-></TT->-</DD-><DT-><TT->PostgreSQL</TT-></DT-><DD-> Available from <A HREF="http://quux.org/devel/hdbc"->http://quux.org/devel/hdbc</A->. Or, to-participate in development, use-<TT->darcs get --partial <A HREF="http://darcs.complete.org/hdbc-postgresql"->http://darcs.complete.org/hdbc-postgresql</A-></TT->-</DD-><DT-><TT->ODBC</TT-></DT-><DD-> Available from <A HREF="http://quux.org/devel/hdbc"->http://quux.org/devel/hdbc</A->. Or, to-partitipace in development, use-<TT->darcs get --partial <A HREF="http://darcs.complete.org/hdbc-odbc"->http://darcs.complete.org/hdbc-odbc</A-></TT->-</DD-><DT-><TT->MySQL</TT-></DT-><DD-> MySQL users are encouraged to use the ODBC driver, which works-and has been tested against MySQL on both Linux/Unix and Windows platforms.-</DD-></DL-><P->In addition, there is one integration package: <EM->hdbc-missingh</EM->. This-integrates with the MissingH library <A HREF="http://quux.org/devel/missingh"->http://quux.org/devel/missingh</A->.-Among other things, it lets any HDBC database act as a backend for the-AnyDBM interface. Available from <A HREF="http://quux.org/devel/hdbc"->http://quux.org/devel/hdbc</A->. Or,-to participate in development, use-<TT->darcs get --partial <A HREF="http://darcs.complete.org/hdbc-missingh"->http://darcs.complete.org/hdbc-missingh</A-></TT->-</P-><P->The latest version of HDBC itself is available from-<A HREF="http://quux.org/devel/hdbc"->http://quux.org/devel/hdbc</A->. Or, to participate in development, use-<TT->darcs get --partial <A HREF="http://darcs.complete.org/hdbc"->http://darcs.complete.org/hdbc</A-></TT->.-</P-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"-><A NAME="4"->Typing of transfer data-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->class</SPAN-> Show a => <A NAME="t%3ASqlType"-></A-><B->SqlType</B-> a <SPAN CLASS="keyword"->where</SPAN-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="ndoc"-><P->Conversions to and from <TT-><A HREF="Database-HDBC.html#t%3ASqlValue"->SqlValue</A-></TT->s and standard Haskell types.-</P-><P->Conversions are powerful; for instance, you can call <TT-><A HREF="Database-HDBC.html#v%3AfromSql"->fromSql</A-></TT-> on a SqlInt32-and get a String or a Double out of it. This class attempts to Do-The Right Thing whenever possible, and will raise an error when asked to-do something incorrect. In particular, when converting to any type-except a Maybe, <TT-><A HREF="Database-HDBC.html#v%3ASqlNull"->SqlNull</A-></TT-> as the input will cause an error to be raised.-</P-><P->Here are some notes about conversion:-</P-><UL-><LI-> Fractions of a second are not preserved on time values-</LI-></UL-><P->See also <TT-><A HREF="Database-HDBC.html#v%3AnToSql"->nToSql</A-></TT->, <TT-><A HREF="Database-HDBC.html#v%3AiToSql"->iToSql</A-></TT->.-</P-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="section4"->Methods</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"-><A NAME="v%3AtoSql"-></A-><B->toSql</B-> :: a -> <A HREF="Database-HDBC.html#t%3ASqlValue"->SqlValue</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A NAME="v%3AfromSql"-></A-><B->fromSql</B-> :: <A HREF="Database-HDBC.html#t%3ASqlValue"->SqlValue</A-> -> a</TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:SqlType')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:SqlType" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"-><A HREF="Database-HDBC.html#t%3ASqlType"->SqlType</A-> Bool</TD-></TR-><TR-><TD CLASS="decl"-><A HREF="Database-HDBC.html#t%3ASqlType"->SqlType</A-> CalendarTime</TD-></TR-><TR-><TD CLASS="decl"-><A HREF="Database-HDBC.html#t%3ASqlType"->SqlType</A-> Char</TD-></TR-><TR-><TD CLASS="decl"-><A HREF="Database-HDBC.html#t%3ASqlType"->SqlType</A-> ClockTime</TD-></TR-><TR-><TD CLASS="decl"-><A HREF="Database-HDBC.html#t%3ASqlType"->SqlType</A-> Double</TD-></TR-><TR-><TD CLASS="decl"-><A HREF="Database-HDBC.html#t%3ASqlType"->SqlType</A-> Int</TD-></TR-><TR-><TD CLASS="decl"-><A HREF="Database-HDBC.html#t%3ASqlType"->SqlType</A-> Int32</TD-></TR-><TR-><TD CLASS="decl"-><A HREF="Database-HDBC.html#t%3ASqlType"->SqlType</A-> Int64</TD-></TR-><TR-><TD CLASS="decl"-><A HREF="Database-HDBC.html#t%3ASqlType"->SqlType</A-> Integer</TD-></TR-><TR-><TD CLASS="decl"-><A HREF="Database-HDBC.html#t%3ASqlType"->SqlType</A-> Rational</TD-></TR-><TR-><TD CLASS="decl"-><A HREF="Database-HDBC.html#t%3ASqlType"->SqlType</A-> String</TD-></TR-><TR-><TD CLASS="decl"-><A HREF="Database-HDBC.html#t%3ASqlType"->SqlType</A-> TimeDiff</TD-></TR-><TR-><TD CLASS="decl"-><A HREF="Database-HDBC.html#t%3ASqlType"->SqlType</A-> Word32</TD-></TR-><TR-><TD CLASS="decl"-><A HREF="Database-HDBC.html#t%3ASqlType"->SqlType</A-> Word64</TD-></TR-><TR-><TD CLASS="decl"-><A HREF="Database-HDBC.html#t%3ASqlType"->SqlType</A-> a => <A HREF="Database-HDBC.html#t%3ASqlType"->SqlType</A-> (Maybe a)</TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="decl"-><A NAME="v%3AnToSql"-></A-><B->nToSql</B-> :: Integral a => a -> <A HREF="Database-HDBC.html#t%3ASqlValue"->SqlValue</A-></TD-></TR-><TR-><TD CLASS="doc"->Converts any Integral type to a <TT-><A HREF="Database-HDBC.html#t%3ASqlValue"->SqlValue</A-></TT-> by using toInteger. -</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="decl"-><A NAME="v%3AiToSql"-></A-><B->iToSql</B-> :: Int -> <A HREF="Database-HDBC.html#t%3ASqlValue"->SqlValue</A-></TD-></TR-><TR-><TD CLASS="doc"->Convenience function for using numeric literals in your program. -</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3ASqlValue"-></A-><B->SqlValue</B-> </TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="ndoc"-><P->The main type for expressing Haskell values to SQL databases.-</P-><P->This type is used to marshall Haskell data to and from database APIs.-HDBC driver interfaces will do their best to use the most accurate and-efficient way to send a particular value to the database server.-</P-><P->Values read back from the server are put in the most appropriate <TT-><A HREF="Database-HDBC.html#t%3ASqlValue"->SqlValue</A-></TT->-type. <TT-><A HREF="Database-HDBC.html#v%3AfromSql"->fromSql</A-></TT-> can then be used to convert them into whatever type-is needed locally in Haskell.-</P-><P->Most people will use <TT-><A HREF="Database-HDBC.html#v%3AtoSql"->toSql</A-></TT-> and <TT-><A HREF="Database-HDBC.html#v%3AfromSql"->fromSql</A-></TT-> instead of manipulating-<TT-><A HREF="Database-HDBC.html#t%3ASqlValue"->SqlValue</A-></TT->s directly.-</P-><P->The default representation of time values is an integer number of seconds.-Databases such as PostgreSQL with builtin timestamp types can will see-automatic conversion between these Haskell types to local types. Other-databases can just use an int or a string. -</P-><P->This behavior also exists for other types. For instance, many databases don't-have a Rational type, so they'll just use Haskell's show function and-store a Rational as a string.-</P-><P->Two SqlValues are considered to be equal if one of these hold (first one that-is true holds; if none are true, they are not equal):- * Both are NULL- * Both represent the same type and the encapsulated values are equal- * The values of each, when converted to a string, are equal. -</P-></TD-></TR-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3ASqlString"-></A-><B->SqlString</B-> String</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASqlWord32"-></A-><B->SqlWord32</B-> Word32</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASqlWord64"-></A-><B->SqlWord64</B-> Word64</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASqlInt32"-></A-><B->SqlInt32</B-> Int32</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASqlInt64"-></A-><B->SqlInt64</B-> Int64</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASqlInteger"-></A-><B->SqlInteger</B-> Integer</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASqlChar"-></A-><B->SqlChar</B-> Char</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASqlBool"-></A-><B->SqlBool</B-> Bool</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASqlDouble"-></A-><B->SqlDouble</B-> Double</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASqlRational"-></A-><B->SqlRational</B-> Rational</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASqlEpochTime"-></A-><B->SqlEpochTime</B-> Integer</TD-><TD CLASS="rdoc"->Representation of ClockTime or CalendarTime-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASqlTimeDiff"-></A-><B->SqlTimeDiff</B-> Integer</TD-><TD CLASS="rdoc"->Representation of TimeDiff-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASqlNull"-></A-><B->SqlNull</B-></TD-><TD CLASS="rdoc"->NULL in SQL or Nothing in Haskell-</TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:SqlValue')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:SqlValue" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->Eq <A HREF="Database-HDBC.html#t%3ASqlValue"->SqlValue</A-></TD-></TR-><TR-><TD CLASS="decl"->Show <A HREF="Database-HDBC.html#t%3ASqlValue"->SqlValue</A-></TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"-><A NAME="5"->Database Connections-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3AConnection"-></A-><B->Connection</B-> </TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="ndoc"-><P->Main database handle object.-</P-><P->A <TT-><A HREF="Database-HDBC.html#t%3AConnection"->Connection</A-></TT-> object is created by specific functions in the module for an-individual database. That is, the connect function -- which creates-this object -- is not standardized through the HDBC interface.-</P-><P->A connection is closed by a call to <TT-><A HREF="Database-HDBC.html#v%3Adisconnect"->disconnect</A-></TT->.-</P-><P->A call to <TT-><A HREF="Database-HDBC.html#v%3Acommit"->commit</A-></TT-> is required to make sure that your changes get committed-to the database. In other words, HDBC has <EM->no support for autocommit</EM->, which-we consider an outdated notion.-</P-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="decl"-><A NAME="v%3Adisconnect"-></A-><B->disconnect</B-> :: <A HREF="Database-HDBC.html#t%3AConnection"->Connection</A-> -> IO ()</TD-></TR-><TR-><TD CLASS="doc"-><P->Disconnect from the remote database.-</P-><P->You do not need to explicitly close a Connection object, but you may do so if-you so desire. If you don't, the object will disconnect from the database-in a sane way when it is garbage-collected. However, a disconnection may-raise an error, so you are encouraged to explicitly call <TT-><A HREF="Database-HDBC.html#v%3Adisconnect"->disconnect</A-></TT->. Also,-garbage collection may not run when the program terminates, and some databases-really like an explicit disconnect.-</P-><P->So, bottom line is, you're best off calling <TT-><A HREF="Database-HDBC.html#v%3Adisconnect"->disconnect</A-></TT-> directly, but the-world won't end if you forget.-</P-><P->This function discards any data not committed already. Database driver-implementators should explicitly call <TT-><A HREF="Database-HDBC.html#v%3Arollback"->rollback</A-></TT-> if their databases don't-do this automatically on disconnect.-</P-><P->Bad Things (TM) could happen if you call this while you have <TT-><A HREF="Database-HDBC.html#t%3AStatement"->Statement</A-></TT->s -active. In more precise language, the results in such situations are undefined-and vary by database. So don't do it.-</P-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="decl"-><A NAME="v%3Aclone"-></A-><B->clone</B-> :: <A HREF="Database-HDBC.html#t%3AConnection"->Connection</A-> -> IO <A HREF="Database-HDBC.html#t%3AConnection"->Connection</A-></TD-></TR-><TR-><TD CLASS="doc"-><P->Create a new <TT-><A HREF="Database-HDBC.html#t%3AConnection"->Connection</A-></TT-> object, pointed at the same- server as this object is. This will generally establish- a separate physical connection.-</P-><P->When you wish to establish multiple connections to a single- server, the correct way to do so is to establish the- first connection with the driver-specific connection- function, and then clone it for each additional connection.-</P-><P->This can be important when a database doesn't provide- much thread support itself, and the HDBC driver module- must serialize access to a particular database.-</P-><P->This can also be a handy utility function whenever you- need a separate connection to whatever database you are- connected to already. -</P-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section2"-><A NAME="6"->Preparing Queries-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="decl"-><A NAME="v%3Arun"-></A-><B->run</B-> :: <A HREF="Database-HDBC.html#t%3AConnection"->Connection</A-> -> String -> [<A HREF="Database-HDBC.html#t%3ASqlValue"->SqlValue</A->] -> IO Integer</TD-></TR-><TR-><TD CLASS="doc"->Execute a single SQL query. Returns the number- of rows modified (see <TT-><A HREF="Database-HDBC.html#v%3Aexecute"->execute</A-></TT-> for details).- The second parameter is a list- of replacement values, if any. -</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="decl"-><A NAME="v%3AsRun"-></A-><B->sRun</B-> :: <A HREF="Database-HDBC.html#t%3AConnection"->Connection</A-> -> String -> [Maybe String] -> IO Integer</TD-></TR-><TR-><TD CLASS="doc"->Like <TT-><A HREF="Database-HDBC.html#v%3Arun"->run</A-></TT->, but take a list of Maybe Strings instead of <TT-><A HREF="Database-HDBC.html#t%3ASqlValue"->SqlValue</A-></TT->s. -</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="decl"-><A NAME="v%3Aprepare"-></A-><B->prepare</B-> :: <A HREF="Database-HDBC.html#t%3AConnection"->Connection</A-> -> String -> IO <A HREF="Database-HDBC.html#t%3AStatement"->Statement</A-></TD-></TR-><TR-><TD CLASS="doc"-><P->Prepares a statement for execution. -</P-><P->Question marks in the statement will be replaced by- positional parameters in a later call to <TT-><A HREF="Database-HDBC.html#v%3Aexecute"->execute</A-></TT->.-</P-><P->Please note that, depending on the database- and the driver, errors in your SQL may be raised- either here or by <TT-><A HREF="Database-HDBC.html#v%3Aexecute"->execute</A-></TT->. Make sure you- handle exceptions both places if necessary. -</P-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="decl"-><A NAME="v%3AquickQuery"-></A-><B->quickQuery</B-> :: <A HREF="Database-HDBC.html#t%3AConnection"->Connection</A-> -> String -> [<A HREF="Database-HDBC.html#t%3ASqlValue"->SqlValue</A->] -> IO [[<A HREF="Database-HDBC.html#t%3ASqlValue"->SqlValue</A->]]</TD-></TR-><TR-><TD CLASS="doc"->A quick way to do a query. Similar to preparing, executing, and-then calling <TT-><A HREF="Database-HDBC.html#v%3AfetchAllRows"->fetchAllRows</A-></TT-> on a statement. -</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section2"-><A NAME="7"->Transaction Handling-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="doc"-><P->This section concerns itself with writing (updating) a database.-</P-><P->In HDBC, as with many RDBMS implementations, every write to the-database occurs within a transaction. No changes are visible (outside-the current transaction) until a commit operation occurs, in which-case all changes since the transaction started are atomically-committed. Also, there is a rollback operation that can undo all-changes since the transaction started.-</P-><P->HDBC does everything within a transaction. A transaction is implicitly entered-when a connection to a database is established, and a transaction is-implicitly entered after each call to <TT-><A HREF="Database-HDBC.html#v%3Acommit"->commit</A-></TT-> or <TT-><A HREF="Database-HDBC.html#v%3Arollback"->rollback</A-></TT-> as well.-</P-><P->The practical effect of this is that you must call <TT-><A HREF="Database-HDBC.html#v%3Acommit"->commit</A-></TT-> after making-changes to a database in order for those changes to become visible. You don't-have to call <TT-><A HREF="Database-HDBC.html#v%3Acommit"->commit</A-></TT-> after <EM->every</EM-> change, just after a batch of them.-</P-><P->(Exceptions exist for databases that don't offer a high level of transaction-isolation; but you should always play it safe and commit anyway.)-</P-><P->Database developers will also be experienced with the atomicity benefits-of transactions, an explanation of which is outside the scope of this manual.-</P-><P->Errors occuring at the database level can leave a transaction in an-indeterminate state, depending on the database. Some databases will-refuse all queries until the next <TT-><A HREF="Database-HDBC.html#v%3Acommit"->commit</A-></TT-> or <TT-><A HREF="Database-HDBC.html#v%3Arollback"->rollback</A-></TT->. The safe thing-to do is to issue a <TT-><A HREF="Database-HDBC.html#v%3Acommit"->commit</A-></TT-> or <TT-><A HREF="Database-HDBC.html#v%3Arollback"->rollback</A-></TT-> after trapping any <TT-><A HREF="Database-HDBC.html#t%3ASqlError"->SqlError</A-></TT->.-Alternatively, you could use <TT-><A HREF="Database-HDBC.html#v%3AwithTransaction"->withTransaction</A-></TT->, which will automatically-handle this detail for you.-</P-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="decl"-><A NAME="v%3Acommit"-></A-><B->commit</B-> :: <A HREF="Database-HDBC.html#t%3AConnection"->Connection</A-> -> IO ()</TD-></TR-><TR-><TD CLASS="doc"-><P->Commit any pending data to the database.-</P-><P->Required to make any changes take effect. -</P-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="decl"-><A NAME="v%3Arollback"-></A-><B->rollback</B-> :: <A HREF="Database-HDBC.html#t%3AConnection"->Connection</A-> -> IO ()</TD-></TR-><TR-><TD CLASS="doc"->Roll back to the state the database was in prior to the- last <TT-><A HREF="Database-HDBC.html#v%3Acommit"->commit</A-></TT-> or <TT-><A HREF="Database-HDBC.html#v%3Arollback"->rollback</A-></TT->. -</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="decl"-><A NAME="v%3AwithTransaction"-></A-><B->withTransaction</B-> :: <A HREF="Database-HDBC.html#t%3AConnection"->Connection</A-> -> (<A HREF="Database-HDBC.html#t%3AConnection"->Connection</A-> -> IO a) -> IO a</TD-></TR-><TR-><TD CLASS="doc"-><P->Execute some code. If any uncaught exception occurs, run-<TT-><A HREF="Database-HDBC.html#v%3Arollback"->rollback</A-></TT-> and re-raise it. Otherwise, run <TT-><A HREF="Database-HDBC.html#v%3Acommit"->commit</A-></TT-> and return.-</P-><P->This function, therefore, encapsulates the logical property that a transaction-is all about: all or nothing.-</P-><P->The <TT-><A HREF="Database-HDBC.html#t%3AConnection"->Connection</A-></TT-> object passed in is passed directly to the specified-function as a convenience.-</P-><P->This function traps <EM->all</EM-> uncaught exceptions, not just SqlErrors. Therefore,-you will get a rollback for any exception that you don't handle. That's-probably what you want anyway.-</P-><P->Since all operations in HDBC are done in a transaction, this function doesn't-issue an explicit "begin" to the server. You should ideally have-called <TT-><A HREF="Database-HDBC.html#v%3Acommit"->commit</A-></TT-> or <TT-><A HREF="Database-HDBC.html#v%3Arollback"->rollback</A-></TT-> before-calling this function. If you haven't, this function will commit or rollback-more than just the changes made in the included action.-</P-><P->If there was an error while running <TT-><A HREF="Database-HDBC.html#v%3Arollback"->rollback</A-></TT->, this error will not be-reported since the original exception will be propogated back. (You'd probably-like to know about the root cause for all of this anyway.) Feedback-on this behavior is solicited.-</P-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section2"-><A NAME="8"->Connection Inquiries-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="decl"-><A NAME="v%3AhdbcDriverName"-></A-><B->hdbcDriverName</B-> :: <A HREF="Database-HDBC.html#t%3AConnection"->Connection</A-> -> String</TD-></TR-><TR-><TD CLASS="doc"->The name of the HDBC driver module for this connection.- Ideally would be the same as the database name portion- of the Cabal package name. For instance, "sqlite3"- or "odbc". This is the layer that is bound most- tightly to HDBC. -</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="decl"-><A NAME="v%3AhdbcClientVer"-></A-><B->hdbcClientVer</B-> :: <A HREF="Database-HDBC.html#t%3AConnection"->Connection</A-> -> String</TD-></TR-><TR-><TD CLASS="doc"->The version of the C (or whatever) client library- that the HDBC driver module is bound to. The meaning- of this is driver-specific. For an ODBC or similar- proxying driver, this should be the version of the- ODBC library, not the eventual DB client driver. -</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="decl"-><A NAME="v%3AproxiedClientName"-></A-><B->proxiedClientName</B-> :: <A HREF="Database-HDBC.html#t%3AConnection"->Connection</A-> -> String</TD-></TR-><TR-><TD CLASS="doc"->In the case of a system such as ODBC, the name of- the database client/server in use, if available.- For others,- identical to <TT-><A HREF="Database-HDBC.html#v%3AhdbcDriverName"->hdbcDriverName</A-></TT->. -</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="decl"-><A NAME="v%3AproxiedClientVer"-></A-><B->proxiedClientVer</B-> :: <A HREF="Database-HDBC.html#t%3AConnection"->Connection</A-> -> String</TD-></TR-><TR-><TD CLASS="doc"->In the case of a system such as ODBC, the version of- the database client in use, if available. For others,- identical to <TT-><A HREF="Database-HDBC.html#v%3AhdbcClientVer"->hdbcClientVer</A-></TT->. This is the next layer- out past the HDBC driver. -</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="decl"-><A NAME="v%3AdbServerVer"-></A-><B->dbServerVer</B-> :: <A HREF="Database-HDBC.html#t%3AConnection"->Connection</A-> -> String</TD-></TR-><TR-><TD CLASS="doc"->The version of the database server, if available. -</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="decl"-><A NAME="v%3AdbTransactionSupport"-></A-><B->dbTransactionSupport</B-> :: <A HREF="Database-HDBC.html#t%3AConnection"->Connection</A-> -> Bool</TD-></TR-><TR-><TD CLASS="doc"-><P->Whether or not the current database supports transactions.- If False, then <TT-><A HREF="Database-HDBC.html#v%3Acommit"->commit</A-></TT-> and <TT-><A HREF="Database-HDBC.html#v%3Arollback"->rollback</A-></TT-> should be expected- to raise errors.-</P-><P->MySQL is the only commonly-used database that is known- to not support transactions entirely. Please see- the MySQL notes in the ODBC driver for more information. -</P-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="decl"-><A NAME="v%3AgetTables"-></A-><B->getTables</B-> :: <A HREF="Database-HDBC.html#t%3AConnection"->Connection</A-> -> IO [String]</TD-></TR-><TR-><TD CLASS="doc"-><P->The names of all tables accessible by the current- connection, excluding special meta-tables (system tables).-</P-><P->You should expect this to be returned in the same manner- as a result from <TT-><A HREF="Database-HDBC.html#v%3AfetchAllRows"->fetchAllRows</A-></TT->.-</P-><P->All results should be converted to lowercase for you- before you see them.-</P-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="decl"-><A NAME="v%3AdescribeTable"-></A-><B->describeTable</B-> :: <A HREF="Database-HDBC.html#t%3AConnection"->Connection</A-> -> String -> IO [(String, <A HREF="Database-HDBC-ColTypes.html#t%3ASqlColDesc"->SqlColDesc</A->)]</TD-></TR-><TR-><TD CLASS="doc"-><P->Obtain information about the columns in a specific- table. The String in the result- set is the column name.-</P-><P->You should expect this to be returned in the same manner- as a result from <TT-><A HREF="Database-HDBC.html#v%3AfetchAllRows"->fetchAllRows</A-></TT->.-</P-><P->All results should be converted to lowercase for you- before you see them.-</P-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"-><A NAME="9"->Statements-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3AStatement"-></A-><B->Statement</B-> </TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section2"-><A NAME="10"->Execution-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="decl"-><A NAME="v%3Aexecute"-></A-><B->execute</B-> :: <A HREF="Database-HDBC.html#t%3AStatement"->Statement</A-> -> [<A HREF="Database-HDBC.html#t%3ASqlValue"->SqlValue</A->] -> IO Integer</TD-></TR-><TR-><TD CLASS="doc"-><P->Execute the prepared statement, passing in the given positional- parameters (that should take the place of the question marks- in the call to <TT-><A HREF="Database-HDBC.html#v%3Aprepare"->prepare</A-></TT->).-</P-><P->For non-SELECT queries, the return value is the number of- rows modified, if known. If no rows were modified, you get 0.- If the value is unknown, you get -1. All current HDBC drivers- support this function and should never return -1.-</P-><P->For SELECT queries, you will always get 0.-</P-><P->This function should automatically call finish() to finish the previous- execution, if necessary.-</P-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="decl"-><A NAME="v%3AsExecute"-></A-><B->sExecute</B-> :: <A HREF="Database-HDBC.html#t%3AStatement"->Statement</A-> -> [Maybe String] -> IO Integer</TD-></TR-><TR-><TD CLASS="doc"->Like <TT-><A HREF="Database-HDBC.html#v%3Aexecute"->execute</A-></TT->, but take a list of Maybe Strings instead of- <TT-><A HREF="Database-HDBC.html#t%3ASqlValue"->SqlValue</A-></TT->s. -</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="decl"-><A NAME="v%3AexecuteMany"-></A-><B->executeMany</B-> :: <A HREF="Database-HDBC.html#t%3AStatement"->Statement</A-> -> [[<A HREF="Database-HDBC.html#t%3ASqlValue"->SqlValue</A->]] -> IO ()</TD-></TR-><TR-><TD CLASS="doc"-><P->Execute the query with many rows. - The return value is the return value from the final row - as if you had called <TT-><A HREF="Database-HDBC.html#v%3Aexecute"->execute</A-></TT-> on it.-</P-><P->Due to optimizations that are possible due to different- databases and driver designs, this can often be significantly- faster than using <TT-><A HREF="Database-HDBC.html#v%3Aexecute"->execute</A-></TT-> multiple times since queries- need to be compiled only once.-</P-><P->This is most useful for non-SELECT statements. -</P-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="decl"-><A NAME="v%3AsExecuteMany"-></A-><B->sExecuteMany</B-> :: <A HREF="Database-HDBC.html#t%3AStatement"->Statement</A-> -> [[Maybe String]] -> IO ()</TD-></TR-><TR-><TD CLASS="doc"->Like <TT-><A HREF="Database-HDBC.html#v%3AexecuteMany"->executeMany</A-></TT->, but take a list of Maybe Strings instead of- <TT-><A HREF="Database-HDBC.html#t%3ASqlValue"->SqlValue</A-></TT->s. -</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section2"-><A NAME="11"->Fetching Results-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="decl"-><A NAME="v%3AfetchRow"-></A-><B->fetchRow</B-> :: <A HREF="Database-HDBC.html#t%3AStatement"->Statement</A-> -> IO (Maybe [<A HREF="Database-HDBC.html#t%3ASqlValue"->SqlValue</A->])</TD-></TR-><TR-><TD CLASS="doc"->Fetches one row from the DB. Returns Nothing if there- are no more rows. Will automatically call <TT-><A HREF="Database-HDBC.html#v%3Afinish"->finish</A-></TT-> when- the last row is read. -</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="decl"-><A NAME="v%3AfetchRowAL"-></A-><B->fetchRowAL</B-> :: <A HREF="Database-HDBC.html#t%3AStatement"->Statement</A-> -> IO (Maybe [(String, <A HREF="Database-HDBC.html#t%3ASqlValue"->SqlValue</A->)])</TD-></TR-><TR-><TD CLASS="doc"-><P->Like <TT-><A HREF="Database-HDBC.html#v%3AfetchRow"->fetchRow</A-></TT->, but instead of returning a list, return an association-list from column name to value.-</P-><P->The keys of the column names are lowercase versions of the data returned-by <TT-><A HREF="Database-HDBC.html#v%3AgetColumnNames"->getColumnNames</A-></TT->. Please heed the warnings there. Additionally,-results are undefined if multiple columns are returned with identical names.-</P-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="decl"-><A NAME="v%3AfetchRowMap"-></A-><B->fetchRowMap</B-> :: <A HREF="Database-HDBC.html#t%3AStatement"->Statement</A-> -> IO (Maybe (Map String <A HREF="Database-HDBC.html#t%3ASqlValue"->SqlValue</A->))</TD-></TR-><TR-><TD CLASS="doc"->Similar to <TT-><A HREF="Database-HDBC.html#v%3AfetchRowAL"->fetchRowAL</A-></TT->, but return a Map instead of an association list.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="decl"-><A NAME="v%3AsFetchRow"-></A-><B->sFetchRow</B-> :: <A HREF="Database-HDBC.html#t%3AStatement"->Statement</A-> -> IO (Maybe [Maybe String])</TD-></TR-><TR-><TD CLASS="doc"->Like <TT-><A HREF="Database-HDBC.html#v%3AfetchRow"->fetchRow</A-></TT->, but return a list of Maybe Strings instead of- <TT-><A HREF="Database-HDBC.html#t%3ASqlValue"->SqlValue</A-></TT->s. -</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="decl"-><A NAME="v%3AfetchAllRows"-></A-><B->fetchAllRows</B-> :: <A HREF="Database-HDBC.html#t%3AStatement"->Statement</A-> -> IO [[<A HREF="Database-HDBC.html#t%3ASqlValue"->SqlValue</A->]]</TD-></TR-><TR-><TD CLASS="doc"-><P->Lazily fetch all rows from an executed <TT-><A HREF="Database-HDBC.html#t%3AStatement"->Statement</A-></TT->.-</P-><P->You can think of this as hGetContents applied to a database result set.-</P-><P->The result of this is a lazy list, and each new row will be read, lazily, from-the database as the list is processed.-</P-><P->When you have exhausted the list, the <TT-><A HREF="Database-HDBC.html#t%3AStatement"->Statement</A-></TT-> will be <TT-><A HREF="Database-HDBC.html#v%3Afinish"->finish</A-></TT->ed.-</P-><P->Please note that the careless use of this function can lead to some unpleasant-behavior. In particular, if you have not consumed the entire list, then-attempt to <TT-><A HREF="Database-HDBC.html#v%3Afinish"->finish</A-></TT-> or re-execute the statement, and then attempt to consume-more elements from the list, the result will almost certainly not be what-you want.-</P-><P->But then, similar caveats apply with hGetContents.-</P-><P->Bottom line: this is a very convenient abstraction; use it wisely.-</P-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="decl"-><A NAME="v%3AfetchAllRowsAL"-></A-><B->fetchAllRowsAL</B-> :: <A HREF="Database-HDBC.html#t%3AStatement"->Statement</A-> -> IO [[(String, <A HREF="Database-HDBC.html#t%3ASqlValue"->SqlValue</A->)]]</TD-></TR-><TR-><TD CLASS="doc"-><P->Like <TT-><A HREF="Database-HDBC.html#v%3AfetchAllRows"->fetchAllRows</A-></TT->, but instead of returning a list for each-row, return an association list for each row, from column name to value.-</P-><P->See <TT-><A HREF="Database-HDBC.html#v%3AfetchRowAL"->fetchRowAL</A-></TT-> for more details. -</P-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="decl"-><A NAME="v%3AfetchAllRowsMap"-></A-><B->fetchAllRowsMap</B-> :: <A HREF="Database-HDBC.html#t%3AStatement"->Statement</A-> -> IO [Map String <A HREF="Database-HDBC.html#t%3ASqlValue"->SqlValue</A->]</TD-></TR-><TR-><TD CLASS="doc"->Like <TT-><A HREF="Database-HDBC.html#v%3AfetchAllRowsAL"->fetchAllRowsAL</A-></TT->, but return a list of Maps instead of a list of-association lists. -</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="decl"-><A NAME="v%3AsFetchAllRows"-></A-><B->sFetchAllRows</B-> :: <A HREF="Database-HDBC.html#t%3AStatement"->Statement</A-> -> IO [[Maybe String]]</TD-></TR-><TR-><TD CLASS="doc"->Like <TT-><A HREF="Database-HDBC.html#v%3AfetchAllRows"->fetchAllRows</A-></TT->, but return Maybe Strings instead of <TT-><A HREF="Database-HDBC.html#t%3ASqlValue"->SqlValue</A-></TT->s. -</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="decl"-><A NAME="v%3AgetColumnNames"-></A-><B->getColumnNames</B-> :: <A HREF="Database-HDBC.html#t%3AStatement"->Statement</A-> -> IO [String]</TD-></TR-><TR-><TD CLASS="doc"-><P->Returns a list of the column names in the result.- For maximum portability, you should not assume that- information is available until after an <TT-><A HREF="Database-HDBC.html#v%3Aexecute"->execute</A-></TT-> function- has been run.-</P-><P->Information is returned here directly as returned- by the underlying database layer. Note that different- databases have different rules about capitalization- of return values and about representation of names- of columns that are not simple columns. For this reason,- it is suggested that you treat this information for- display purposes only. Failing that, you should convert- to lower (or upper) case, and use <TT->AS</TT-> clauses for- anything other than simple columns.-</P-><P->A simple getColumnNames implementation could simply- apply <TT->map fst</TT-> to the return value of <TT-><A HREF="Database-HDBC.html#v%3AdescribeResult"->describeResult</A-></TT->.-</P-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section2"-><A NAME="12"->Statement Inquires-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="decl"-><A NAME="v%3AdescribeResult"-></A-><B->describeResult</B-> :: <A HREF="Database-HDBC.html#t%3AStatement"->Statement</A-> -> IO [(String, <A HREF="Database-HDBC-ColTypes.html#t%3ASqlColDesc"->SqlColDesc</A->)]</TD-></TR-><TR-><TD CLASS="doc"-><P->Obtain information about the columns in the result set.- Must be run only after <TT-><A HREF="Database-HDBC.html#v%3Aexecute"->execute</A-></TT->. The String in the result- set is the column name.-</P-><P->You should expect this to be returned in the same manner- as a result from <TT-><A HREF="Database-HDBC.html#v%3AfetchAllRows"->fetchAllRows</A-></TT->.-</P-><P->All results should be converted to lowercase for you- before you see them.-</P-><P->Please see caveats under <TT-><A HREF="Database-HDBC.html#v%3AgetColumnNames"->getColumnNames</A-></TT-> for information- on the column name field here.-</P-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section2"-><A NAME="13"->Miscellaneous-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="decl"-><A NAME="v%3Afinish"-></A-><B->finish</B-> :: <A HREF="Database-HDBC.html#t%3AStatement"->Statement</A-> -> IO ()</TD-></TR-><TR-><TD CLASS="doc"->Abort a query in progress -- usually not needed. -</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="decl"-><A NAME="v%3AoriginalQuery"-></A-><B->originalQuery</B-> :: <A HREF="Database-HDBC.html#t%3AStatement"->Statement</A-> -> String</TD-></TR-><TR-><TD CLASS="doc"->The original query that this <TT-><A HREF="Database-HDBC.html#t%3AStatement"->Statement</A-></TT-> was prepared- with. -</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"-><A NAME="14"->Exceptions-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3ASqlError"-></A-><B->SqlError</B-> </TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="ndoc"-><P->The main HDBC exception object. As much information as possible-is passed from the database through to the application through this object.-</P-><P->Errors generated in the Haskell layer will have seNativeError set to -1.-</P-></TD-></TR-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="5" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3ASqlError"-></A-><B->SqlError</B-></TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="body" COLSPAN="2"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3AseState"-></A-><B->seState</B-> :: String</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AseNativeError"-></A-><B->seNativeError</B-> :: Int</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AseErrorMsg"-></A-><B->seErrorMsg</B-> :: String</TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:SqlError')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:SqlError" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->Eq <A HREF="Database-HDBC.html#t%3ASqlError"->SqlError</A-></TD-></TR-><TR-><TD CLASS="decl"->Read <A HREF="Database-HDBC.html#t%3ASqlError"->SqlError</A-></TD-></TR-><TR-><TD CLASS="decl"->Show <A HREF="Database-HDBC.html#t%3ASqlError"->SqlError</A-></TD-></TR-><TR-><TD CLASS="decl"->Typeable <A HREF="Database-HDBC.html#t%3ASqlError"->SqlError</A-></TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="decl"-><A NAME="v%3AcatchSql"-></A-><B->catchSql</B-> :: IO a -> (<A HREF="Database-HDBC.html#t%3ASqlError"->SqlError</A-> -> IO a) -> IO a</TD-></TR-><TR-><TD CLASS="doc"-><P->Execute the given IO action.-</P-><P->If it raises a <TT-><A HREF="Database-HDBC.html#t%3ASqlError"->SqlError</A-></TT->, then execute the supplied handler and return its-return value. Otherwise, proceed as normal. -</P-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="decl"-><A NAME="v%3AhandleSql"-></A-><B->handleSql</B-> :: (<A HREF="Database-HDBC.html#t%3ASqlError"->SqlError</A-> -> IO a) -> IO a -> IO a</TD-></TR-><TR-><TD CLASS="doc"->Like <TT-><A HREF="Database-HDBC.html#v%3AcatchSql"->catchSql</A-></TT->, with the order of arguments reversed. -</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="decl"-><A NAME="v%3AsqlExceptions"-></A-><B->sqlExceptions</B-> :: Exception -> Maybe <A HREF="Database-HDBC.html#t%3ASqlError"->SqlError</A-></TD-></TR-><TR-><TD CLASS="doc"->Given an Exception, return Just SqlError if it was an SqlError, or Nothing-otherwise. Useful with functions like catchJust. -</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="decl"-><A NAME="v%3AhandleSqlError"-></A-><B->handleSqlError</B-> :: IO a -> IO a</TD-></TR-><TR-><TD CLASS="doc"->Catches <TT-><A HREF="Database-HDBC.html#t%3ASqlError"->SqlError</A-></TT->s, and re-raises them as IO errors with fail.-Useful if you don't care to catch SQL errors, but want to see a sane-error message if one happens. One would often use this as a high-level-wrapper around SQL calls. -</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"-><A NAME="15"->Column Types-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="doc"->These are defined in <A HREF="Database-HDBC-ColTypes.html"->Database.HDBC.ColTypes</A-> but are- available to programs importing <A HREF="Database-HDBC.html"->Database.HDBC</A-> by default as well.- See <A HREF="Database-HDBC-ColTypes.html"->Database.HDBC.ColTypes</A-> for documentation.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="decl"->module <A HREF="Database-HDBC-ColTypes.html"->Database.HDBC.ColTypes</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"-><A NAME="16"->Threading-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="doc"-><P->FIXME: this is draft information-</P-><P->Thread support in a generalized interface such as HDBC can be complicated-because support for threading varies across database interfaces.-</P-><P->However, applications using HDBC should be able to rely upon at least a few-basic guarantees:-</P-><UL-><LI-> The HDBC modules may freely be imported and used across all threads.-</LI-><LI-> HDBC modules may also freely share database connections and statements;- the database or HDBC driver will be responsible for locking if necessary.-</LI-></UL-><P->I use "share" in the same sense as Python's DB-API: multiple threads may use-the resource without wrapping it in any lock.-</P-><P->However, there are some caveats to the above:-</P-><UL-><LI-> Not all databases support more than one active statement for a single- connection. Therefore, for maximum portability, you should use- a different connection to the database for each simultaneous query you- wish to use.- FIXME: describe when a statement is active.-</LI-><LI-> Not all databases may support the level of multithreading described above.- For those that don't, safe access will be restriced in the HDBC driver- by using locks. Therefore, you can write portable code, but you - only get real multithreading when databases really support it.- Details of thread support should be documented in the HDBC- driver for each specific database.-</LI-></UL-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"-><A NAME="17"->Copyright and License-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="doc"-><P->Copyright (C) 2005-2006 John Goerzen <A HREF="jgoerzen@complete.org"->jgoerzen@complete.org</A->-</P-><P->This library is free software; you can redistribute it and/or-modify it under the terms of the GNU Lesser General Public-License as published by the Free Software Foundation; either-version 2.1 of the License, or (at your option) any later version.-</P-><P->This library is distributed in the hope that it will be useful,-but WITHOUT ANY WARRANTY; without even the implied warranty of-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU-Lesser General Public License for more details.-</P-><P->You should have received a copy of the GNU Lesser General Public-License along with this library; if not, write to the Free Software-Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA-</P-><P->Please see COPYING in the source distribution for the full license.-</P-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="botbar"->Produced by <A HREF="http://www.haskell.org/haddock/"->Haddock</A-> version 0.7</TD-></TR-></TABLE-></BODY-></HTML->
− doc/doc-index-A.html
@@ -1,126 +0,0 @@-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">-<!--Rendered using the Haskell Html Library v0.2-->-<HTML-><HEAD-><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"-><TITLE->Haskell Database Connectivity (HDBC) (Index)</TITLE-><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"-></HEAD-><BODY-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="topbar"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD-><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "-></TD-><TD CLASS="title"->Haskell Database Connectivity (HDBC)</TD-><TD CLASS="topbut"-><A HREF="index.html"->Contents</A-></TD-><TD CLASS="topbut"-><A HREF="doc-index.html"->Index</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD-><A HREF="doc-index-A.html"->A</A-></TD-><TD-><A HREF="doc-index-C.html"->C</A-></TD-><TD-><A HREF="doc-index-D.html"->D</A-></TD-><TD-><A HREF="doc-index-E.html"->E</A-></TD-><TD-><A HREF="doc-index-F.html"->F</A-></TD-><TD-><A HREF="doc-index-G.html"->G</A-></TD-><TD-><A HREF="doc-index-H.html"->H</A-></TD-><TD-><A HREF="doc-index-I.html"->I</A-></TD-><TD-><A HREF="doc-index-N.html"->N</A-></TD-><TD-><A HREF="doc-index-O.html"->O</A-></TD-><TD-><A HREF="doc-index-P.html"->P</A-></TD-><TD-><A HREF="doc-index-Q.html"->Q</A-></TD-><TD-><A HREF="doc-index-R.html"->R</A-></TD-><TD-><A HREF="doc-index-S.html"->S</A-></TD-><TD-><A HREF="doc-index-T.html"->T</A-></TD-><TD-><A HREF="doc-index-W.html"->W</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section1"->Index (A)</TD-></TR-><TR-><TD-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD CLASS="indexentry"->addChild</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-DriverUtils.html#v%3AaddChild"->Database.HDBC.DriverUtils</A-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></BODY-></HTML->
− doc/doc-index-C.html
@@ -1,224 +0,0 @@-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">-<!--Rendered using the Haskell Html Library v0.2-->-<HTML-><HEAD-><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"-><TITLE->Haskell Database Connectivity (HDBC) (Index)</TITLE-><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"-></HEAD-><BODY-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="topbar"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD-><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "-></TD-><TD CLASS="title"->Haskell Database Connectivity (HDBC)</TD-><TD CLASS="topbut"-><A HREF="index.html"->Contents</A-></TD-><TD CLASS="topbut"-><A HREF="doc-index.html"->Index</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD-><A HREF="doc-index-A.html"->A</A-></TD-><TD-><A HREF="doc-index-C.html"->C</A-></TD-><TD-><A HREF="doc-index-D.html"->D</A-></TD-><TD-><A HREF="doc-index-E.html"->E</A-></TD-><TD-><A HREF="doc-index-F.html"->F</A-></TD-><TD-><A HREF="doc-index-G.html"->G</A-></TD-><TD-><A HREF="doc-index-H.html"->H</A-></TD-><TD-><A HREF="doc-index-I.html"->I</A-></TD-><TD-><A HREF="doc-index-N.html"->N</A-></TD-><TD-><A HREF="doc-index-O.html"->O</A-></TD-><TD-><A HREF="doc-index-P.html"->P</A-></TD-><TD-><A HREF="doc-index-Q.html"->Q</A-></TD-><TD-><A HREF="doc-index-R.html"->R</A-></TD-><TD-><A HREF="doc-index-S.html"->S</A-></TD-><TD-><A HREF="doc-index-T.html"->T</A-></TD-><TD-><A HREF="doc-index-W.html"->W</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section1"->Index (C)</TD-></TR-><TR-><TD-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD CLASS="indexentry"->ChildList</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-DriverUtils.html#t%3AChildList"->Database.HDBC.DriverUtils</A-></TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->Connection</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Type/Class)</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-Types.html#t%3AConnection"->Database.HDBC.Types</A->, <A HREF="Database-HDBC.html#t%3AConnection"->Database.HDBC</A-></TD-></TR-><TR-><TD CLASS="indexannot"->2 (Data Constructor)</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-Types.html#v%3AConnection"->Database.HDBC.Types</A-></TD-></TR-><TR-><TD CLASS="indexentry"->catchSql</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC.html#v%3AcatchSql"->Database.HDBC</A-></TD-></TR-><TR-><TD CLASS="indexentry"->clone</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-Types.html#v%3Aclone"->Database.HDBC.Types</A->, <A HREF="Database-HDBC.html#v%3Aclone"->Database.HDBC</A-></TD-></TR-><TR-><TD CLASS="indexentry"->closeAllChildren</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-DriverUtils.html#v%3AcloseAllChildren"->Database.HDBC.DriverUtils</A-></TD-></TR-><TR-><TD CLASS="indexentry"->colDecDigits</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-ColTypes.html#v%3AcolDecDigits"->Database.HDBC.ColTypes</A->, Database.HDBC</TD-></TR-><TR-><TD CLASS="indexentry"->colNullable</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-ColTypes.html#v%3AcolNullable"->Database.HDBC.ColTypes</A->, Database.HDBC</TD-></TR-><TR-><TD CLASS="indexentry"->colOctetLength</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-ColTypes.html#v%3AcolOctetLength"->Database.HDBC.ColTypes</A->, Database.HDBC</TD-></TR-><TR-><TD CLASS="indexentry"->colSize</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-ColTypes.html#v%3AcolSize"->Database.HDBC.ColTypes</A->, Database.HDBC</TD-></TR-><TR-><TD CLASS="indexentry"->colType</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-ColTypes.html#v%3AcolType"->Database.HDBC.ColTypes</A->, Database.HDBC</TD-></TR-><TR-><TD CLASS="indexentry"->commit</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-Types.html#v%3Acommit"->Database.HDBC.Types</A->, <A HREF="Database-HDBC.html#v%3Acommit"->Database.HDBC</A-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></BODY-></HTML->
− doc/doc-index-D.html
@@ -1,168 +0,0 @@-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">-<!--Rendered using the Haskell Html Library v0.2-->-<HTML-><HEAD-><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"-><TITLE->Haskell Database Connectivity (HDBC) (Index)</TITLE-><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"-></HEAD-><BODY-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="topbar"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD-><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "-></TD-><TD CLASS="title"->Haskell Database Connectivity (HDBC)</TD-><TD CLASS="topbut"-><A HREF="index.html"->Contents</A-></TD-><TD CLASS="topbut"-><A HREF="doc-index.html"->Index</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD-><A HREF="doc-index-A.html"->A</A-></TD-><TD-><A HREF="doc-index-C.html"->C</A-></TD-><TD-><A HREF="doc-index-D.html"->D</A-></TD-><TD-><A HREF="doc-index-E.html"->E</A-></TD-><TD-><A HREF="doc-index-F.html"->F</A-></TD-><TD-><A HREF="doc-index-G.html"->G</A-></TD-><TD-><A HREF="doc-index-H.html"->H</A-></TD-><TD-><A HREF="doc-index-I.html"->I</A-></TD-><TD-><A HREF="doc-index-N.html"->N</A-></TD-><TD-><A HREF="doc-index-O.html"->O</A-></TD-><TD-><A HREF="doc-index-P.html"->P</A-></TD-><TD-><A HREF="doc-index-Q.html"->Q</A-></TD-><TD-><A HREF="doc-index-R.html"->R</A-></TD-><TD-><A HREF="doc-index-S.html"->S</A-></TD-><TD-><A HREF="doc-index-T.html"->T</A-></TD-><TD-><A HREF="doc-index-W.html"->W</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section1"->Index (D)</TD-></TR-><TR-><TD-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD CLASS="indexentry"->dbServerVer</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-Types.html#v%3AdbServerVer"->Database.HDBC.Types</A->, <A HREF="Database-HDBC.html#v%3AdbServerVer"->Database.HDBC</A-></TD-></TR-><TR-><TD CLASS="indexentry"->dbTransactionSupport</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-Types.html#v%3AdbTransactionSupport"->Database.HDBC.Types</A->, <A HREF="Database-HDBC.html#v%3AdbTransactionSupport"->Database.HDBC</A-></TD-></TR-><TR-><TD CLASS="indexentry"->describeResult</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-Types.html#v%3AdescribeResult"->Database.HDBC.Types</A->, <A HREF="Database-HDBC.html#v%3AdescribeResult"->Database.HDBC</A-></TD-></TR-><TR-><TD CLASS="indexentry"->describeTable</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-Types.html#v%3AdescribeTable"->Database.HDBC.Types</A->, <A HREF="Database-HDBC.html#v%3AdescribeTable"->Database.HDBC</A-></TD-></TR-><TR-><TD CLASS="indexentry"->disconnect</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-Types.html#v%3Adisconnect"->Database.HDBC.Types</A->, <A HREF="Database-HDBC.html#v%3Adisconnect"->Database.HDBC</A-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></BODY-></HTML->
− doc/doc-index-E.html
@@ -1,138 +0,0 @@-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">-<!--Rendered using the Haskell Html Library v0.2-->-<HTML-><HEAD-><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"-><TITLE->Haskell Database Connectivity (HDBC) (Index)</TITLE-><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"-></HEAD-><BODY-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="topbar"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD-><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "-></TD-><TD CLASS="title"->Haskell Database Connectivity (HDBC)</TD-><TD CLASS="topbut"-><A HREF="index.html"->Contents</A-></TD-><TD CLASS="topbut"-><A HREF="doc-index.html"->Index</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD-><A HREF="doc-index-A.html"->A</A-></TD-><TD-><A HREF="doc-index-C.html"->C</A-></TD-><TD-><A HREF="doc-index-D.html"->D</A-></TD-><TD-><A HREF="doc-index-E.html"->E</A-></TD-><TD-><A HREF="doc-index-F.html"->F</A-></TD-><TD-><A HREF="doc-index-G.html"->G</A-></TD-><TD-><A HREF="doc-index-H.html"->H</A-></TD-><TD-><A HREF="doc-index-I.html"->I</A-></TD-><TD-><A HREF="doc-index-N.html"->N</A-></TD-><TD-><A HREF="doc-index-O.html"->O</A-></TD-><TD-><A HREF="doc-index-P.html"->P</A-></TD-><TD-><A HREF="doc-index-Q.html"->Q</A-></TD-><TD-><A HREF="doc-index-R.html"->R</A-></TD-><TD-><A HREF="doc-index-S.html"->S</A-></TD-><TD-><A HREF="doc-index-T.html"->T</A-></TD-><TD-><A HREF="doc-index-W.html"->W</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section1"->Index (E)</TD-></TR-><TR-><TD-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD CLASS="indexentry"->execute</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-Types.html#v%3Aexecute"->Database.HDBC.Types</A->, <A HREF="Database-HDBC.html#v%3Aexecute"->Database.HDBC</A-></TD-></TR-><TR-><TD CLASS="indexentry"->executeMany</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-Types.html#v%3AexecuteMany"->Database.HDBC.Types</A->, <A HREF="Database-HDBC.html#v%3AexecuteMany"->Database.HDBC</A-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></BODY-></HTML->
− doc/doc-index-F.html
@@ -1,188 +0,0 @@-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">-<!--Rendered using the Haskell Html Library v0.2-->-<HTML-><HEAD-><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"-><TITLE->Haskell Database Connectivity (HDBC) (Index)</TITLE-><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"-></HEAD-><BODY-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="topbar"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD-><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "-></TD-><TD CLASS="title"->Haskell Database Connectivity (HDBC)</TD-><TD CLASS="topbut"-><A HREF="index.html"->Contents</A-></TD-><TD CLASS="topbut"-><A HREF="doc-index.html"->Index</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD-><A HREF="doc-index-A.html"->A</A-></TD-><TD-><A HREF="doc-index-C.html"->C</A-></TD-><TD-><A HREF="doc-index-D.html"->D</A-></TD-><TD-><A HREF="doc-index-E.html"->E</A-></TD-><TD-><A HREF="doc-index-F.html"->F</A-></TD-><TD-><A HREF="doc-index-G.html"->G</A-></TD-><TD-><A HREF="doc-index-H.html"->H</A-></TD-><TD-><A HREF="doc-index-I.html"->I</A-></TD-><TD-><A HREF="doc-index-N.html"->N</A-></TD-><TD-><A HREF="doc-index-O.html"->O</A-></TD-><TD-><A HREF="doc-index-P.html"->P</A-></TD-><TD-><A HREF="doc-index-Q.html"->Q</A-></TD-><TD-><A HREF="doc-index-R.html"->R</A-></TD-><TD-><A HREF="doc-index-S.html"->S</A-></TD-><TD-><A HREF="doc-index-T.html"->T</A-></TD-><TD-><A HREF="doc-index-W.html"->W</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section1"->Index (F)</TD-></TR-><TR-><TD-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD CLASS="indexentry"->fetchAllRows</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC.html#v%3AfetchAllRows"->Database.HDBC</A-></TD-></TR-><TR-><TD CLASS="indexentry"->fetchAllRowsAL</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC.html#v%3AfetchAllRowsAL"->Database.HDBC</A-></TD-></TR-><TR-><TD CLASS="indexentry"->fetchAllRowsMap</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC.html#v%3AfetchAllRowsMap"->Database.HDBC</A-></TD-></TR-><TR-><TD CLASS="indexentry"->fetchRow</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-Types.html#v%3AfetchRow"->Database.HDBC.Types</A->, <A HREF="Database-HDBC.html#v%3AfetchRow"->Database.HDBC</A-></TD-></TR-><TR-><TD CLASS="indexentry"->fetchRowAL</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC.html#v%3AfetchRowAL"->Database.HDBC</A-></TD-></TR-><TR-><TD CLASS="indexentry"->fetchRowMap</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC.html#v%3AfetchRowMap"->Database.HDBC</A-></TD-></TR-><TR-><TD CLASS="indexentry"->finish</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-Types.html#v%3Afinish"->Database.HDBC.Types</A->, <A HREF="Database-HDBC.html#v%3Afinish"->Database.HDBC</A-></TD-></TR-><TR-><TD CLASS="indexentry"->fromSql</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-Types.html#v%3AfromSql"->Database.HDBC.Types</A->, <A HREF="Database-HDBC.html#v%3AfromSql"->Database.HDBC</A-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></BODY-></HTML->
− doc/doc-index-G.html
@@ -1,138 +0,0 @@-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">-<!--Rendered using the Haskell Html Library v0.2-->-<HTML-><HEAD-><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"-><TITLE->Haskell Database Connectivity (HDBC) (Index)</TITLE-><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"-></HEAD-><BODY-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="topbar"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD-><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "-></TD-><TD CLASS="title"->Haskell Database Connectivity (HDBC)</TD-><TD CLASS="topbut"-><A HREF="index.html"->Contents</A-></TD-><TD CLASS="topbut"-><A HREF="doc-index.html"->Index</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD-><A HREF="doc-index-A.html"->A</A-></TD-><TD-><A HREF="doc-index-C.html"->C</A-></TD-><TD-><A HREF="doc-index-D.html"->D</A-></TD-><TD-><A HREF="doc-index-E.html"->E</A-></TD-><TD-><A HREF="doc-index-F.html"->F</A-></TD-><TD-><A HREF="doc-index-G.html"->G</A-></TD-><TD-><A HREF="doc-index-H.html"->H</A-></TD-><TD-><A HREF="doc-index-I.html"->I</A-></TD-><TD-><A HREF="doc-index-N.html"->N</A-></TD-><TD-><A HREF="doc-index-O.html"->O</A-></TD-><TD-><A HREF="doc-index-P.html"->P</A-></TD-><TD-><A HREF="doc-index-Q.html"->Q</A-></TD-><TD-><A HREF="doc-index-R.html"->R</A-></TD-><TD-><A HREF="doc-index-S.html"->S</A-></TD-><TD-><A HREF="doc-index-T.html"->T</A-></TD-><TD-><A HREF="doc-index-W.html"->W</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section1"->Index (G)</TD-></TR-><TR-><TD-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD CLASS="indexentry"->getColumnNames</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-Types.html#v%3AgetColumnNames"->Database.HDBC.Types</A->, <A HREF="Database-HDBC.html#v%3AgetColumnNames"->Database.HDBC</A-></TD-></TR-><TR-><TD CLASS="indexentry"->getTables</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-Types.html#v%3AgetTables"->Database.HDBC.Types</A->, <A HREF="Database-HDBC.html#v%3AgetTables"->Database.HDBC</A-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></BODY-></HTML->
− doc/doc-index-H.html
@@ -1,154 +0,0 @@-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">-<!--Rendered using the Haskell Html Library v0.2-->-<HTML-><HEAD-><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"-><TITLE->Haskell Database Connectivity (HDBC) (Index)</TITLE-><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"-></HEAD-><BODY-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="topbar"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD-><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "-></TD-><TD CLASS="title"->Haskell Database Connectivity (HDBC)</TD-><TD CLASS="topbut"-><A HREF="index.html"->Contents</A-></TD-><TD CLASS="topbut"-><A HREF="doc-index.html"->Index</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD-><A HREF="doc-index-A.html"->A</A-></TD-><TD-><A HREF="doc-index-C.html"->C</A-></TD-><TD-><A HREF="doc-index-D.html"->D</A-></TD-><TD-><A HREF="doc-index-E.html"->E</A-></TD-><TD-><A HREF="doc-index-F.html"->F</A-></TD-><TD-><A HREF="doc-index-G.html"->G</A-></TD-><TD-><A HREF="doc-index-H.html"->H</A-></TD-><TD-><A HREF="doc-index-I.html"->I</A-></TD-><TD-><A HREF="doc-index-N.html"->N</A-></TD-><TD-><A HREF="doc-index-O.html"->O</A-></TD-><TD-><A HREF="doc-index-P.html"->P</A-></TD-><TD-><A HREF="doc-index-Q.html"->Q</A-></TD-><TD-><A HREF="doc-index-R.html"->R</A-></TD-><TD-><A HREF="doc-index-S.html"->S</A-></TD-><TD-><A HREF="doc-index-T.html"->T</A-></TD-><TD-><A HREF="doc-index-W.html"->W</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section1"->Index (H)</TD-></TR-><TR-><TD-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD CLASS="indexentry"->handleSql</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC.html#v%3AhandleSql"->Database.HDBC</A-></TD-></TR-><TR-><TD CLASS="indexentry"->handleSqlError</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC.html#v%3AhandleSqlError"->Database.HDBC</A-></TD-></TR-><TR-><TD CLASS="indexentry"->hdbcClientVer</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-Types.html#v%3AhdbcClientVer"->Database.HDBC.Types</A->, <A HREF="Database-HDBC.html#v%3AhdbcClientVer"->Database.HDBC</A-></TD-></TR-><TR-><TD CLASS="indexentry"->hdbcDriverName</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-Types.html#v%3AhdbcDriverName"->Database.HDBC.Types</A->, <A HREF="Database-HDBC.html#v%3AhdbcDriverName"->Database.HDBC</A-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></BODY-></HTML->
− doc/doc-index-I.html
@@ -1,128 +0,0 @@-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">-<!--Rendered using the Haskell Html Library v0.2-->-<HTML-><HEAD-><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"-><TITLE->Haskell Database Connectivity (HDBC) (Index)</TITLE-><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"-></HEAD-><BODY-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="topbar"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD-><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "-></TD-><TD CLASS="title"->Haskell Database Connectivity (HDBC)</TD-><TD CLASS="topbut"-><A HREF="index.html"->Contents</A-></TD-><TD CLASS="topbut"-><A HREF="doc-index.html"->Index</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD-><A HREF="doc-index-A.html"->A</A-></TD-><TD-><A HREF="doc-index-C.html"->C</A-></TD-><TD-><A HREF="doc-index-D.html"->D</A-></TD-><TD-><A HREF="doc-index-E.html"->E</A-></TD-><TD-><A HREF="doc-index-F.html"->F</A-></TD-><TD-><A HREF="doc-index-G.html"->G</A-></TD-><TD-><A HREF="doc-index-H.html"->H</A-></TD-><TD-><A HREF="doc-index-I.html"->I</A-></TD-><TD-><A HREF="doc-index-N.html"->N</A-></TD-><TD-><A HREF="doc-index-O.html"->O</A-></TD-><TD-><A HREF="doc-index-P.html"->P</A-></TD-><TD-><A HREF="doc-index-Q.html"->Q</A-></TD-><TD-><A HREF="doc-index-R.html"->R</A-></TD-><TD-><A HREF="doc-index-S.html"->S</A-></TD-><TD-><A HREF="doc-index-T.html"->T</A-></TD-><TD-><A HREF="doc-index-W.html"->W</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section1"->Index (I)</TD-></TR-><TR-><TD-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD CLASS="indexentry"->iToSql</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-Types.html#v%3AiToSql"->Database.HDBC.Types</A->, <A HREF="Database-HDBC.html#v%3AiToSql"->Database.HDBC</A-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></BODY-></HTML->
− doc/doc-index-N.html
@@ -1,128 +0,0 @@-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">-<!--Rendered using the Haskell Html Library v0.2-->-<HTML-><HEAD-><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"-><TITLE->Haskell Database Connectivity (HDBC) (Index)</TITLE-><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"-></HEAD-><BODY-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="topbar"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD-><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "-></TD-><TD CLASS="title"->Haskell Database Connectivity (HDBC)</TD-><TD CLASS="topbut"-><A HREF="index.html"->Contents</A-></TD-><TD CLASS="topbut"-><A HREF="doc-index.html"->Index</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD-><A HREF="doc-index-A.html"->A</A-></TD-><TD-><A HREF="doc-index-C.html"->C</A-></TD-><TD-><A HREF="doc-index-D.html"->D</A-></TD-><TD-><A HREF="doc-index-E.html"->E</A-></TD-><TD-><A HREF="doc-index-F.html"->F</A-></TD-><TD-><A HREF="doc-index-G.html"->G</A-></TD-><TD-><A HREF="doc-index-H.html"->H</A-></TD-><TD-><A HREF="doc-index-I.html"->I</A-></TD-><TD-><A HREF="doc-index-N.html"->N</A-></TD-><TD-><A HREF="doc-index-O.html"->O</A-></TD-><TD-><A HREF="doc-index-P.html"->P</A-></TD-><TD-><A HREF="doc-index-Q.html"->Q</A-></TD-><TD-><A HREF="doc-index-R.html"->R</A-></TD-><TD-><A HREF="doc-index-S.html"->S</A-></TD-><TD-><A HREF="doc-index-T.html"->T</A-></TD-><TD-><A HREF="doc-index-W.html"->W</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section1"->Index (N)</TD-></TR-><TR-><TD-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD CLASS="indexentry"->nToSql</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-Types.html#v%3AnToSql"->Database.HDBC.Types</A->, <A HREF="Database-HDBC.html#v%3AnToSql"->Database.HDBC</A-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></BODY-></HTML->
− doc/doc-index-O.html
@@ -1,128 +0,0 @@-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">-<!--Rendered using the Haskell Html Library v0.2-->-<HTML-><HEAD-><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"-><TITLE->Haskell Database Connectivity (HDBC) (Index)</TITLE-><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"-></HEAD-><BODY-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="topbar"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD-><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "-></TD-><TD CLASS="title"->Haskell Database Connectivity (HDBC)</TD-><TD CLASS="topbut"-><A HREF="index.html"->Contents</A-></TD-><TD CLASS="topbut"-><A HREF="doc-index.html"->Index</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD-><A HREF="doc-index-A.html"->A</A-></TD-><TD-><A HREF="doc-index-C.html"->C</A-></TD-><TD-><A HREF="doc-index-D.html"->D</A-></TD-><TD-><A HREF="doc-index-E.html"->E</A-></TD-><TD-><A HREF="doc-index-F.html"->F</A-></TD-><TD-><A HREF="doc-index-G.html"->G</A-></TD-><TD-><A HREF="doc-index-H.html"->H</A-></TD-><TD-><A HREF="doc-index-I.html"->I</A-></TD-><TD-><A HREF="doc-index-N.html"->N</A-></TD-><TD-><A HREF="doc-index-O.html"->O</A-></TD-><TD-><A HREF="doc-index-P.html"->P</A-></TD-><TD-><A HREF="doc-index-Q.html"->Q</A-></TD-><TD-><A HREF="doc-index-R.html"->R</A-></TD-><TD-><A HREF="doc-index-S.html"->S</A-></TD-><TD-><A HREF="doc-index-T.html"->T</A-></TD-><TD-><A HREF="doc-index-W.html"->W</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section1"->Index (O)</TD-></TR-><TR-><TD-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD CLASS="indexentry"->originalQuery</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-Types.html#v%3AoriginalQuery"->Database.HDBC.Types</A->, <A HREF="Database-HDBC.html#v%3AoriginalQuery"->Database.HDBC</A-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></BODY-></HTML->
− doc/doc-index-P.html
@@ -1,148 +0,0 @@-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">-<!--Rendered using the Haskell Html Library v0.2-->-<HTML-><HEAD-><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"-><TITLE->Haskell Database Connectivity (HDBC) (Index)</TITLE-><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"-></HEAD-><BODY-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="topbar"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD-><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "-></TD-><TD CLASS="title"->Haskell Database Connectivity (HDBC)</TD-><TD CLASS="topbut"-><A HREF="index.html"->Contents</A-></TD-><TD CLASS="topbut"-><A HREF="doc-index.html"->Index</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD-><A HREF="doc-index-A.html"->A</A-></TD-><TD-><A HREF="doc-index-C.html"->C</A-></TD-><TD-><A HREF="doc-index-D.html"->D</A-></TD-><TD-><A HREF="doc-index-E.html"->E</A-></TD-><TD-><A HREF="doc-index-F.html"->F</A-></TD-><TD-><A HREF="doc-index-G.html"->G</A-></TD-><TD-><A HREF="doc-index-H.html"->H</A-></TD-><TD-><A HREF="doc-index-I.html"->I</A-></TD-><TD-><A HREF="doc-index-N.html"->N</A-></TD-><TD-><A HREF="doc-index-O.html"->O</A-></TD-><TD-><A HREF="doc-index-P.html"->P</A-></TD-><TD-><A HREF="doc-index-Q.html"->Q</A-></TD-><TD-><A HREF="doc-index-R.html"->R</A-></TD-><TD-><A HREF="doc-index-S.html"->S</A-></TD-><TD-><A HREF="doc-index-T.html"->T</A-></TD-><TD-><A HREF="doc-index-W.html"->W</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section1"->Index (P)</TD-></TR-><TR-><TD-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD CLASS="indexentry"->prepare</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-Types.html#v%3Aprepare"->Database.HDBC.Types</A->, <A HREF="Database-HDBC.html#v%3Aprepare"->Database.HDBC</A-></TD-></TR-><TR-><TD CLASS="indexentry"->proxiedClientName</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-Types.html#v%3AproxiedClientName"->Database.HDBC.Types</A->, <A HREF="Database-HDBC.html#v%3AproxiedClientName"->Database.HDBC</A-></TD-></TR-><TR-><TD CLASS="indexentry"->proxiedClientVer</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-Types.html#v%3AproxiedClientVer"->Database.HDBC.Types</A->, <A HREF="Database-HDBC.html#v%3AproxiedClientVer"->Database.HDBC</A-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></BODY-></HTML->
− doc/doc-index-Q.html
@@ -1,126 +0,0 @@-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">-<!--Rendered using the Haskell Html Library v0.2-->-<HTML-><HEAD-><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"-><TITLE->Haskell Database Connectivity (HDBC) (Index)</TITLE-><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"-></HEAD-><BODY-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="topbar"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD-><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "-></TD-><TD CLASS="title"->Haskell Database Connectivity (HDBC)</TD-><TD CLASS="topbut"-><A HREF="index.html"->Contents</A-></TD-><TD CLASS="topbut"-><A HREF="doc-index.html"->Index</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD-><A HREF="doc-index-A.html"->A</A-></TD-><TD-><A HREF="doc-index-C.html"->C</A-></TD-><TD-><A HREF="doc-index-D.html"->D</A-></TD-><TD-><A HREF="doc-index-E.html"->E</A-></TD-><TD-><A HREF="doc-index-F.html"->F</A-></TD-><TD-><A HREF="doc-index-G.html"->G</A-></TD-><TD-><A HREF="doc-index-H.html"->H</A-></TD-><TD-><A HREF="doc-index-I.html"->I</A-></TD-><TD-><A HREF="doc-index-N.html"->N</A-></TD-><TD-><A HREF="doc-index-O.html"->O</A-></TD-><TD-><A HREF="doc-index-P.html"->P</A-></TD-><TD-><A HREF="doc-index-Q.html"->Q</A-></TD-><TD-><A HREF="doc-index-R.html"->R</A-></TD-><TD-><A HREF="doc-index-S.html"->S</A-></TD-><TD-><A HREF="doc-index-T.html"->T</A-></TD-><TD-><A HREF="doc-index-W.html"->W</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section1"->Index (Q)</TD-></TR-><TR-><TD-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD CLASS="indexentry"->quickQuery</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC.html#v%3AquickQuery"->Database.HDBC</A-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></BODY-></HTML->
− doc/doc-index-R.html
@@ -1,138 +0,0 @@-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">-<!--Rendered using the Haskell Html Library v0.2-->-<HTML-><HEAD-><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"-><TITLE->Haskell Database Connectivity (HDBC) (Index)</TITLE-><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"-></HEAD-><BODY-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="topbar"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD-><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "-></TD-><TD CLASS="title"->Haskell Database Connectivity (HDBC)</TD-><TD CLASS="topbut"-><A HREF="index.html"->Contents</A-></TD-><TD CLASS="topbut"-><A HREF="doc-index.html"->Index</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD-><A HREF="doc-index-A.html"->A</A-></TD-><TD-><A HREF="doc-index-C.html"->C</A-></TD-><TD-><A HREF="doc-index-D.html"->D</A-></TD-><TD-><A HREF="doc-index-E.html"->E</A-></TD-><TD-><A HREF="doc-index-F.html"->F</A-></TD-><TD-><A HREF="doc-index-G.html"->G</A-></TD-><TD-><A HREF="doc-index-H.html"->H</A-></TD-><TD-><A HREF="doc-index-I.html"->I</A-></TD-><TD-><A HREF="doc-index-N.html"->N</A-></TD-><TD-><A HREF="doc-index-O.html"->O</A-></TD-><TD-><A HREF="doc-index-P.html"->P</A-></TD-><TD-><A HREF="doc-index-Q.html"->Q</A-></TD-><TD-><A HREF="doc-index-R.html"->R</A-></TD-><TD-><A HREF="doc-index-S.html"->S</A-></TD-><TD-><A HREF="doc-index-T.html"->T</A-></TD-><TD-><A HREF="doc-index-W.html"->W</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section1"->Index (R)</TD-></TR-><TR-><TD-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD CLASS="indexentry"->rollback</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-Types.html#v%3Arollback"->Database.HDBC.Types</A->, <A HREF="Database-HDBC.html#v%3Arollback"->Database.HDBC</A-></TD-></TR-><TR-><TD CLASS="indexentry"->run</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-Types.html#v%3Arun"->Database.HDBC.Types</A->, <A HREF="Database-HDBC.html#v%3Arun"->Database.HDBC</A-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></BODY-></HTML->
− doc/doc-index-S.html
@@ -1,748 +0,0 @@-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">-<!--Rendered using the Haskell Html Library v0.2-->-<HTML-><HEAD-><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"-><TITLE->Haskell Database Connectivity (HDBC) (Index)</TITLE-><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"-></HEAD-><BODY-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="topbar"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD-><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "-></TD-><TD CLASS="title"->Haskell Database Connectivity (HDBC)</TD-><TD CLASS="topbut"-><A HREF="index.html"->Contents</A-></TD-><TD CLASS="topbut"-><A HREF="doc-index.html"->Index</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD-><A HREF="doc-index-A.html"->A</A-></TD-><TD-><A HREF="doc-index-C.html"->C</A-></TD-><TD-><A HREF="doc-index-D.html"->D</A-></TD-><TD-><A HREF="doc-index-E.html"->E</A-></TD-><TD-><A HREF="doc-index-F.html"->F</A-></TD-><TD-><A HREF="doc-index-G.html"->G</A-></TD-><TD-><A HREF="doc-index-H.html"->H</A-></TD-><TD-><A HREF="doc-index-I.html"->I</A-></TD-><TD-><A HREF="doc-index-N.html"->N</A-></TD-><TD-><A HREF="doc-index-O.html"->O</A-></TD-><TD-><A HREF="doc-index-P.html"->P</A-></TD-><TD-><A HREF="doc-index-Q.html"->Q</A-></TD-><TD-><A HREF="doc-index-R.html"->R</A-></TD-><TD-><A HREF="doc-index-S.html"->S</A-></TD-><TD-><A HREF="doc-index-T.html"->T</A-></TD-><TD-><A HREF="doc-index-W.html"->W</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section1"->Index (S)</TD-></TR-><TR-><TD-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD CLASS="indexentry"->SqlBigIntT</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-ColTypes.html#v%3ASqlBigIntT"->Database.HDBC.ColTypes</A->, Database.HDBC</TD-></TR-><TR-><TD CLASS="indexentry"->SqlBinaryT</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-ColTypes.html#v%3ASqlBinaryT"->Database.HDBC.ColTypes</A->, Database.HDBC</TD-></TR-><TR-><TD CLASS="indexentry"->SqlBitT</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-ColTypes.html#v%3ASqlBitT"->Database.HDBC.ColTypes</A->, Database.HDBC</TD-></TR-><TR-><TD CLASS="indexentry"->SqlBool</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-Types.html#v%3ASqlBool"->Database.HDBC.Types</A->, <A HREF="Database-HDBC.html#v%3ASqlBool"->Database.HDBC</A-></TD-></TR-><TR-><TD CLASS="indexentry"->SqlChar</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-Types.html#v%3ASqlChar"->Database.HDBC.Types</A->, <A HREF="Database-HDBC.html#v%3ASqlChar"->Database.HDBC</A-></TD-></TR-><TR-><TD CLASS="indexentry"->SqlCharT</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-ColTypes.html#v%3ASqlCharT"->Database.HDBC.ColTypes</A->, Database.HDBC</TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->SqlColDesc</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Type/Class)</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-ColTypes.html#t%3ASqlColDesc"->Database.HDBC.ColTypes</A->, Database.HDBC</TD-></TR-><TR-><TD CLASS="indexannot"->2 (Data Constructor)</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-ColTypes.html#v%3ASqlColDesc"->Database.HDBC.ColTypes</A->, Database.HDBC</TD-></TR-><TR-><TD CLASS="indexentry"->SqlDateT</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-ColTypes.html#v%3ASqlDateT"->Database.HDBC.ColTypes</A->, Database.HDBC</TD-></TR-><TR-><TD CLASS="indexentry"->SqlDecimalT</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-ColTypes.html#v%3ASqlDecimalT"->Database.HDBC.ColTypes</A->, Database.HDBC</TD-></TR-><TR-><TD CLASS="indexentry"->SqlDouble</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-Types.html#v%3ASqlDouble"->Database.HDBC.Types</A->, <A HREF="Database-HDBC.html#v%3ASqlDouble"->Database.HDBC</A-></TD-></TR-><TR-><TD CLASS="indexentry"->SqlDoubleT</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-ColTypes.html#v%3ASqlDoubleT"->Database.HDBC.ColTypes</A->, Database.HDBC</TD-></TR-><TR-><TD CLASS="indexentry"->SqlEpochTime</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-Types.html#v%3ASqlEpochTime"->Database.HDBC.Types</A->, <A HREF="Database-HDBC.html#v%3ASqlEpochTime"->Database.HDBC</A-></TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->SqlError</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Type/Class)</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-Types.html#t%3ASqlError"->Database.HDBC.Types</A->, <A HREF="Database-HDBC.html#t%3ASqlError"->Database.HDBC</A-></TD-></TR-><TR-><TD CLASS="indexannot"->2 (Data Constructor)</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-Types.html#v%3ASqlError"->Database.HDBC.Types</A->, <A HREF="Database-HDBC.html#v%3ASqlError"->Database.HDBC</A-></TD-></TR-><TR-><TD CLASS="indexentry"->SqlFloatT</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-ColTypes.html#v%3ASqlFloatT"->Database.HDBC.ColTypes</A->, Database.HDBC</TD-></TR-><TR-><TD CLASS="indexentry"->SqlGUIDT</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-ColTypes.html#v%3ASqlGUIDT"->Database.HDBC.ColTypes</A->, Database.HDBC</TD-></TR-><TR-><TD CLASS="indexentry"->SqlInt32</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-Types.html#v%3ASqlInt32"->Database.HDBC.Types</A->, <A HREF="Database-HDBC.html#v%3ASqlInt32"->Database.HDBC</A-></TD-></TR-><TR-><TD CLASS="indexentry"->SqlInt64</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-Types.html#v%3ASqlInt64"->Database.HDBC.Types</A->, <A HREF="Database-HDBC.html#v%3ASqlInt64"->Database.HDBC</A-></TD-></TR-><TR-><TD CLASS="indexentry"->SqlInteger</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-Types.html#v%3ASqlInteger"->Database.HDBC.Types</A->, <A HREF="Database-HDBC.html#v%3ASqlInteger"->Database.HDBC</A-></TD-></TR-><TR-><TD CLASS="indexentry"->SqlIntegerT</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-ColTypes.html#v%3ASqlIntegerT"->Database.HDBC.ColTypes</A->, Database.HDBC</TD-></TR-><TR-><TD CLASS="indexentry"->SqlInterval</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-ColTypes.html#t%3ASqlInterval"->Database.HDBC.ColTypes</A->, Database.HDBC</TD-></TR-><TR-><TD CLASS="indexentry"->SqlIntervalDayT</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-ColTypes.html#v%3ASqlIntervalDayT"->Database.HDBC.ColTypes</A->, Database.HDBC</TD-></TR-><TR-><TD CLASS="indexentry"->SqlIntervalDayToHourT</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-ColTypes.html#v%3ASqlIntervalDayToHourT"->Database.HDBC.ColTypes</A->, Database.HDBC</TD-></TR-><TR-><TD CLASS="indexentry"->SqlIntervalDayToMinuteT</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-ColTypes.html#v%3ASqlIntervalDayToMinuteT"->Database.HDBC.ColTypes</A->, Database.HDBC</TD-></TR-><TR-><TD CLASS="indexentry"->SqlIntervalDayToSecondT</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-ColTypes.html#v%3ASqlIntervalDayToSecondT"->Database.HDBC.ColTypes</A->, Database.HDBC</TD-></TR-><TR-><TD CLASS="indexentry"->SqlIntervalHourT</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-ColTypes.html#v%3ASqlIntervalHourT"->Database.HDBC.ColTypes</A->, Database.HDBC</TD-></TR-><TR-><TD CLASS="indexentry"->SqlIntervalHourToMinuteT</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-ColTypes.html#v%3ASqlIntervalHourToMinuteT"->Database.HDBC.ColTypes</A->, Database.HDBC</TD-></TR-><TR-><TD CLASS="indexentry"->SqlIntervalHourToSecondT</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-ColTypes.html#v%3ASqlIntervalHourToSecondT"->Database.HDBC.ColTypes</A->, Database.HDBC</TD-></TR-><TR-><TD CLASS="indexentry"->SqlIntervalMinuteT</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-ColTypes.html#v%3ASqlIntervalMinuteT"->Database.HDBC.ColTypes</A->, Database.HDBC</TD-></TR-><TR-><TD CLASS="indexentry"->SqlIntervalMinuteToSecondT</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-ColTypes.html#v%3ASqlIntervalMinuteToSecondT"->Database.HDBC.ColTypes</A->, Database.HDBC</TD-></TR-><TR-><TD CLASS="indexentry"->SqlIntervalMonthT</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-ColTypes.html#v%3ASqlIntervalMonthT"->Database.HDBC.ColTypes</A->, Database.HDBC</TD-></TR-><TR-><TD CLASS="indexentry"->SqlIntervalSecondT</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-ColTypes.html#v%3ASqlIntervalSecondT"->Database.HDBC.ColTypes</A->, Database.HDBC</TD-></TR-><TR-><TD CLASS="indexentry"->SqlIntervalT</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-ColTypes.html#v%3ASqlIntervalT"->Database.HDBC.ColTypes</A->, Database.HDBC</TD-></TR-><TR-><TD CLASS="indexentry"->SqlIntervalYearT</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-ColTypes.html#v%3ASqlIntervalYearT"->Database.HDBC.ColTypes</A->, Database.HDBC</TD-></TR-><TR-><TD CLASS="indexentry"->SqlIntervalYearToMonthT</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-ColTypes.html#v%3ASqlIntervalYearToMonthT"->Database.HDBC.ColTypes</A->, Database.HDBC</TD-></TR-><TR-><TD CLASS="indexentry"->SqlLongVarBinaryT</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-ColTypes.html#v%3ASqlLongVarBinaryT"->Database.HDBC.ColTypes</A->, Database.HDBC</TD-></TR-><TR-><TD CLASS="indexentry"->SqlLongVarCharT</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-ColTypes.html#v%3ASqlLongVarCharT"->Database.HDBC.ColTypes</A->, Database.HDBC</TD-></TR-><TR-><TD CLASS="indexentry"->SqlNull</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-Types.html#v%3ASqlNull"->Database.HDBC.Types</A->, <A HREF="Database-HDBC.html#v%3ASqlNull"->Database.HDBC</A-></TD-></TR-><TR-><TD CLASS="indexentry"->SqlNumericT</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-ColTypes.html#v%3ASqlNumericT"->Database.HDBC.ColTypes</A->, Database.HDBC</TD-></TR-><TR-><TD CLASS="indexentry"->SqlRational</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-Types.html#v%3ASqlRational"->Database.HDBC.Types</A->, <A HREF="Database-HDBC.html#v%3ASqlRational"->Database.HDBC</A-></TD-></TR-><TR-><TD CLASS="indexentry"->SqlRealT</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-ColTypes.html#v%3ASqlRealT"->Database.HDBC.ColTypes</A->, Database.HDBC</TD-></TR-><TR-><TD CLASS="indexentry"->SqlSmallIntT</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-ColTypes.html#v%3ASqlSmallIntT"->Database.HDBC.ColTypes</A->, Database.HDBC</TD-></TR-><TR-><TD CLASS="indexentry"->SqlString</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-Types.html#v%3ASqlString"->Database.HDBC.Types</A->, <A HREF="Database-HDBC.html#v%3ASqlString"->Database.HDBC</A-></TD-></TR-><TR-><TD CLASS="indexentry"->SqlTimeDiff</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-Types.html#v%3ASqlTimeDiff"->Database.HDBC.Types</A->, <A HREF="Database-HDBC.html#v%3ASqlTimeDiff"->Database.HDBC</A-></TD-></TR-><TR-><TD CLASS="indexentry"->SqlTimeT</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-ColTypes.html#v%3ASqlTimeT"->Database.HDBC.ColTypes</A->, Database.HDBC</TD-></TR-><TR-><TD CLASS="indexentry"->SqlTimestampT</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-ColTypes.html#v%3ASqlTimestampT"->Database.HDBC.ColTypes</A->, Database.HDBC</TD-></TR-><TR-><TD CLASS="indexentry"->SqlTinyIntT</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-ColTypes.html#v%3ASqlTinyIntT"->Database.HDBC.ColTypes</A->, Database.HDBC</TD-></TR-><TR-><TD CLASS="indexentry"->SqlType</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-Types.html#t%3ASqlType"->Database.HDBC.Types</A->, <A HREF="Database-HDBC.html#t%3ASqlType"->Database.HDBC</A-></TD-></TR-><TR-><TD CLASS="indexentry"->SqlTypeId</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-ColTypes.html#t%3ASqlTypeId"->Database.HDBC.ColTypes</A->, Database.HDBC</TD-></TR-><TR-><TD CLASS="indexentry"->SqlUTCDateTimeT</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-ColTypes.html#v%3ASqlUTCDateTimeT"->Database.HDBC.ColTypes</A->, Database.HDBC</TD-></TR-><TR-><TD CLASS="indexentry"->SqlUTCTimeT</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-ColTypes.html#v%3ASqlUTCTimeT"->Database.HDBC.ColTypes</A->, Database.HDBC</TD-></TR-><TR-><TD CLASS="indexentry"->SqlUnknownT</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-ColTypes.html#v%3ASqlUnknownT"->Database.HDBC.ColTypes</A->, Database.HDBC</TD-></TR-><TR-><TD CLASS="indexentry"->SqlValue</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-Types.html#t%3ASqlValue"->Database.HDBC.Types</A->, <A HREF="Database-HDBC.html#t%3ASqlValue"->Database.HDBC</A-></TD-></TR-><TR-><TD CLASS="indexentry"->SqlVarBinaryT</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-ColTypes.html#v%3ASqlVarBinaryT"->Database.HDBC.ColTypes</A->, Database.HDBC</TD-></TR-><TR-><TD CLASS="indexentry"->SqlVarCharT</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-ColTypes.html#v%3ASqlVarCharT"->Database.HDBC.ColTypes</A->, Database.HDBC</TD-></TR-><TR-><TD CLASS="indexentry"->SqlWCharT</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-ColTypes.html#v%3ASqlWCharT"->Database.HDBC.ColTypes</A->, Database.HDBC</TD-></TR-><TR-><TD CLASS="indexentry"->SqlWLongVarCharT</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-ColTypes.html#v%3ASqlWLongVarCharT"->Database.HDBC.ColTypes</A->, Database.HDBC</TD-></TR-><TR-><TD CLASS="indexentry"->SqlWVarCharT</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-ColTypes.html#v%3ASqlWVarCharT"->Database.HDBC.ColTypes</A->, Database.HDBC</TD-></TR-><TR-><TD CLASS="indexentry"->SqlWord32</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-Types.html#v%3ASqlWord32"->Database.HDBC.Types</A->, <A HREF="Database-HDBC.html#v%3ASqlWord32"->Database.HDBC</A-></TD-></TR-><TR-><TD CLASS="indexentry"->SqlWord64</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-Types.html#v%3ASqlWord64"->Database.HDBC.Types</A->, <A HREF="Database-HDBC.html#v%3ASqlWord64"->Database.HDBC</A-></TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->Statement</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Type/Class)</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-Types.html#t%3AStatement"->Database.HDBC.Types</A->, <A HREF="Database-HDBC.html#t%3AStatement"->Database.HDBC</A-></TD-></TR-><TR-><TD CLASS="indexannot"->2 (Data Constructor)</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-Types.html#v%3AStatement"->Database.HDBC.Types</A-></TD-></TR-><TR-><TD CLASS="indexentry"->sExecute</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC.html#v%3AsExecute"->Database.HDBC</A-></TD-></TR-><TR-><TD CLASS="indexentry"->sExecuteMany</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC.html#v%3AsExecuteMany"->Database.HDBC</A-></TD-></TR-><TR-><TD CLASS="indexentry"->sFetchAllRows</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC.html#v%3AsFetchAllRows"->Database.HDBC</A-></TD-></TR-><TR-><TD CLASS="indexentry"->sFetchRow</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC.html#v%3AsFetchRow"->Database.HDBC</A-></TD-></TR-><TR-><TD CLASS="indexentry"->sRun</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC.html#v%3AsRun"->Database.HDBC</A-></TD-></TR-><TR-><TD CLASS="indexentry"->seErrorMsg</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-Types.html#v%3AseErrorMsg"->Database.HDBC.Types</A->, <A HREF="Database-HDBC.html#v%3AseErrorMsg"->Database.HDBC</A-></TD-></TR-><TR-><TD CLASS="indexentry"->seNativeError</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-Types.html#v%3AseNativeError"->Database.HDBC.Types</A->, <A HREF="Database-HDBC.html#v%3AseNativeError"->Database.HDBC</A-></TD-></TR-><TR-><TD CLASS="indexentry"->seState</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-Types.html#v%3AseState"->Database.HDBC.Types</A->, <A HREF="Database-HDBC.html#v%3AseState"->Database.HDBC</A-></TD-></TR-><TR-><TD CLASS="indexentry"->sqlExceptions</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC.html#v%3AsqlExceptions"->Database.HDBC</A-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></BODY-></HTML->
− doc/doc-index-T.html
@@ -1,128 +0,0 @@-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">-<!--Rendered using the Haskell Html Library v0.2-->-<HTML-><HEAD-><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"-><TITLE->Haskell Database Connectivity (HDBC) (Index)</TITLE-><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"-></HEAD-><BODY-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="topbar"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD-><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "-></TD-><TD CLASS="title"->Haskell Database Connectivity (HDBC)</TD-><TD CLASS="topbut"-><A HREF="index.html"->Contents</A-></TD-><TD CLASS="topbut"-><A HREF="doc-index.html"->Index</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD-><A HREF="doc-index-A.html"->A</A-></TD-><TD-><A HREF="doc-index-C.html"->C</A-></TD-><TD-><A HREF="doc-index-D.html"->D</A-></TD-><TD-><A HREF="doc-index-E.html"->E</A-></TD-><TD-><A HREF="doc-index-F.html"->F</A-></TD-><TD-><A HREF="doc-index-G.html"->G</A-></TD-><TD-><A HREF="doc-index-H.html"->H</A-></TD-><TD-><A HREF="doc-index-I.html"->I</A-></TD-><TD-><A HREF="doc-index-N.html"->N</A-></TD-><TD-><A HREF="doc-index-O.html"->O</A-></TD-><TD-><A HREF="doc-index-P.html"->P</A-></TD-><TD-><A HREF="doc-index-Q.html"->Q</A-></TD-><TD-><A HREF="doc-index-R.html"->R</A-></TD-><TD-><A HREF="doc-index-S.html"->S</A-></TD-><TD-><A HREF="doc-index-T.html"->T</A-></TD-><TD-><A HREF="doc-index-W.html"->W</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section1"->Index (T)</TD-></TR-><TR-><TD-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD CLASS="indexentry"->toSql</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC-Types.html#v%3AtoSql"->Database.HDBC.Types</A->, <A HREF="Database-HDBC.html#v%3AtoSql"->Database.HDBC</A-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></BODY-></HTML->
− doc/doc-index-W.html
@@ -1,126 +0,0 @@-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">-<!--Rendered using the Haskell Html Library v0.2-->-<HTML-><HEAD-><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"-><TITLE->Haskell Database Connectivity (HDBC) (Index)</TITLE-><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"-></HEAD-><BODY-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="topbar"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD-><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "-></TD-><TD CLASS="title"->Haskell Database Connectivity (HDBC)</TD-><TD CLASS="topbut"-><A HREF="index.html"->Contents</A-></TD-><TD CLASS="topbut"-><A HREF="doc-index.html"->Index</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD-><A HREF="doc-index-A.html"->A</A-></TD-><TD-><A HREF="doc-index-C.html"->C</A-></TD-><TD-><A HREF="doc-index-D.html"->D</A-></TD-><TD-><A HREF="doc-index-E.html"->E</A-></TD-><TD-><A HREF="doc-index-F.html"->F</A-></TD-><TD-><A HREF="doc-index-G.html"->G</A-></TD-><TD-><A HREF="doc-index-H.html"->H</A-></TD-><TD-><A HREF="doc-index-I.html"->I</A-></TD-><TD-><A HREF="doc-index-N.html"->N</A-></TD-><TD-><A HREF="doc-index-O.html"->O</A-></TD-><TD-><A HREF="doc-index-P.html"->P</A-></TD-><TD-><A HREF="doc-index-Q.html"->Q</A-></TD-><TD-><A HREF="doc-index-R.html"->R</A-></TD-><TD-><A HREF="doc-index-S.html"->S</A-></TD-><TD-><A HREF="doc-index-T.html"->T</A-></TD-><TD-><A HREF="doc-index-W.html"->W</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section1"->Index (W)</TD-></TR-><TR-><TD-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD CLASS="indexentry"->withTransaction</TD-><TD CLASS="indexlinks"-><A HREF="Database-HDBC.html#v%3AwithTransaction"->Database.HDBC</A-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></BODY-></HTML->
− doc/doc-index.html
@@ -1,112 +0,0 @@-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">-<!--Rendered using the Haskell Html Library v0.2-->-<HTML-><HEAD-><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"-><TITLE->Haskell Database Connectivity (HDBC) (Index)</TITLE-><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"-></HEAD-><BODY-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="topbar"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD-><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "-></TD-><TD CLASS="title"->Haskell Database Connectivity (HDBC)</TD-><TD CLASS="topbut"-><A HREF="index.html"->Contents</A-></TD-><TD CLASS="topbut"-><A HREF="doc-index.html"->Index</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section1"->Index</TD-></TR-><TR-><TD-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD-><A HREF="doc-index-A.html"->A</A-></TD-><TD-><A HREF="doc-index-C.html"->C</A-></TD-><TD-><A HREF="doc-index-D.html"->D</A-></TD-><TD-><A HREF="doc-index-E.html"->E</A-></TD-><TD-><A HREF="doc-index-F.html"->F</A-></TD-><TD-><A HREF="doc-index-G.html"->G</A-></TD-><TD-><A HREF="doc-index-H.html"->H</A-></TD-><TD-><A HREF="doc-index-I.html"->I</A-></TD-><TD-><A HREF="doc-index-N.html"->N</A-></TD-><TD-><A HREF="doc-index-O.html"->O</A-></TD-><TD-><A HREF="doc-index-P.html"->P</A-></TD-><TD-><A HREF="doc-index-Q.html"->Q</A-></TD-><TD-><A HREF="doc-index-R.html"->R</A-></TD-><TD-><A HREF="doc-index-S.html"->S</A-></TD-><TD-><A HREF="doc-index-T.html"->T</A-></TD-><TD-><A HREF="doc-index-W.html"->W</A-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></BODY-></HTML->
− doc/haddock.css
@@ -1,235 +0,0 @@-/* -------- Global things --------- */--BODY { - background-color: #ffffff;- color: #000000;- font-family: sans-serif;- } --A:link { color: #0000e0; text-decoration: none }-A:visited { color: #0000a0; text-decoration: none }-A:hover { background-color: #e0e0ff; text-decoration: none }--TABLE.vanilla {- width: 100%;- border-width: 0px;- /* I can't seem to specify cellspacing or cellpadding properly using CSS... */-}--TABLE.vanilla2 {- border-width: 0px;-}--/* <TT> font is a little too small in MSIE */-TT { font-size: 100%; }-PRE { font-size: 100%; }--LI P { margin: 0pt } --TD {- border-width: 0px;-}--TABLE.narrow {- border-width: 0px;-}--TD.s8 { height: 8px; }-TD.s15 { height: 15px; }--SPAN.keyword { text-decoration: underline; }--/* Resize the buttom image to match the text size */-IMG.coll { width : 0.75em; height: 0.75em; margin-bottom: 0; margin-right: 0.5em }--/* --------- Contents page ---------- */--DIV.node {- padding-left: 3em;-}--DIV.cnode {- padding-left: 1.75em;-}--SPAN.pkg {- position: absolute;- left: 50em;-}--/* --------- Documentation elements ---------- */--TD.children {- padding-left: 25px;- }--TD.synopsis {- padding: 2px;- background-color: #f0f0f0;- font-family: monospace- }--TD.decl { - padding: 2px;- background-color: #f0f0f0; - font-family: monospace;- vertical-align: top;- }--/* - arg is just like decl, except that wrapping is not allowed. It is- used for function and constructor arguments which have a text box- to the right, where if wrapping is allowed the text box squashes up- the declaration by wrapping it.-*/-TD.arg { - padding: 2px;- background-color: #f0f0f0; - font-family: monospace;- vertical-align: top;- white-space: nowrap;- }--TD.recfield { padding-left: 20px }--TD.doc { - padding-top: 2px;- padding-left: 10px;- }--TD.ndoc { - padding: 2px;- }--TD.rdoc { - padding: 2px;- padding-left: 10px;- width: 100%;- }--TD.body { - padding-left: 10px- }--TD.pkg {- width: 100%;- padding-left: 10px-}--TD.indexentry {- vertical-align: top;- padding-right: 10px- }--TD.indexannot {- vertical-align: top;- padding-left: 20px;- white-space: nowrap- }--TD.indexlinks {- width: 100%- }--/* ------- Section Headings ------- */--TD.section1 {- padding-top: 15px;- font-weight: bold;- font-size: 150%- }--TD.section2 {- padding-top: 10px;- font-weight: bold;- font-size: 130%- }--TD.section3 {- padding-top: 5px;- font-weight: bold;- font-size: 110%- }--TD.section4 {- font-weight: bold;- font-size: 100%- }--/* -------------- The title bar at the top of the page */--TD.infohead {- color: #ffffff;- font-weight: bold;- padding-right: 10px;- text-align: left;-}--TD.infoval {- color: #ffffff;- padding-right: 10px;- text-align: left;-}--TD.topbar {- background-color: #000099;- padding: 5px;-}--TD.title {- color: #ffffff;- padding-left: 10px;- width: 100%- }--TD.topbut {- padding-left: 5px;- padding-right: 5px;- border-left-width: 1px;- border-left-color: #ffffff;- border-left-style: solid;- white-space: nowrap;- }--TD.topbut A:link {- color: #ffffff- }--TD.topbut A:visited {- color: #ffff00- }--TD.topbut A:hover {- background-color: #6060ff;- }--TD.topbut:hover {- background-color: #6060ff- }--TD.modulebar { - background-color: #0077dd;- padding: 5px;- border-top-width: 1px;- border-top-color: #ffffff;- border-top-style: solid;- }--/* --------- The page footer --------- */--TD.botbar {- background-color: #000099;- color: #ffffff;- padding: 5px- }-TD.botbar A:link {- color: #ffffff;- text-decoration: underline- }-TD.botbar A:visited {- color: #ffff00- }-TD.botbar A:hover {- background-color: #6060ff- }-
− doc/haddock.js
@@ -1,15 +0,0 @@-// Haddock JavaScript utilities-function toggle(button,id)-{- var n = document.getElementById(id).style;- if (n.display == "none")- {- button.src = "minus.gif";- n.display = "block";- }- else- {- button.src = "plus.gif";- n.display = "none";- }-}
− doc/haskell_icon.gif
binary file changed (911 → absent bytes)
− doc/hdbc.interface
binary file changed (19098 → absent bytes)
− doc/index.html
@@ -1,120 +0,0 @@-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">-<!--Rendered using the Haskell Html Library v0.2-->-<HTML-><HEAD-><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"-><TITLE->Haskell Database Connectivity (HDBC)</TITLE-><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"-><SCRIPT SRC="haddock.js" TYPE="text/javascript"-></SCRIPT-></HEAD-><BODY-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="topbar"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD-><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "-></TD-><TD CLASS="title"->Haskell Database Connectivity (HDBC)</TD-><TD CLASS="topbut"-><A HREF="index.html"->Contents</A-></TD-><TD CLASS="topbut"-><A HREF="doc-index.html"->Index</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section1"->Modules</TD-></TR-><TR-><TD-><TABLE CLASS="vanilla2" CELLSPACING="0" CELLPADDING="0"-><TR-><TD STYLE="width: 50em"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'n:0')" ALT="show/hide"->Database</TD-><TD-></TD-><TD-></TD-></TR-><TR-><TD STYLE="padding: 0; padding-left: 2em" COLSPAN="3"-><TABLE CLASS="vanilla2" CELLSPACING="0" CELLPADDING="0" ID="n:0" STYLE="display:block;"-><TR-><TD STYLE="width: 48em"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'n:1')" ALT="show/hide"-><A HREF="Database-HDBC.html"->Database.HDBC</A-></TD-><TD-></TD-><TD-></TD-></TR-><TR-><TD STYLE="padding: 0; padding-left: 2em" COLSPAN="3"-><TABLE CLASS="vanilla2" CELLSPACING="0" CELLPADDING="0" ID="n:1" STYLE="display:block;"-><TR-><TD STYLE="padding-left: 1.25em;width: 46em"-><A HREF="Database-HDBC-ColTypes.html"->Database.HDBC.ColTypes</A-></TD-><TD-></TD-><TD-></TD-></TR-><TR-><TD STYLE="padding-left: 1.25em;width: 46em"-><A HREF="Database-HDBC-DriverUtils.html"->Database.HDBC.DriverUtils</A-></TD-><TD-></TD-><TD-></TD-></TR-><TR-><TD STYLE="padding-left: 1.25em;width: 46em"-><A HREF="Database-HDBC-Types.html"->Database.HDBC.Types</A-></TD-><TD-></TD-><TD-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="botbar"->Produced by <A HREF="http://www.haskell.org/haddock/"->Haddock</A-> version 0.7</TD-></TR-></TABLE-></BODY-></HTML->
− doc/minus.gif
binary file changed (56 → absent bytes)
− doc/plus.gif
binary file changed (59 → absent bytes)