MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:pharvey Date:October 9 2006 3:40pm
Subject:Connector/ODBC 5 commit: r584 - in trunk/SDK: C/Library C/include MYSQLPlus/Library
View as plain text  
Modified:
   trunk/SDK/C/Library/MYODBCC.cpp
   trunk/SDK/C/include/MYODBCC.h
   trunk/SDK/MYSQLPlus/Library/MStatement.cpp
Log:
ENH: improved logging

Modified: trunk/SDK/C/Library/MYODBCC.cpp
===================================================================
--- trunk/SDK/C/Library/MYODBCC.cpp	2006-10-09 09:28:52 UTC (rev 583)
+++ trunk/SDK/C/Library/MYODBCC.cpp	2006-10-09 15:40:33 UTC (rev 584)
@@ -1873,6 +1873,135 @@
     return "unknown";
 }
 
+QString MYODBCC::getAsyncEnableString( SQLUINTEGER nAsyncEnable )
+{
+    switch ( nAsyncEnable )
+    {
+        case SQL_ASYNC_ENABLE_OFF:
+            return "SQL_ASYNC_ENABLE_OFF";
+        case SQL_ASYNC_ENABLE_ON:
+            return "SQL_ASYNC_ENABLE_ON";
+    }
+
+    return "unknown";
+}
+
+QString MYODBCC::getConcurrencyString( SQLUINTEGER nConcurrency )
+{
+    switch ( nConcurrency )
+    {
+        case SQL_CONCUR_READ_ONLY:
+            return "SQL_CONCUR_READ_ONLY";
+        case SQL_CONCUR_LOCK:
+            return "SQL_CONCUR_LOCK";
+        case SQL_CONCUR_ROWVER:
+            return "SQL_CONCUR_ROWVER";
+        case SQL_CONCUR_VALUES:
+            return "SQL_CONCUR_VALUES";
+    }
+
+    return "unknown";
+}
+
+QString MYODBCC::getCursorScrollableString( SQLUINTEGER nCursorScrollable )
+{
+    switch ( nCursorScrollable )
+    {
+        case SQL_NONSCROLLABLE:
+            return "SQL_NONSCROLLABLE";
+        case SQL_SCROLLABLE:
+            return "SQL_SCROLLABLE";
+    }
+
+    return "unknown";
+}
+
+QString MYODBCC::getCursorSensitivityString( SQLUINTEGER nCursorSensitivity )
+{
+    switch ( nCursorSensitivity )
+    {
+        case SQL_UNSPECIFIED:
+            return "SQL_UNSPECIFIED";
+        case SQL_INSENSITIVE:
+            return "SQL_INSENSITIVE";
+        case SQL_SENSITIVE:
+            return "SQL_SENSITIVE";
+    }
+
+    return "unknown";
+}
+
+QString MYODBCC::getCursorTypeString( SQLUINTEGER nCursorType )
+{
+    switch ( nCursorType )
+    {
+        case SQL_CURSOR_FORWARD_ONLY:
+            return "SQL_CURSOR_FORWARD_ONLY";
+        case SQL_CURSOR_STATIC:
+            return "SQL_CURSOR_STATIC";
+        case SQL_CURSOR_KEYSET_DRIVEN:
+            return "SQL_CURSOR_KEYSET_DRIVEN";
+        case SQL_CURSOR_DYNAMIC:
+            return "SQL_CURSOR_DYNAMIC";
+    }
+
+    return "unknown";
+}
+
+QString MYODBCC::getNoscanString( SQLUINTEGER nNoscan )
+{
+    switch ( nNoscan )
+    {
+        case SQL_NOSCAN_OFF:
+            return "SQL_NOSCAN_OFF";
+        case SQL_NOSCAN_ON:
+            return "SQL_NOSCAN_ON";
+    }
+
+    return "unknown";
+}
+
+QString MYODBCC::getRetrieveDataString( SQLUINTEGER nRetrieveData )
+{
+    switch ( nRetrieveData )
+    {
+        case SQL_RD_ON:
+            return "SQL_RD_ON";
+        case SQL_RD_OFF:
+            return "SQL_RD_OFF";
+    }
+
+    return "unknown";
+}
+
+QString MYODBCC::getSimulateCursorString( SQLUINTEGER nSimulateCursor )
+{
+    switch ( nSimulateCursor )
+    {
+        case SQL_SC_NON_UNIQUE:
+            return "SQL_SC_NON_UNIQUE";
+        case SQL_SC_TRY_UNIQUE:
+            return "SQL_SC_TRY_UNIQUE";
+        case SQL_SC_UNIQUE:
+            return "SQL_SC_UNIQUE";
+    }
+
+    return "unknown";
+}
+
+QString MYODBCC::getUseBookmarksString( SQLUINTEGER nUseBookmarks )
+{
+    switch ( nUseBookmarks )
+    {
+        case SQL_UB_OFF:
+            return "SQL_UB_OFF";
+        case SQL_UB_VARIABLE:
+            return "SQL_UB_VARIABLE";
+    }
+
+    return "unknown";
+}
+
 /* this is a temp solution to the sudden realization that findChildren() returns all
objects - probably because we do not use Q_OBJECT */
 QList<QObject*> MYODBCC::getChildren( const QObject *pObject, const QString
&stringObjectName, bool bStartsWith )
 {

Modified: trunk/SDK/C/include/MYODBCC.h
===================================================================
--- trunk/SDK/C/include/MYODBCC.h	2006-10-09 09:28:52 UTC (rev 583)
+++ trunk/SDK/C/include/MYODBCC.h	2006-10-09 15:40:33 UTC (rev 584)
@@ -529,8 +529,18 @@
     static QString getInstallerErrorString( RETCODE nRetCode );
     /*@}*/
 
+    static QString getAsyncEnableString( SQLUINTEGER nAsyncEnable );
+    static QString getConcurrencyString( SQLUINTEGER nConcurrency );
+    static QString getCursorScrollableString( SQLUINTEGER nCursorScrollable );
+    static QString getCursorSensitivityString( SQLUINTEGER nCursorSensitivity );
+    static QString getCursorTypeString( SQLUINTEGER nCursorType );
+    static QString getNoscanString( SQLUINTEGER nNoscan );
+    static QString getRetrieveDataString( SQLUINTEGER nRetrieveData );
+    static QString getSimulateCursorString( SQLUINTEGER nSimulateCursor );
+    static QString getUseBookmarksString( SQLUINTEGER nUseBookmarks );
+
     static QList<QObject*> getChildren( const QObject *pObject, const QString
&stringObjectName, bool bStartsWith = false );
-
+    
     static void *  doMemCpy( void *pDest, const void *pSrc, size_t nBytes );    
     static BOOLEAN doStringCopyOut( SQLCHAR *pszDest, SQLINTEGER nDestMaxChars, SQLCHAR
*pszSrc );
     static BOOLEAN doStringCopyOut( SQLWCHAR *pszDest, SQLINTEGER nDestMaxChars, SQLWCHAR
*pszSrc, SQLINTEGER *pnSrcLenChars = NULL );

Modified: trunk/SDK/MYSQLPlus/Library/MStatement.cpp
===================================================================
--- trunk/SDK/MYSQLPlus/Library/MStatement.cpp	2006-10-09 09:28:52 UTC (rev 583)
+++ trunk/SDK/MYSQLPlus/Library/MStatement.cpp	2006-10-09 15:40:33 UTC (rev 584)
@@ -1187,7 +1187,7 @@
     MYODBCDbgEnter();
 
 #if MYODBC_DBG > 1
-    MYODBCDbgInfo( QString( "nColumnNumber=%1" ).arg( nFieldIdentifier ) );
+    MYODBCDbgInfo( QString( "nColumnNumber=%1" ).arg( nColumnNumber ) );
 #endif
 
     SQLRETURN   nReturn;
@@ -5588,6 +5588,9 @@
 {
     MYODBCDbgEnter();
 
+#if MYODBC_DBG > 1
+    MYODBCDbgInfo( QString( "nAsyncEnable=%1=%2" ).arg( nAsyncEnable ).arg(
MYODBCC::getAsyncEnableString( nAsyncEnable ) ) );
+#endif
     switch ( nAsyncEnable )
     {
         case SQL_ASYNC_ENABLE_OFF:
@@ -5609,6 +5612,9 @@
 {
     MYODBCDbgEnter();
 
+#if MYODBC_DBG > 1
+    MYODBCDbgInfo( QString( "nConcurrency=%1=%2" ).arg( nConcurrency ).arg(
MYODBCC::getConcurrencyString( nConcurrency ) ) );
+#endif
     /*!
         \internal ODBC RULE
 
@@ -5675,6 +5681,9 @@
 {
     MYODBCDbgEnter();
 
+#if MYODBC_DBG > 1
+    MYODBCDbgInfo( QString( "nCursorScrollable=%1=%2" ).arg( nCursorScrollable ).arg(
MYODBCC::getCursorScrollableString( nCursorScrollable ) ) );
+#endif
     switch ( nCursorScrollable )
     {
         case SQL_NONSCROLLABLE:
@@ -5718,6 +5727,9 @@
 {
     MYODBCDbgEnter();
 
+#if MYODBC_DBG > 1
+    MYODBCDbgInfo( QString( "nCursorSensitivity=%1=%2" ).arg( nCursorSensitivity ).arg(
MYODBCC::getCursorSensitivityString( nCursorSensitivity ) ) );
+#endif
     switch ( nCursorSensitivity )
     {
         case SQL_UNSPECIFIED:
@@ -5773,6 +5785,9 @@
 {
     MYODBCDbgEnter();
 
+#if MYODBC_DBG > 1
+    MYODBCDbgInfo( QString( "nCursorType=%1=%2" ).arg( nCursorType ).arg(
MYODBCC::getCursorTypeString( nCursorType ) ) );
+#endif
     /*!
         \internal ODBC RULE
 
@@ -5925,6 +5940,9 @@
 {
     MYODBCDbgEnter();
 
+#if MYODBC_DBG > 1
+    MYODBCDbgInfo( QString( "nNoscan=%1=%2" ).arg( nNoscan ).arg(
MYODBCC::getNoscanString( nNoscan ) ) );
+#endif
     switch ( nNoscan )
     {
         case SQL_NOSCAN_OFF:
@@ -5998,6 +6016,9 @@
 {
     MYODBCDbgEnter();
 
+#if MYODBC_DBG > 1
+    MYODBCDbgInfo( QString( "nRetrieveData=%1=%2" ).arg( nRetrieveData ).arg(
MYODBCC::getRetrieveDataString( nRetrieveData ) ) );
+#endif
     switch ( nRetrieveData )
     {
         case SQL_RD_ON:
@@ -6058,6 +6079,9 @@
 {
     MYODBCDbgEnter();
 
+#if MYODBC_DBG > 1
+    MYODBCDbgInfo( QString( "nSimulateCursor=%1=%2" ).arg( nSimulateCursor ).arg(
MYODBCC::getSimulateCursorString( nSimulateCursor ) ) );
+#endif
     /*!
         \internal ODBC RULE
 
@@ -6095,6 +6119,9 @@
 {
     MYODBCDbgEnter();
 
+#if MYODBC_DBG > 1
+    MYODBCDbgInfo( QString( "nUseBookmarks=%1=%2" ).arg( nUseBookmarks ).arg(
MYODBCC::getUseBookmarksString( nUseBookmarks ) ) );
+#endif
     /*!
         \internal ODBC RULE
 

Thread
Connector/ODBC 5 commit: r584 - in trunk/SDK: C/Library C/include MYSQLPlus/Librarypharvey9 Oct