packages feed

HDBC-odbc 1.1.4.3 → 1.1.4.4

raw patch · 4 files changed

+35/−17 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

Database/HDBC/ODBC/Connection.hsc view
@@ -45,6 +45,12 @@ #include <sql.h> #include <sqlext.h> +#ifdef mingw32_HOST_OS+#let CALLCONV = "stdcall"+#else+#let CALLCONV = "ccall"+#endif+ {- | Connect to an ODBC server.  For information on the meaning of the passed string, please see:@@ -185,7 +191,7 @@        -- FIXME: will this checkError segfault?        checkError "disconnect" (DbcHandle $ llconn) res -foreign import ccall unsafe "sql.h SQLAllocHandle"+foreign import #{CALLCONV} unsafe "sql.h SQLAllocHandle"   sqlAllocHandle :: #{type SQLSMALLINT} -> Ptr () ->                      Ptr () -> IO (#{type SQLRETURN}) @@ -198,11 +204,11 @@ foreign import ccall unsafe "hdbc-odbc-helper.h sqlFreeHandleDbc_app"   sqlFreeHandleDbc_app :: Ptr WrappedCConn -> IO (#{type SQLRETURN}) -foreign import ccall unsafe "sql.h SQLSetEnvAttr"+foreign import #{CALLCONV} unsafe "sql.h SQLSetEnvAttr"   sqlSetEnvAttr :: Ptr CEnv -> #{type SQLINTEGER} ->                     Ptr () -> #{type SQLINTEGER} -> IO #{type SQLRETURN} -foreign import ccall unsafe "sql.h SQLDriverConnect"+foreign import #{CALLCONV} unsafe "sql.h SQLDriverConnect"   sqlDriverConnect :: Ptr CConn -> Ptr () -> CString -> #{type SQLSMALLINT}                    -> CString -> #{type SQLSMALLINT}                    -> Ptr #{type SQLSMALLINT} -> #{type SQLUSMALLINT}@@ -216,14 +222,14 @@                     -> Ptr #{type SQLUINTEGER} -> #{type SQLINTEGER}                     -> IO #{type SQLRETURN} -foreign import ccall unsafe "sql.h SQLEndTran"+foreign import #{CALLCONV} unsafe "sql.h SQLEndTran"   sqlEndTran :: #{type SQLSMALLINT} -> Ptr CConn -> #{type SQLSMALLINT}              -> IO #{type SQLRETURN}  foreign import ccall unsafe "hdbc-odbc-helper.h disableAutoCommit"   disableAutoCommit :: Ptr CConn -> IO #{type SQLRETURN} -foreign import ccall unsafe "sql.h SQLGetInfo"+foreign import #{CALLCONV} unsafe "sql.h SQLGetInfo"   sqlGetInfo :: Ptr CConn -> #{type SQLUSMALLINT} -> Ptr () ->                 #{type SQLSMALLINT} -> Ptr #{type SQLSMALLINT} ->                 IO #{type SQLRETURN}
Database/HDBC/ODBC/Statement.hsc view
@@ -49,6 +49,12 @@ #include <sql.h> #include <sqlext.h> +#ifdef mingw32_HOST_OS+#let CALLCONV = "stdcall"+#else+#let CALLCONV = "ccall"+#endif+ data SState =      SState { stomv :: MVar (Maybe Stmt),              dbo :: Conn,@@ -318,7 +324,7 @@ foreign import ccall unsafe "hdbc-odbc-helper.h wrapobjodbc"   wrapstmt :: Ptr CStmt -> Ptr WrappedCConn -> IO (Ptr WrappedCStmt) -foreign import ccall unsafe "sql.h SQLDescribeCol"+foreign import #{CALLCONV} unsafe "sql.h SQLDescribeCol"   sqlDescribeCol :: Ptr CStmt                     -> #{type SQLSMALLINT} -- ^ Column number                  -> CString     -- ^ Column name@@ -330,7 +336,7 @@                  -> Ptr (#{type SQLSMALLINT}) -- ^ nullable ptr                  -> IO #{type SQLRETURN} -foreign import ccall unsafe "sql.h SQLGetData"+foreign import #{CALLCONV} unsafe "sql.h SQLGetData"   sqlGetData :: Ptr CStmt       -- ^ statement handle              -> #{type SQLUSMALLINT} -- ^ Column number              -> #{type SQLSMALLINT} -- ^ target type@@ -345,25 +351,25 @@ foreign import ccall unsafe "hdbc-odbc-helper.h &sqlFreeHandleSth_finalizer"   sqlFreeHandleSth_ptr :: FunPtr (Ptr WrappedCStmt -> IO ()) -foreign import ccall unsafe "sql.h SQLPrepare"+foreign import #{CALLCONV} unsafe "sql.h SQLPrepare"   sqlPrepare :: Ptr CStmt -> CString -> #{type SQLINTEGER}               -> IO #{type SQLRETURN} -foreign import ccall unsafe "sql.h SQLExecute"+foreign import #{CALLCONV} unsafe "sql.h SQLExecute"   sqlExecute :: Ptr CStmt -> IO #{type SQLRETURN} -foreign import ccall unsafe "sql.h SQLAllocHandle"+foreign import #{CALLCONV} unsafe "sql.h SQLAllocHandle"   sqlAllocStmtHandle :: #{type SQLSMALLINT} -> Ptr CConn ->                         Ptr (Ptr CStmt) -> IO #{type SQLRETURN} -foreign import ccall unsafe "sql.h SQLNumResultCols"+foreign import #{CALLCONV} unsafe "sql.h SQLNumResultCols"   sqlNumResultCols :: Ptr CStmt -> Ptr #{type SQLSMALLINT}                     -> IO #{type SQLRETURN} -foreign import ccall unsafe "sql.h SQLRowCount"+foreign import #{CALLCONV} unsafe "sql.h SQLRowCount"   sqlRowCount :: Ptr CStmt -> Ptr #{type SQLINTEGER} -> IO #{type SQLRETURN} -foreign import ccall unsafe "sql.h SQLBindParameter"+foreign import #{CALLCONV} unsafe "sql.h SQLBindParameter"   sqlBindParameter :: Ptr CStmt -- ^ Statement handle                    -> #{type SQLUSMALLINT} -- ^ Parameter Number                    -> #{type SQLSMALLINT} -- ^ Input or output@@ -379,7 +385,7 @@ foreign import ccall unsafe "hdbc-odbc-helper.h &nullData"   nullData :: Ptr #{type SQLINTEGER} -foreign import ccall unsafe "sql.h SQLDescribeParam"+foreign import #{CALLCONV} unsafe "sql.h SQLDescribeParam"   sqlDescribeParam :: Ptr CStmt                     -> #{type SQLUSMALLINT} -- ^ parameter number                    -> Ptr #{type SQLSMALLINT} -- ^ data type ptr@@ -388,7 +394,7 @@                    -> Ptr #{type SQLSMALLINT} -- ^ nullable ptr                    -> IO #{type SQLRETURN} -foreign import ccall unsafe "sql.h SQLFetch"+foreign import #{CALLCONV} unsafe "sql.h SQLFetch"   sqlFetch :: Ptr CStmt -> IO #{type SQLRETURN}  foreign import ccall unsafe "hdbc-odbc-helper.h simpleSqlTables"
Database/HDBC/ODBC/Utils.hsc view
@@ -35,6 +35,12 @@ #endif #include "hdbc-odbc-helper.h" +#ifdef mingw32_HOST_OS+#let CALLCONV = "stdcall"+#else+#let CALLCONV = "ccall"+#endif+ data SqlHandleT = EnvHandle (Ptr CEnv)                | DbcHandle (Ptr CConn)                | StmtHandle (Ptr CStmt)@@ -134,7 +140,7 @@ foreign import ccall unsafe "sqlSucceeded"   sqlSucceeded :: #{type SQLRETURN} -> CInt -foreign import ccall unsafe "sql.h SQLGetDiagRec"+foreign import #{CALLCONV} unsafe "sql.h SQLGetDiagRec"   sqlGetDiagRec :: #{type SQLSMALLINT} -> Ptr () ->                     #{type SQLSMALLINT} -> CString -> Ptr (#{type SQLINTEGER})                    -> CString -> #{type SQLSMALLINT} 
HDBC-odbc.cabal view
@@ -1,5 +1,5 @@ Name: HDBC-odbc-Version: 1.1.4.3+Version: 1.1.4.4 Cabal-Version: >=1.2 Build-type: Simple License: LGPL