#include #include -------------------------------------------------------------------------------- module Database.Internal.SednaCBindings where -------------------------------------------------------------------------------- import Foreign import Foreign.C.Types import Foreign.C.String import Database.Internal.SpDefs -------------------------------------------------------------------------------- #num QUERY_EXECUTION_TIME #num BULK_LOAD_PORTION -------------------------------------------------------------------------------- #starttype struct conn_bulk_load #field bulk_load_started , CChar #array_field doc_name , CChar #array_field col_name , CChar #stoptype -------------------------------------------------------------------------------- #callback debug_handler_t, FunPtr ( -> CString -> IO ()) -------------------------------------------------------------------------------- #starttype struct SednaConnection #array_field url , CChar #array_field db_name , CChar #array_field login , CChar #array_field password , CChar #array_field session_directory , CChar #field socket , CInt #field last_error , CInt #array_field last_error_msg , CChar #array_field query_time , CChar #field socket_keeps_data , CChar #field first_next , CChar #field result_end , CChar #field in_query , CChar #field cbl , #field isInTransaction , CInt #field isConnectionOk , CInt #field autocommit , CInt #field local_data_length , CInt #field local_data_offset , CInt #array_field local_data_buf , CChar #field msg , #field debug_handler , #field boundary_space_preserve , CChar #field query_timeout , CInt #field max_result_size , CInt #stoptype -------------------------------------------------------------------------------- #ccall SEconnect, Ptr -> CString -> CString -> CString -> CString -> IO CInt #ccall SEclose, Ptr -> IO CInt -------------------------------------------------------------------------------- #ccall SEbegin, Ptr -> IO CInt #ccall SErollback, Ptr -> IO CInt #ccall SEcommit, Ptr -> IO CInt -------------------------------------------------------------------------------- #ccall SEexecuteLong, Ptr -> CString -> IO CInt #ccall SEexecute, Ptr -> CString -> IO CInt -------------------------------------------------------------------------------- #ccall SEgetData, Ptr -> CString -> CInt -> IO CInt #ccall SEloadData, Ptr -> CString -> CInt -> CString -> CString -> IO CInt #ccall SEendLoadData, Ptr -> IO CInt -------------------------------------------------------------------------------- #ccall SEnext, Ptr -> IO CInt -------------------------------------------------------------------------------- #ccall SEgetLastErrorCode, Ptr -> IO CInt #ccall SEgetLastErrorMsg, Ptr -> IO CString -------------------------------------------------------------------------------- #ccall SEconnectionStatus, Ptr -> IO CInt #ccall SEtransactionStatus, Ptr -> IO CInt -------------------------------------------------------------------------------- #ccall SEshowTime , Ptr -> IO CString -------------------------------------------------------------------------------- #ccall SEsetConnectionAttr, Ptr -> CUInt -> Ptr () -> CInt -> IO CInt #ccall SEgetConnectionAttr, Ptr -> CUInt -> Ptr () -> Ptr CInt -> IO CInt -------------------------------------------------------------------------------- #ccall SEresetAllConnectionAttr, Ptr -> IO CInt -------------------------------------------------------------------------------- #ccall SEsetDebugHandler, Ptr -> -> Ptr ()