Update of /cvsroot/htoolkit/HSQL/SQLite/Database/HSQL
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7266/Database/HSQL
Modified Files:
SQLite2.hsc
Log Message:
fixes for the changed execute method.
Index: SQLite2.hsc
===================================================================
RCS file: /cvsroot/htoolkit/HSQL/SQLite/Database/HSQL/SQLite2.hsc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** SQLite2.hsc 3 Jan 2006 22:59:47 -0000 1.2
--- SQLite2.hsc 4 Jan 2006 08:19:49 -0000 1.3
***************
*** 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 ()
--- 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 :: SQLite -> 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 ()
***************
*** 77,83 ****
, connTables = tables connection sqlite
, connDescribe = describe connection sqlite
! , connBeginTransaction = execute sqlite "BEGIN TRANSACTION"
! , connCommitTransaction = execute sqlite "COMMIT TRANSACTION"
! , connRollbackTransaction = execute sqlite "ROLLBACK TRANSACTION"
}
return connection
--- 77,83 ----
, connTables = tables connection sqlite
, connDescribe = describe connection sqlite
! , connBeginTransaction = execute sqlite "BEGIN TRANSACTION" >> return ()
! , connCommitTransaction = execute sqlite "COMMIT TRANSACTION" >> return ()
! , connRollbackTransaction = execute sqlite "ROLLBACK TRANSACTION" >> return ()
}
return connection
***************
*** 95,99 ****
res <- sqlite_exec sqlite pQuery nullFunPtr nullPtr ppMsg
handleSqlResult res ppMsg
! sqlite_changes sqlite
query :: Connection -> SQLite -> String -> IO Statement
--- 95,100 ----
res <- sqlite_exec sqlite pQuery nullFunPtr nullPtr ppMsg
handleSqlResult res ppMsg
! changes <- sqlite_changes sqlite
! return (fromIntegral changes)
query :: Connection -> SQLite -> String -> IO Statement
|