HDBC 2.1.1 → 2.2.0
raw patch · 5 files changed
+21/−8 lines, 5 files
Files
- Database/HDBC.hs +2/−2
- Database/HDBC/SqlValue.hs +0/−4
- Database/HDBC/Statement.hs +7/−0
- Database/HDBC/Types.hs +10/−0
- HDBC.cabal +2/−2
Database/HDBC.hs view
@@ -51,7 +51,7 @@ -- ** Wrapped Connections ConnWrapper(..), withWConn, -- ** Preparing Queries- run, sRun, prepare, quickQuery', quickQuery,+ run, runRaw, sRun, prepare, quickQuery', quickQuery, -- ** Transaction Handling -- $transactions@@ -65,7 +65,7 @@ -- * Statements Statement, -- ** Execution- execute, sExecute, executeMany, sExecuteMany,+ execute, executeRaw, sExecute, executeMany, sExecuteMany, -- ** Fetching Results fetchRow, fetchRowAL, fetchRowMap, sFetchRow, fetchAllRows, fetchAllRows', fetchAllRowsAL, fetchAllRowsAL',
Database/HDBC/SqlValue.hs view
@@ -582,9 +582,6 @@ safeConvert (SqlTimeDiff x) = return . fromIntegral $ x safeConvert y@(SqlNull) = quickError y -#if __GLASGOW_HASKELL__ >= 610--- instances added in GHC 6.10.3-#else instance Typeable Day where typeOf _ = mkTypeName "Day" instance Typeable TimeOfDay where@@ -597,7 +594,6 @@ typeOf _ = mkTypeName "DiffTime" instance Typeable TimeZone where typeOf _ = mkTypeName "TimeZone"-#endif instance Typeable ST.ClockTime where typeOf _ = mkTypeName "ClockTime"
Database/HDBC/Statement.hs view
@@ -32,6 +32,13 @@ -} execute :: [SqlValue] -> IO Integer, + {- | Execute the statement as-is, without supplying any+ positional parameters. This is intended for statements for+ which the results aren't interesting or present (e.g., DDL or+ DML commands). If your query contains placeholders, this will+ certainly fail; use 'execute' instead. -}+ executeRaw :: IO (),+ {- | 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.
Database/HDBC/Types.hs view
@@ -48,6 +48,7 @@ import Database.HDBC.Statement import Database.HDBC.SqlValue import Database.HDBC.ColTypes+import Control.Exception ( finally ) {- | Main database handle object. @@ -91,6 +92,15 @@ {- | Roll back to the state the database was in prior to the last 'commit' or 'rollback'. -} rollback :: conn -> IO ()+ {- | Execute an SQL string, which may contain multiple+ queries. This is intended for situations where you+ need to run DML or DDL queries and aren't+ interested in results. -}+ runRaw :: conn -> String -> IO ()+ runRaw conn sql = do+ sth <- prepare conn sql+ execute sth [] `finally` finish sth+ return () {- | Execute a single SQL query. Returns the number of rows modified (see 'execute' for details). The second parameter is a list
HDBC.cabal view
@@ -1,5 +1,5 @@ Name: HDBC-Version: 2.1.1+Version: 2.2.0 License: LGPL Maintainer: John Goerzen <jgoerzen@complete.org> Author: John Goerzen@@ -26,7 +26,7 @@ library if flag(splitBase)- Build-Depends: base>=3, old-time, time>=1.1.2.4, bytestring, containers, old-locale+ Build-Depends: base>=3 && <5, old-time, time>=1.1.2.4 && <1.3.0, bytestring, containers, old-locale else Build-Depends: base<3 Build-Depends: mtl, convertible >= 1.0.1, utf8-string