List:Commits« Previous MessageNext Message »
From:pharvey Date:June 25 2006 7:16am
Subject:Connector/ODBC 5 commit: r387 - trunk/MYSQLPlus/MYSQLPlusLib
View as plain text  
Modified:
   trunk/MYSQLPlus/MYSQLPlusLib/MEnvironment.cpp
Log:
added some doc

Modified: trunk/MYSQLPlus/MYSQLPlusLib/MEnvironment.cpp
===================================================================
--- trunk/MYSQLPlus/MYSQLPlusLib/MEnvironment.cpp	2006-06-25 05:54:54 UTC (rev 386)
+++ trunk/MYSQLPlus/MYSQLPlusLib/MEnvironment.cpp	2006-06-25 07:16:56 UTC (rev 387)
@@ -48,7 +48,16 @@
 
             Call this to set an MEnvironment attribute.
 
+            This call clears diagnostic information for MEnvironment before it does its 
+            thing.
+
     \param  nAttribute
+
+                - SQL_ATTR_CONNECTION_POOLING
+                - SQL_ATTR_CP_MATCH
+                - SQL_ATTR_ODBC_VERSION
+                - SQL_ATTR_OUTPUT_NTS
+
     \param  pValue
     \param  nStringLength
 
@@ -67,7 +76,7 @@
 
         We clear diagnostic each time an ODBC API call is made (with exceptions).
     */
-    pDiagnostic->doClear();
+    getDiagnostic()->doClear();
 
     /*!
         \internal ODBC RULE (DM)
@@ -151,6 +160,33 @@
     MYODBCDbgReturn( pDiagnostic->getDiagRec( nRecNumber, psSQLState, pnNativeError,
psMessageText, nBufferLength, pnTextLength ) );
 }
 
+/*!
+    \brief  Get an environment attribute.
+
+            Call this to get some insight into the state of the environment.
+
+            This call clears diagnostic information for MEnvironment before it does its 
+            thing.
+
+    \param  nAttribute
+
+            - SQL_ATTR_CONNECTION_POOLING
+            - SQL_ATTR_CP_MATCH
+            - SQL_ATTR_ODBC_VERSION
+            - SQL_ATTR_OUTPUT_NTS
+
+    \param  pValue
+    \param  nBufferLength
+    \param  pnStringLength
+
+    \return SQLRETURN
+
+    \retval SQL_SUCCESS             Request processed ok.
+    \retval SQL_SUCCESS_WITH_INFO   Request was probably processed ok - check diagnostic.
+    \retval SQL_ERROR               Request failed.
+
+    \sa     setEnvAttr
+*/
 SQLRETURN MEnvironment::getEnvAttr( SQLINTEGER nAttribute, SQLPOINTER pValue, SQLINTEGER
nBufferLength, SQLINTEGER *pnStringLength )
 {
     MYODBCDbgEnter();
@@ -160,7 +196,7 @@
 
         We clear diagnostic each time an ODBC API call is made (with exceptions).
     */
-    pDiagnostic->doClear();
+    getDiagnostic()->doClear();
 
     /* do it  */
     switch ( nAttribute )
@@ -188,6 +224,20 @@
     MYODBCDbgReturn( SQL_SUCCESS );
 }
 
