Update of /cvsroot/htoolkit/HSQL/MySQL/Database/HSQL
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24722/MySQL/Database/HSQL
Modified Files:
MySQL.hsc
Log Message:
The type of execute function is changed. Now it returns the number of the rows affected.
Index: MySQL.hsc
===================================================================
RCS file: /cvsroot/htoolkit/HSQL/MySQL/Database/HSQL/MySQL.hsc,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** MySQL.hsc 12 Dec 2005 21:33:50 -0000 1.4
--- MySQL.hsc 3 Jan 2006 22:59:46 -0000 1.5
***************
*** 106,113 ****
return connection
where
! execute :: MYSQL -> String -> IO ()
execute pMYSQL query = do
res <- withCString query (mysql_query pMYSQL)
when (res /= 0) (handleSqlError pMYSQL)
withStatement :: Connection -> MYSQL -> MYSQL_RES -> IO Statement
--- 106,114 ----
return connection
where
! execute :: MYSQL -> String -> IO Integer
execute pMYSQL query = do
res <- withCString query (mysql_query pMYSQL)
when (res /= 0) (handleSqlError pMYSQL)
+ return (-1)
withStatement :: Connection -> MYSQL -> MYSQL_RES -> IO Statement
|