module DB.HSQL.SQLite3.Functions where
import Foreign(Ptr,FunPtr)
import Foreign.C(CString,CInt)
type SQLite3 = Ptr ()
foreign import ccall
sqlite3_open :: CString -> (Ptr SQLite3) -> IO Int
foreign import ccall
sqlite3_errmsg :: SQLite3 -> IO CString
foreign import ccall
sqlite3_close :: SQLite3 -> IO ()
foreign import ccall
sqlite3_exec :: SQLite3 -> CString -> FunPtr () -> Ptr () -> Ptr CString -> IO CInt
foreign import ccall
sqlite3_get_table :: SQLite3 -> CString -> Ptr (Ptr CString) -> Ptr CInt -> Ptr CInt -> Ptr CString -> IO CInt
foreign import ccall
sqlite3_free_table :: Ptr CString -> IO ()
foreign import ccall
sqlite3_free :: CString -> IO ()
foreign import ccall "strlen"
strlen :: CString -> IO CInt
sqliteOk:: Int
sqliteOk = 0
oRdOnly = 0
oWrOnly = 1
oRdWr = 2
oAppend = 1024