HDBC-mysql 0.6.2 → 0.6.3
raw patch · 2 files changed
+36/−1 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- Database/HDBC/MySQL/Connection.hsc +35/−0
- HDBC-mysql.cabal +1/−1
Database/HDBC/MySQL/Connection.hsc view
@@ -61,6 +61,7 @@ , commit :: IO () , rollback :: IO () , run :: String -> [Types.SqlValue] -> IO Integer+ , runRaw :: String -> IO () , prepare :: String -> IO Types.Statement , clone :: IO Connection , hdbcDriverName :: String@@ -78,6 +79,7 @@ commit = commit rollback = rollback run = run+ runRaw = runRaw prepare = prepare clone = clone hdbcDriverName = hdbcDriverName@@ -130,6 +132,7 @@ , commit = doCommit mysql__ >> doStartTransaction mysql__ , rollback = doRollback mysql__ >> doStartTransaction mysql__ , run = doRun mysql__+ , runRaw = flip doQuery mysql__ , prepare = newStatement mysql__ , clone = connectMySQL info , hdbcDriverName = "mysql"@@ -278,6 +281,7 @@ -- statement is around. return $ Types.Statement { Types.execute = execute mysql__ stmt__+ , Types.executeRaw = executeRaw mysql__ stmt__ , Types.executeMany = mapM_ $ execute mysql__ stmt__ , Types.finish = finalizeForeignPtr stmt__ , Types.fetchRow = fetchRow mysql__ stmt__ results@@ -433,6 +437,30 @@ buf_ <- new t bindOfSqlValue' (#{const sizeof(MYSQL_TIME)}::Int) buf_ #{const MYSQL_TYPE_TIME} Signed +bindOfSqlValue (Types.SqlLocalDate _) =+ error "SqlLocalDate: bind type not implemented"++bindOfSqlValue (Types.SqlLocalTimeOfDay _) =+ error "SqlLocalTimeOfDay: bind type not implemented"++bindOfSqlValue (Types.SqlZonedLocalTimeOfDay _ _) =+ error "SqlZonedLocalTimeOfDay: bind type not implemented"++bindOfSqlValue (Types.SqlLocalTime _) =+ error "SqlLocalTime: bind type not implemented"++bindOfSqlValue (Types.SqlZonedTime _) =+ error "SqlZonedTime: bind type not implemented"++bindOfSqlValue (Types.SqlUTCTime _) =+ error "SqlUTCTime: bind type not implemented"++bindOfSqlValue (Types.SqlDiffTime _) =+ error "SqlDiffTime: bind type not implemented"++bindOfSqlValue (Types.SqlPOSIXTime _) =+ error "SqlPOSIXtime: bind type not implemented"+ -- A nasty helper function that cuts down on the boilerplate a bit. bindOfSqlValue' :: (Integral a, Storable b) => a -> Ptr b -> CInt -> Signedness -> IO MYSQL_BIND @@ -449,6 +477,13 @@ , bindBufferLength = buflen , bindIsUnsigned = (if signedness == Unsigned then 1 else 0) }++executeRaw :: ForeignPtr MYSQL -> ForeignPtr MYSQL_STMT -> IO ()+executeRaw mysql__ stmt__ =+ withForeignPtr mysql__ $ \_ ->+ withForeignPtr stmt__ $ \stmt_ -> do+ rv <- mysql_stmt_execute stmt_+ when (rv /= 0) (statementError stmt_) -- Returns an appropriate binding structure for a field. resultOfField :: MYSQL_FIELD -> IO MYSQL_BIND
HDBC-mysql.cabal view
@@ -1,7 +1,7 @@ Name: HDBC-mysql Category: Database Synopsis: MySQL driver for HDBC-Version: 0.6.2+Version: 0.6.3 Description: This package provides a MySQL driver for HDBC. Stability: Experimental Maintainer: Chris Waterson <waterson@maubi.net>