From: <kr_...@us...> - 2006-01-03 22:59:55
|
Update of /cvsroot/htoolkit/HSQL/SQLite/Database/HSQL In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24722/SQLite/Database/HSQL Modified Files: SQLite2.hsc Log Message: The type of execute function is changed. Now it returns the number of the rows affected. Index: SQLite2.hsc =================================================================== RCS file: /cvsroot/htoolkit/HSQL/SQLite/Database/HSQL/SQLite2.hsc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** SQLite2.hsc 15 Dec 2005 13:27:05 -0000 1.1 --- SQLite2.hsc 3 Jan 2006 22:59:47 -0000 1.2 *************** *** 31,34 **** --- 31,35 ---- foreign import ccall sqlite_close :: SQLite -> IO () foreign import ccall sqlite_exec :: SQLite -> CString -> FunPtr () -> Ptr () -> Ptr CString -> IO CInt + foreign import ccall sqlite_changes :: SQLite3 -> IO CInt foreign import ccall sqlite_get_table :: SQLite -> CString -> Ptr (Ptr CString) -> Ptr CInt -> Ptr CInt -> Ptr CString -> IO CInt foreign import ccall sqlite_free_table :: Ptr CString -> IO () *************** *** 88,92 **** AppendMode -> (#const O_APPEND) ! execute :: SQLite -> String -> IO () execute sqlite query = withCString query $ \pQuery -> do --- 89,93 ---- AppendMode -> (#const O_APPEND) ! execute :: SQLite -> String -> IO Integer execute sqlite query = withCString query $ \pQuery -> do *************** *** 94,97 **** --- 95,99 ---- res <- sqlite_exec sqlite pQuery nullFunPtr nullPtr ppMsg handleSqlResult res ppMsg + sqlite_changes sqlite query :: Connection -> SQLite -> String -> IO Statement |