From: PHO Date: Sun, 5 Sep 2010 16:50:27 +0000 (+0900) Subject: Bindings.APR.DBD X-Git-Tag: RELEASE-0.1~18 X-Git-Url: https://git.cielonegro.org/gitweb.cgi?a=commitdiff_plain;h=0603eb203b940b0e4a3420ac4d79f0136a1e3fb5;p=bindings-apr-util.git Bindings.APR.DBD --- diff --git a/Bindings/APR/DBD.hsc b/Bindings/APR/DBD.hsc new file mode 100644 index 0000000..d82e0f9 --- /dev/null +++ b/Bindings/APR/DBD.hsc @@ -0,0 +1,81 @@ +#include +#include + +module Bindings.APR.DBD where +#strict_import +import Bindings.APR.ErrNo +import Bindings.APR.Pools + +#integral_t apr_dbd_type_e +#num APR_DBD_TYPE_NONE +#num APR_DBD_TYPE_TINY +#num APR_DBD_TYPE_UTINY +#num APR_DBD_TYPE_SHORT +#num APR_DBD_TYPE_USHORT +#num APR_DBD_TYPE_INT +#num APR_DBD_TYPE_UINT +#num APR_DBD_TYPE_LONG +#num APR_DBD_TYPE_ULONG +#num APR_DBD_TYPE_LONGLONG +#num APR_DBD_TYPE_ULONGLONG +#num APR_DBD_TYPE_FLOAT +#num APR_DBD_TYPE_DOUBLE +#num APR_DBD_TYPE_STRING +#num APR_DBD_TYPE_TEXT +#num APR_DBD_TYPE_TIME +#num APR_DBD_TYPE_DATE +#num APR_DBD_TYPE_DATETIME +#num APR_DBD_TYPE_TIMESTAMP +#num APR_DBD_TYPE_ZTIMESTAMP +#num APR_DBD_TYPE_BLOB +#num APR_DBD_TYPE_CLOB +#num APR_DBD_TYPE_NULL + +#opaque_t apr_dbd_driver_t +#opaque_t apr_dbd_t +#opaque_t apr_dbd_transaction_t +#opaque_t apr_dbd_results_t +#opaque_t apr_dbd_row_t +#opaque_t apr_dbd_prepared_t + +#ccall apr_dbd_init , Ptr -> IO +#ccall apr_dbd_get_driver , Ptr -> Ptr CChar -> Ptr (Ptr ) -> IO +#ccall apr_dbd_open_ex , Ptr -> Ptr -> Ptr CChar -> Ptr (Ptr ) -> Ptr (Ptr CChar) -> IO +#ccall apr_dbd_open , Ptr -> Ptr -> Ptr CChar -> Ptr (Ptr ) -> IO +#ccall apr_dbd_close , Ptr -> Ptr -> IO +#ccall apr_dbd_name , Ptr -> IO (Ptr CChar) +#ccall apr_dbd_native_handle, Ptr -> Ptr -> IO (Ptr ()) +#ccall apr_dbd_check_conn , Ptr -> Ptr -> Ptr -> IO CInt +#ccall apr_dbd_set_dbname , Ptr -> Ptr -> Ptr -> Ptr CChar -> IO CInt + +#ccall apr_dbd_transaction_start, Ptr -> Ptr -> Ptr -> Ptr (Ptr ) -> IO CInt +#ccall apr_dbd_transaction_end , Ptr -> Ptr -> Ptr -> IO CInt + +#num APR_DBD_TRANSACTION_COMMIT +#num APR_DBD_TRANSACTION_ROLLBACK +#num APR_DBD_TRANSACTION_IGNORE_ERRORS + +#ccall apr_dbd_transaction_mode_get, Ptr -> Ptr -> IO CInt +#ccall apr_dbd_transaction_mode_set, Ptr -> Ptr -> CInt -> IO CInt + +#ccall apr_dbd_query , Ptr -> Ptr -> Ptr CInt -> Ptr CChar -> IO CInt +#ccall apr_dbd_select , Ptr -> Ptr -> Ptr -> Ptr (Ptr ) -> Ptr CChar -> CInt -> IO CInt +#ccall apr_dbd_num_cols , Ptr -> Ptr -> IO CInt +#ccall apr_dbd_num_tuples, Ptr -> Ptr -> IO CInt +#ccall apr_dbd_get_row , Ptr -> Ptr -> Ptr -> Ptr (Ptr ) -> CInt -> IO CInt +#ccall apr_dbd_get_entry , Ptr -> Ptr -> CInt -> IO (Ptr CChar) +#ccall apr_dbd_get_name , Ptr -> Ptr -> CInt -> IO (Ptr CChar) +#ccall apr_dbd_error , Ptr -> Ptr -> CInt -> IO (Ptr CChar) +#ccall apr_dbd_escape , Ptr -> Ptr -> Ptr CChar -> Ptr -> IO (Ptr CChar) + +#ccall apr_dbd_prepare , Ptr -> Ptr -> Ptr -> Ptr CChar -> Ptr CChar -> Ptr (Ptr ) -> IO CInt +#ccall apr_dbd_pquery , Ptr -> Ptr -> Ptr -> Ptr CInt -> Ptr -> CInt -> Ptr (Ptr CChar) -> IO CInt +#ccall apr_dbd_pselect , Ptr -> Ptr -> Ptr -> Ptr (Ptr ) -> Ptr -> CInt -> CInt -> Ptr (Ptr CChar) -> IO CInt +-- FIXME: apr_dbd_pvquery takes varargs +-- FIXME: apr_dbd_pvselect takes varargs +#ccall apr_dbd_pbquery , Ptr -> Ptr -> Ptr -> Ptr CInt -> Ptr -> Ptr (Ptr ()) -> IO CInt +#ccall apr_dbd_pbselect, Ptr -> Ptr -> Ptr -> Ptr (Ptr ) -> Ptr -> CInt -> Ptr (Ptr ()) -> IO CInt +-- FIXME: apr_dbd_pvbquery takes varargs +-- FIXME: apr_dbd_pvbselect takes varargs + +#ccall apr_dbd_datum_get, Ptr -> Ptr -> CInt -> -> Ptr () -> IO diff --git a/bindings-apr-util.cabal b/bindings-apr-util.cabal index d6485f9..f154480 100644 --- a/bindings-apr-util.cabal +++ b/bindings-apr-util.cabal @@ -34,6 +34,7 @@ Library Bindings.APR.Base64 Bindings.APR.Buckets Bindings.APR.Date + Bindings.APR.DBD C-Sources: cbits/helper_apr_anylock.c