+/*!
+    \brief  Get a list of all (if any) error messages.
+
+            This is useful when you want to simply report the text message.
+
+            Diagnostic information is cleared out at the start of majour calls.
+
+            Each item in the list is derived from the SQL_DIAG_MESSAGE_TEXT field of the
diagnostic record.
+
+    \return QStringList
+
+    \sa     getDiagRec
+            getDiagField
+*/
 QStringList MEnvironment::getDiagnostics()
 {
     MYODBCDbgEnter();
@@ -201,6 +251,9 @@
             Requests a commit or rollback operation for all active
             operations on all statements associated with a connection.
 
+            This call clears diagnostic information for MEnvironment before it does its 
+            thing.
+
     \param  nHandleType
     \param  hHandle
     \param  nCompletionType
@@ -225,7 +278,7 @@
 
         We clear diagnostic each time an ODBC API call is made (with exceptions).
     */
-    pDiagnostic->doClear();
+    getDiagnostic()->doClear();
 
     /*!
         \todo The simple logic could be to call MYODBCDrvTransact
@@ -237,6 +290,27 @@
     MYODBCDbgReturn( SQL_SUCCESS );
 }
 
+/*!
+    \brief  Sets an environment attribute.
+
+            This attribute corresponds to the SQL_ATTR_CONNECTION_POOLING field.
+
+            This exists, in large part, so we can manage access to the underlying
variable.
+
+    \param  nConnectionPooling
+
+            - SQL_CP_OFF
+            - SQL_CP_ONE_PER_DRIVER
+            - SQL_CP_ONE_PER_HENV
+
+    \return SQLRETURN
+
+    \retval SQL_SUCCESS             Request processed ok.
+    \retval SQL_SUCCESS_WITH_INFO   Request was probably processed ok - check diagnostic.
+    \retval SQL_ERROR               Request failed.
+
+    \sa     setEnvAttr
+*/
 SQLRETURN MEnvironment::setConnectionPooling( SQLUINTEGER nConnectionPooling )
 {
     MYODBCDbgEnter();
@@ -269,6 +343,26 @@
     MYODBCDbgReturn( SQL_SUCCESS );
 }
 
+/*!
+    \brief  Sets an environment attribute.
+
+            This attribute corresponds to the SQL_ATTR_CP_MATCH field.
+
+            This exists, in large part, so we can manage access to the underlying
variable.
+
+    \param  nCPMatch
+
+            - SQL_CP_STRICT_MATCH
+            - SQL_CP_RELAXED_MATCH
+
+    \return SQLRETURN
+
+    \retval SQL_SUCCESS             Request processed ok.
+    \retval SQL_SUCCESS_WITH_INFO   Request was probably processed ok - check diagnostic.
+    \retval SQL_ERROR               Request failed.
+
+    \sa     setEnvAttr
+*/
 SQLRETURN MEnvironment::setCPMatch( SQLUINTEGER nCPMatch )
 {
     MYODBCDbgEnter();
@@ -292,6 +386,26 @@
     MYODBCDbgReturn( SQL_SUCCESS );
 }
 
+/*!
+    \brief  Sets an environment attribute.
+
+            This attribute corresponds to the SQL_ATTR_ODBC_VERSION field.
+
+            This exists, in large part, so we can manage access to the underlying
variable.
+
+    \param  nODBCVersion
+
+            - SQL_OV_ODBC3
+            - SQL_OV_ODBC2
+
+    \return SQLRETURN
+
+    \retval SQL_SUCCESS             Request processed ok.
+    \retval SQL_SUCCESS_WITH_INFO   Request was probably processed ok - check diagnostic.
+    \retval SQL_ERROR               Request failed.
+
+    \sa     setEnvAttr
+*/
 SQLRETURN MEnvironment::setODBCVersion( SQLINTEGER nODBCVersion )
 {
     MYODBCDbgEnter();
@@ -315,6 +429,26 @@
     MYODBCDbgReturn( SQL_SUCCESS );
 }
 
+/*!
+    \brief  Sets an environment attribute.
+
+            This attribute corresponds to the SQL_ATTR_OUTPUT_NTS field.
+
+            This exists, in large part, so we can manage access to the underlying
variable.
+
+    \param  bOutputNTS
+
+            - SQL_TRUE
+            - SQL_FALSE
+
+    \return SQLRETURN
+
+    \retval SQL_SUCCESS             Request processed ok.
+    \retval SQL_SUCCESS_WITH_INFO   Request was probably processed ok - check diagnostic.
+    \retval SQL_ERROR               Request failed.
+
+    \sa     setEnvAttr
+*/
 SQLRETURN MEnvironment::setOutputNTS( SQLINTEGER bOutputNTS )
 {
     MYODBCDbgEnter();
@@ -338,6 +472,17 @@
     MYODBCDbgReturn( SQL_SUCCESS );
 }
 
+/*!
+    \brief  Gets an environment attribute.
+
+            This attribute corresponds to the SQL_ATTR_CONNECTION_POOLING field.
+
+            This exists, in large part, so we can manage access to the underlying
variable.
+
+    \return SQLUINTEGER
+
+    \sa     getEnvAttr
+*/
 SQLUINTEGER MEnvironment::getConnectionPooling()
 {
     MYODBCDbgEnter();
@@ -345,6 +490,17 @@
     MYODBCDbgReturn3( "%d", nConnectionPooling );
 }
 
+/*!
+    \brief  Gets an environment attribute.
+
+            This attribute corresponds to the SQL_ATTR_CP_MATCH field.
+
+            This exists, in large part, so we can manage access to the underlying
variable.
+
+    \return SQLUINTEGER
+
+    \sa     getEnvAttr
+*/
 SQLUINTEGER MEnvironment::getCPMatch()
 {
     MYODBCDbgEnter();
@@ -352,6 +508,17 @@
     MYODBCDbgReturn3( "%d", nCPMatch );
 }
 
+/*!
+    \brief  Gets an environment attribute.
+
+            This attribute corresponds to the SQL_ATTR_ODBC_VERSION field.
+
+            This exists, in large part, so we can manage access to the underlying
variable.
+
+    \return SQLINTEGER
+
+    \sa     getEnvAttr
+*/
 SQLINTEGER MEnvironment::getODBCVersion()
 {
     MYODBCDbgEnter();
@@ -359,6 +526,17 @@
     MYODBCDbgReturn3( "%d", nODBCVersion );
 }
 
+/*!
+    \brief  Gets an environment attribute.
+
+            This attribute corresponds to the SQL_ATTR_OUTPUT_NTS field.
+
+            This exists, in large part, so we can manage access to the underlying
variable.
+
+    \return SQLINTEGER
+
+    \sa     getEnvAttr
+*/
 SQLINTEGER MEnvironment::getOutputNTS()
 {
     MYODBCDbgEnter();
@@ -366,6 +544,15 @@
     MYODBCDbgReturn3( "%d", bOutputNTS );
 }
 
+/*!
+    \brief  Gets the environment state.
+
+    \return MEnvironment::STATE
+
+    \retval STATE_E0 Unallocated environment.
+    \retval STATE_E1 Allocated environment, unallocated connection.
+    \retval STATE_E2 Allocated environment, allocated connection.
+*/
 MEnvironment::STATE MEnvironment::getState()
 {
     MYODBCDbgEnter();
@@ -376,6 +563,13 @@
     MYODBCDbgReturn3( "%d", STATE_E2 );
 }
 
+/*!
+    \brief  Gets the diagnostic for this environment.
+
+            This exists, in large part, so we can manage access to the underlying
variable.
+
+    \return MDiagnostic *
+*/
 MDiagnostic *MEnvironment::getDiagnostic()
 {
     MYODBCDbgEnter();

Thread
Connector/ODBC 5 commit: r387 - trunk/MYSQLPlus/MYSQLPlusLibpharvey25 Jun