Added:
MYSQLCC/MYSQLCCLib/MDescriptorIRD.cpp
MYSQLCC/MYSQLCCLib/MDescriptorIRD.h
MYSQLCC/MYSQLCCLib/MDescriptorRecordAPD.cpp
MYSQLCC/MYSQLCCLib/MDescriptorRecordARD.cpp
MYSQLCC/MYSQLCCLib/MDescriptorRecordIPD.cpp
MYSQLCC/MYSQLCCLib/MDescriptorRecordIRD.cpp
MYSQLCC/MYSQLCCLib/MDescriptorRecordIRD.h
MYSQLCC/MYSQLCCLib/MDiagnostic.h
Removed:
MYSQLCC/MYSQLCCLib/MDesIRD.cpp
MYSQLCC/MYSQLCCLib/MDesIRD.h
MYSQLCC/MYSQLCCLib/MDesRecAPD.cpp
MYSQLCC/MYSQLCCLib/MDesRecARD.cpp
MYSQLCC/MYSQLCCLib/MDesRecIPD.cpp
MYSQLCC/MYSQLCCLib/MDesRecIRD.cpp
MYSQLCC/MYSQLCCLib/MDesRecIRD.h
MYSQLCC/include/MDiagnostic.h
Log:
Deleted: MYSQLCC/MYSQLCCLib/MDesIRD.cpp
===================================================================
--- MYSQLCC/MYSQLCCLib/MDesIRD.cpp 2006-04-26 20:14:23 UTC (rev 128)
+++ MYSQLCC/MYSQLCCLib/MDesIRD.cpp 2006-04-26 20:17:48 UTC (rev 129)
@@ -1,96 +0,0 @@
-#include "MYODBCDesInternal.h"
-
-MYODBCDesIRD::MYODBCDesIRD( SQLHANDLE hOwner )
- : MYODBCDes( hOwner, SQL_DESC_ALLOC_AUTO )
-{
- doAppendBookmark();
-}
-
-SQLRETURN MYODBCDesIRD::setDescField( SQLSMALLINT nRecNumber, SQLSMALLINT
nFieldIdentifier, SQLPOINTER pValuePtr, SQLINTEGER nBufferLength )
-{
- MYODBCDbgEnter();
-
- /*!
- \internal ODBC Rule
-
- If an application calls SQLSetDescField to set any field other
- than SQL_DESC_COUNT or the deferred fields SQL_DESC_DATA_PTR,
- SQL_DESC_OCTET_LENGTH_PTR, or SQL_DESC_INDICATOR_PTR, the record
- becomes unbound.
- */
-
- /* the above rule is covered by the; doUnbind() calls */
-
- /* header field? */
- switch ( nFieldIdentifier )
- {
- case SQL_DESC_ALLOC_TYPE:
- /*!
- \internal ODBC Rule
-
- IRD: R
- */
- case SQL_DESC_ARRAY_SIZE:
- /*!
- \internal ODBC Rule
-
- IRD: Unused
- */
- MYODBCDbgReturn( getDia()->doAppend( MYODBC_DIA_HY091, 0, NULL ) );
-
- case SQL_DESC_ARRAY_STATUS_PTR:
- /*!
- \internal ODBC Rule
-
- IRD: R/W
- */
- MYODBCDbgReturn( setArrayStatusPtr( (SQLUSMALLINT*)pValuePtr ) );
-
- case SQL_DESC_BIND_OFFSET_PTR:
- /*!
- \internal ODBC Rule
-
- IRD: Unused
- */
- case SQL_DESC_BIND_TYPE:
- /*!
- \internal ODBC Rule
-
- IRD: Unused
- */
- case SQL_DESC_COUNT:
- /*!
- \internal ODBC Rule
-
- IRD: R
- */
- MYODBCDbgReturn( getDia()->doAppend( MYODBC_DIA_HY091, 0, NULL ) );
-
- case SQL_DESC_ROWS_PROCESSED_PTR:
- /*!
- \internal ODBC Rule
-
- IRD: R/W
- */
- MYODBCDbgReturn( setRowsProcessedPtr( (SQLUINTEGER*)pValuePtr ) );
- } /* switch (for header fields) */
-
- /* record field needs a valid record */
- if ( nRecNumber < 0 || nRecNumber >= getCount() )
- MYODBCDbgReturn( getDia()->doAppend( MYODBC_DIA_07009, 0, NULL ) );
-
- /* handle as record field */
- MYODBCDbgReturn( vectorRecords[nRecNumber]->setDescField( nFieldIdentifier,
pValuePtr, nBufferLength ) );
-}
-
-MYODBCDesRec *MYODBCDesIRD::doAppend()
-{
- MYODBCDbgEnter();
-
- MYODBCDesRecIRD *p = new MYODBCDesRecIRD( this );
- vectorRecords.append( p );
-
- MYODBCDbgReturn3( "%p", p );
-}
-
-
Deleted: MYSQLCC/MYSQLCCLib/MDesIRD.h
===================================================================
--- MYSQLCC/MYSQLCCLib/MDesIRD.h 2006-04-26 20:14:23 UTC (rev 128)
+++ MYSQLCC/MYSQLCCLib/MDesIRD.h 2006-04-26 20:17:48 UTC (rev 129)
@@ -1,32 +0,0 @@
-/*! \file MDesIRD.h
- \author Peter Harvey <pharvey@stripped>
- \brief This code is used to support Descriptors (IPD, IRD, IRD, ARD).
-
- This is the Application row descriptor (ARD) class.
-*/
-#ifndef M_DES_IRD_H
-#define M_DES_IRD_H
-
-#include "MInternal.h"
-
-/*!
- \brief
- \sa
-*/
-class MDesIRD : public MDescriptor
-{
- friend class MDesRecIRD;
-public:
- MDesAPD( MStatement *pStatement );
-
- /* setters */
- SQLRETURN setDescField( SQLSMALLINT nRecNumber, SQLSMALLINT nFieldIdentifier,
SQLPOINTER pValuePtr, SQLINTEGER nBufferLength );
-
- /* getters */
-
- /* do'ers */
-};
-
-#endif
-
-
Deleted: MYSQLCC/MYSQLCCLib/MDesRecAPD.cpp
===================================================================
--- MYSQLCC/MYSQLCCLib/MDesRecAPD.cpp 2006-04-26 20:14:23 UTC (rev 128)
+++ MYSQLCC/MYSQLCCLib/MDesRecAPD.cpp 2006-04-26 20:17:48 UTC (rev 129)
@@ -1,434 +0,0 @@
-#include "MYODBCDesInternal.h"
-
-/*!
- \brief zzzzz
-
- zzzzz
-
- \param zzzzz
-
- \return zzzzz
-
- \sa zzzzz
-*/
-MYODBCDesRecAPD::MYODBCDesRecAPD( MYODBCDesAPD *pdes )
- : MYODBCDesRec( pdes )
-{
- MYODBCDbgEnter();
-
- Q_ASSERT( !pdes );
-
- MYODBCDbgReturn2();
-}
-
-SQLRETURN MYODBCDesRecAPD::setDescField( SQLSMALLINT nFieldIdentifier, SQLPOINTER
pValuePtr, SQLINTEGER /* nBufferLength */ )
-{
- MYODBCDbgEnter();
-
- SQLRETURN nReturn = SQL_SUCCESS;
-
- /*! \internal ODBC Rule
-
- If an application calls SQLSetDescField to set any field other than
SQL_DESC_COUNT or the
- deferred fields SQL_DESC_DATA_PTR, SQL_DESC_OCTET_LENGTH_PTR, or
SQL_DESC_INDICATOR_PTR,
- the record becomes unbound.
- */
- if ( nFieldIdentifier != SQL_DESC_DATA_PTR &&
- nFieldIdentifier != SQL_DESC_OCTET_LENGTH_PTR &&
- nFieldIdentifier != SQL_DESC_INDICATOR_PTR )
- {
- doUnbind();
- }
-
- switch ( nFieldIdentifier )
- {
- case SQL_DESC_AUTO_UNIQUE_VALUE:
- /*!
- \internal ODBC Rule
-
- APD: Unused
- */
- case SQL_DESC_BASE_COLUMN_NAME:
- /*!
- \internal ODBC Rule
-
- APD: Unused
- */
- case SQL_DESC_BASE_TABLE_NAME:
- /*!
- \internal ODBC Rule
-
- APD: Unused
- */
- case SQL_DESC_CASE_SENSITIVE:
- /*!
- \internal ODBC Rule
-
- APD: Unused
- */
- case SQL_DESC_CATALOG_NAME:
- /*!
- \internal ODBC Rule
-
- APD: Unused
- */
- nReturn = getDes()->getDia()->doAppend( MYODBC_DIA_HY091, 0, NULL );
- break;
-
- case SQL_DESC_CONCISE_TYPE:
- /*!
- \internal ODBC Rule
-
- APD: R/W
- */
- nReturn = setConciseTypeC( (SQLSMALLINT)pValuePtr );
- break;
-
- case SQL_DESC_DATA_PTR:
- /*!
- \internal ODBC Rule
-
- APD: R/W
- */
- {
- bool bHasInfo = false;
- SQLRETURN nReturn = setDataPtr( pValuePtr );
-
- if ( nReturn == SQL_SUCCESS_WITH_INFO )
- bHasInfo = true;
- if ( !SQL_SUCCEEDED( nReturn ) )
- MYODBCDbgReturn( nReturn );
-
- /*!
- \internal ODBC Rule
-
- The SQL_DESC_DATA_PTR field in the IPD can be set to force a
- consistency check. In a subsequent call to SQLGetDescField or
- SQLGetDescRec, the driver is not required to return the value
- that SQL_DESC_DATA_PTR was set to.
-
- Whenever the SQL_DESC_DATA_PTR field of an APD, ARD, or IPD is set,
- the driver checks that the value in the SQL_DESC_TYPE field contains
- one of the valid ODBC C data types or a driver-specific data type,
- and that all other fields affecting the data types are consistent.
- */
- nReturn = doConsistencyCheck();
- if ( nReturn == SQL_SUCCESS_WITH_INFO )
- bHasInfo = true;
- if ( !SQL_SUCCEEDED( nReturn ) )
- MYODBCDbgReturn( nReturn );
-
- if ( bHasInfo )
- MYODBCDbgReturn( SQL_SUCCESS_WITH_INFO );
- }
- break;
-
- case SQL_DESC_DATETIME_INTERVAL_CODE:
- /*!
- \internal ODBC Rule
-
- APD: R/W
- */
- nReturn = setIntervalCode( (SQLSMALLINT)pValuePtr );
- break;
-
- case SQL_DESC_DATETIME_INTERVAL_PRECISION:
- /*!
- \internal ODBC Rule
-
- APD: R/W
- */
-
- /*!
- \internal ODBC Rule
-
- The number of digits for an exact numeric type, the number
- of bits in the mantissa (binary precision) for an approximate
- numeric type, or the numbers of digits in the fractional
- seconds component for the SQL_TYPE_TIME, SQL_TYPE_TIMESTAMP,
- or SQL_INTERVAL_SECOND data type. This field is undefined for
- all other data types.
- */
- nReturn = setDatetimeIntervalPrecision( (SQLSMALLINT)pValuePtr );
- break;
-
- case SQL_DESC_DISPLAY_SIZE:
- /*!
- \internal ODBC Rule
-
- APD: Unused
- */
- case SQL_DESC_FIXED_PREC_SCALE:
- /*!
- \internal ODBC Rule
-
- APD: Unused
- */
- nReturn = getDes()->getDia()->doAppend( MYODBC_DIA_HY091, 0, NULL );
- break;
-
- case SQL_DESC_INDICATOR_PTR:
- /*!
- \internal ODBC Rule
-
- APD: R/W
- */
- nReturn = setIndicatorPtr( (SQLINTEGER*)pValuePtr );
- break;
-
- case SQL_DESC_LABEL:
- /*!
- \internal ODBC Rule
-
- APD: Unused
- */
- nReturn = getDes()->getDia()->doAppend( MYODBC_DIA_HY091, 0, NULL );
- break;
-
- case SQL_DESC_LENGTH:
- /*!
- \internal ODBC Rule
-
- APD: R/W
- */
- nReturn = setLength( (SQLUINTEGER)pValuePtr );
- break;
-
- case SQL_DESC_LITERAL_PREFIX:
- /*!
- \internal ODBC Rule
-
- APD: Unused
- */
- case SQL_DESC_LITERAL_SUFFIX:
- /*!
- \internal ODBC Rule
-
- APD: Unused
- */
- case SQL_DESC_LOCAL_TYPE_NAME:
- /*!
- \internal ODBC Rule
-
- APD: Unused
- */
- case SQL_DESC_NAME:
- /*!
- \internal ODBC Rule
-
- APD: Unused
- */
- case SQL_DESC_NULLABLE:
- /*!
- \internal ODBC Rule
-
- APD: Unused
- */
- nReturn = getDes()->getDia()->doAppend( MYODBC_DIA_HY091, 0, NULL );
- break;
-
- case SQL_DESC_NUM_PREC_RADIX:
- /*!
- \internal ODBC Rule
-
- APD: R/W
- */
-
- /*!
- \internal ODBC Rule
-
- This SQLINTEGER field contains a value of 2 if the data type in
- the SQL_DESC_TYPE field is an approximate numeric data type,
- because the SQL_DESC_PRECISION field contains the number of bits.
- This field contains a value of 10 if the data type in the
- SQL_DESC_TYPE field is an exact numeric data type, because the
- SQL_DESC_PRECISION field contains the number of decimal digits.
- This field is set to 0 for all non-numeric data types.
- */
- {
- SQLINTEGER n = (SQLINTEGER)pValuePtr;
-
- if ( n != 0 && n != 2 && n != 10 )
- nReturn = getDes()->getDia()->doAppend( MYODBC_DIA_HY092, 0,
NULL );
- else
- nReturn = setNumPrecRadix( (SQLINTEGER)pValuePtr );
- }
- break;
-
- case SQL_DESC_OCTET_LENGTH:
- /*!
- \internal ODBC Rule
-
- APD: R/W
- */
-
- /*!
- \internal ODBC Rule
-
- For APDs, this field is defined only for output or input/output
- parameters.
- */
- nReturn = setOctetLength( (SQLINTEGER)pValuePtr );
- break;
-
- case SQL_DESC_OCTET_LENGTH_PTR:
- /*!
- \internal ODBC Rule
-
- APD: R/W
- */
-
- /*!
- \internal ODBC Rule
-
- For an APD, this value is ignored for all arguments except
- character string and binary; if this field points to SQL_NTS,
- the dynamic argument must be null-terminated. To indicate that
- a bound parameter will be a data-at-execution parameter, an
- application sets this field in the appropriate pDesRec of the APD
- to a variable that, at execute time, will contain the value
- SQL_DATA_AT_EXEC or the result of the SQL_LEN_DATA_AT_EXEC macro.
- If there is more than one such field, SQL_DESC_DATA_PTR can be
- set to a value uniquely identifying the parameter to help the
- application determine which parameter is being requested.
- */
- nReturn = setOctetLengthPtr( (SQLINTEGER*)pValuePtr );
- break;
-
- case SQL_DESC_PARAMETER_TYPE:
- /*!
- \internal ODBC Rule
-
- APD: Unused
- */
- nReturn = getDes()->getDia()->doAppend( MYODBC_DIA_HY091, 0, NULL );
- break;
-
- case SQL_DESC_PRECISION:
- /*!
- \internal ODBC Rule
-
- APD: R/W
- */
-
- /*!
- \internal ODBC Rule
-
- This SQLSMALLINT pDesRec field contains the number of digits
- for an exact numeric type, the number of bits in the mantissa
- (binary precision) for an approximate numeric type, or the numbers
- of digits in the fractional seconds component for the SQL_TYPE_TIME,
- SQL_TYPE_TIMESTAMP, or SQL_INTERVAL_SECOND data type. This field
- is undefined for all other data types.
- */
- nReturn = setPrecision( (SQLSMALLINT)pValuePtr );
- break;
-
- case SQL_DESC_ROWVER:
- /*!
- \internal ODBC Rule
-
- APD: Unused
- */
- nReturn = getDes()->getDia()->doAppend( MYODBC_DIA_HY091, 0, NULL );
- break;
-
- case SQL_DESC_SCALE:
- /*!
- \internal ODBC Rule
-
- APD: R/W
- */
-
- /*!
- \internal ODBC Rule
-
- This SQLSMALLINT pDesRec field contains the defined scale for
- decimal and numeric data types. The field is undefined for all
- other data types.
- */
- nReturn = setScale( (SQLSMALLINT)pValuePtr );
- break;
-
- case SQL_DESC_SCHEMA_NAME:
- /*!
- \internal ODBC Rule
-
- APD: Unused
- */
- case SQL_DESC_SEARCHABLE:
- /*!
- \internal ODBC Rule
-
- APD: Unused
- */
- case SQL_DESC_TABLE_NAME:
- /*!
- \internal ODBC Rule
-
- APD: Unused
- */
- nReturn = getDes()->getDia()->doAppend( MYODBC_DIA_HY091, 0, NULL );
- break;
-
- case SQL_DESC_TYPE:
- /*!
- \internal ODBC Rule
-
- APD: R/W
- */
- nReturn = setTypeC( (SQLSMALLINT)pValuePtr );
- break;
-
- case SQL_DESC_TYPE_NAME:
- /*!
- \internal ODBC Rule
-
- APD: Unused
- */
- case SQL_DESC_UNNAMED:
- /*!
- \internal ODBC Rule
-
- APD: Unused
- */
- case SQL_DESC_UNSIGNED:
- /*!
- \internal ODBC Rule
-
- APD: Unused
- */
- case SQL_DESC_UPDATABLE:
- /*!
- \internal ODBC Rule
-
- APD: Unused
- */
- nReturn = getDes()->getDia()->doAppend( MYODBC_DIA_HY091, 0, NULL );
- break;
-
- default:
- nReturn = getDes()->getDia()->doAppend( MYODBC_DIA_HY091, 0, NULL );
- break;
- }
-
- MYODBCDbgReturn( nReturn );
-}
-
-SQLRETURN MYODBCDesRecAPD::setConciseType( SQLSMALLINT nConciseType )
-{
- MYODBCDbgEnter();
-
- SQLRETURN nReturn = setConciseTypeC( nConciseType );
-
- MYODBCDbgReturn( nReturn );
-}
-
-SQLRETURN MYODBCDesRecAPD::setDefault( SQLSMALLINT nConciseType )
-{
- MYODBCDbgEnter();
-
- MYODBCDbgReturn( setDefaultC( nConciseType ) );
-}
-
-
Deleted: MYSQLCC/MYSQLCCLib/MDesRecARD.cpp
===================================================================
--- MYSQLCC/MYSQLCCLib/MDesRecARD.cpp 2006-04-26 20:14:23 UTC (rev 128)
+++ MYSQLCC/MYSQLCCLib/MDesRecARD.cpp 2006-04-26 20:17:48 UTC (rev 129)
@@ -1,418 +0,0 @@
-#include "MYODBCDesInternal.h"
-
-/*!
- \brief zzzzz
-
- zzzzz
-
- \param zzzzz
-
- \return zzzzz
-
- \sa zzzzz
-*/
-MYODBCDesRecARD::MYODBCDesRecARD( MYODBCDesARD *pdes )
- : MYODBCDesRec( pdes )
-{
- MYODBCDbgEnter();
-
- Q_ASSERT( !pdes );
-
- nType = SQL_C_DEFAULT;
-
- MYODBCDbgReturn2();
-}
-
-SQLRETURN MYODBCDesRecARD::setDescField( SQLSMALLINT nFieldIdentifier, SQLPOINTER
pValuePtr, SQLINTEGER /* nBufferLength */ )
-{
- MYODBCDbgEnter();
-
- SQLRETURN nReturn = SQL_SUCCESS;
-
- /*! \internal ODBC Rule
-
- If an application calls SQLSetDescField to set any field other than
SQL_DESC_COUNT or the
- deferred fields SQL_DESC_DATA_PTR, SQL_DESC_OCTET_LENGTH_PTR, or
SQL_DESC_INDICATOR_PTR,
- the record becomes unbound.
- */
- if ( nFieldIdentifier != SQL_DESC_DATA_PTR &&
- nFieldIdentifier != SQL_DESC_OCTET_LENGTH_PTR &&
- nFieldIdentifier != SQL_DESC_INDICATOR_PTR )
- {
- doUnbind();
- }
-
- switch ( nFieldIdentifier )
- {
- case SQL_DESC_AUTO_UNIQUE_VALUE:
- /*!
- \internal ODBC Rule
-
- ARD: Unused
- */
- case SQL_DESC_BASE_COLUMN_NAME:
- /*!
- \internal ODBC Rule
-
- ARD: Unused
- */
- case SQL_DESC_BASE_TABLE_NAME:
- /*!
- \internal ODBC Rule
-
- ARD: Unused
- */
- case SQL_DESC_CASE_SENSITIVE:
- /*!
- \internal ODBC Rule
-
- ARD: Unused
- */
- case SQL_DESC_CATALOG_NAME:
- /*!
- \internal ODBC Rule
-
- ARD: Unused
- */
- nReturn = getDes()->getDia()->doAppend( MYODBC_DIA_HY091, 0, NULL );
- break;
-
- case SQL_DESC_CONCISE_TYPE:
- /*!
- \internal ODBC Rule
-
- ARD: R/W
- */
- nReturn = setConciseTypeC( (SQLSMALLINT)pValuePtr );
- break;
-
- case SQL_DESC_DATA_PTR:
- /*!
- \internal ODBC Rule
-
- ARD: R/W
- */
- {
- bool bHasInfo = false;
- SQLRETURN nReturn = setDataPtr( pValuePtr );
-
- if ( nReturn == SQL_SUCCESS_WITH_INFO )
- bHasInfo = true;
- if ( !SQL_SUCCEEDED( nReturn ) )
- MYODBCDbgReturn( nReturn );
-
- /*!
- \internal ODBC Rule
-
- The SQL_DESC_DATA_PTR field in the IPD can be set to force a
- consistency check. In a subsequent call to SQLGetDescField or
- SQLGetDescRec, the driver is not required to return the value
- that SQL_DESC_DATA_PTR was set to.
-
- Whenever the SQL_DESC_DATA_PTR field of an ARD, APD, or IPD is set,
- the driver checks that the value in the SQL_DESC_TYPE field contains
- one of the valid ODBC C data types or a driver-specific data type,
- and that all other fields affecting the data types are consistent.
- */
- nReturn = doConsistencyCheck();
- if ( nReturn == SQL_SUCCESS_WITH_INFO )
- bHasInfo = true;
- if ( !SQL_SUCCEEDED( nReturn ) )
- MYODBCDbgReturn( nReturn );
-
- if ( bHasInfo )
- MYODBCDbgReturn( SQL_SUCCESS_WITH_INFO );
- }
- break;
-
- case SQL_DESC_DATETIME_INTERVAL_CODE:
- /*!
- \internal ODBC Rule
-
- ARD: R/W
- */
- nReturn = setIntervalCode( (SQLSMALLINT)pValuePtr );
- break;
-
- case SQL_DESC_DATETIME_INTERVAL_PRECISION:
- /*!
- \internal ODBC Rule
-
- ARD: R/W
- */
-
- /*!
- \internal ODBC Rule
-
- The number of digits for an exact numeric type, the number
- of bits in the mantissa (binary precision) for an approximate
- numeric type, or the numbers of digits in the fractional
- seconds component for the SQL_TYPE_TIME, SQL_TYPE_TIMESTAMP,
- or SQL_INTERVAL_SECOND data type. This field is undefined for
- all other data types.
- */
- nReturn = setDatetimeIntervalPrecision( (SQLSMALLINT)pValuePtr );
- break;
-
- case SQL_DESC_DISPLAY_SIZE:
- /*!
- \internal ODBC Rule
-
- ARD: Unused
- */
- case SQL_DESC_FIXED_PREC_SCALE:
- /*!
- \internal ODBC Rule
-
- ARD: Unused
- */
- nReturn = getDes()->getDia()->doAppend( MYODBC_DIA_HY091, 0, NULL );
- break;
-
- case SQL_DESC_INDICATOR_PTR:
- /*!
- \internal ODBC Rule
-
- ARD: R/W
- */
- nReturn = setIndicatorPtr( (SQLINTEGER*)pValuePtr );
- break;
-
- case SQL_DESC_LABEL:
- /*!
- \internal ODBC Rule
-
- ARD: Unused
- */
- nReturn = getDes()->getDia()->doAppend( MYODBC_DIA_HY091, 0, NULL );
- break;
-
- case SQL_DESC_LENGTH:
- /*!
- \internal ODBC Rule
-
- ARD: R/W
- */
- nReturn = setLength( (SQLUINTEGER)pValuePtr );
-
- case SQL_DESC_LITERAL_PREFIX:
- /*!
- \internal ODBC Rule
-
- ARD: Unused
- */
- case SQL_DESC_LITERAL_SUFFIX:
- /*!
- \internal ODBC Rule
-
- ARD: Unused
- */
- case SQL_DESC_LOCAL_TYPE_NAME:
- /*!
- \internal ODBC Rule
-
- ARD: Unused
- */
- case SQL_DESC_NAME:
- /*!
- \internal ODBC Rule
-
- ARD: Unused
- */
- case SQL_DESC_NULLABLE:
- /*!
- \internal ODBC Rule
-
- ARD: Unused
- */
- nReturn = getDes()->getDia()->doAppend( MYODBC_DIA_HY091, 0, NULL );
- break;
-
- case SQL_DESC_NUM_PREC_RADIX:
- /*!
- \internal ODBC Rule
-
- ARD: R/W
- */
-
- /*!
- \internal ODBC Rule
-
- This SQLINTEGER field contains a value of 2 if the data type in
- the SQL_DESC_TYPE field is an approximate numeric data type,
- because the SQL_DESC_PRECISION field contains the number of bits.
- This field contains a value of 10 if the data type in the
- SQL_DESC_TYPE field is an exact numeric data type, because the
- SQL_DESC_PRECISION field contains the number of decimal digits.
- This field is set to 0 for all non-numeric data types.
- */
- {
- SQLINTEGER n = (SQLINTEGER)pValuePtr;
-
- if ( n != 0 && n != 2 && n != 10 )
- nReturn = getDes()->getDia()->doAppend( MYODBC_DIA_HY092, 0,
NULL );
- else
- nReturn = setNumPrecRadix( (SQLINTEGER)pValuePtr );
- }
- break;
-
- case SQL_DESC_OCTET_LENGTH:
- /*!
- \internal ODBC Rule
-
- ARD: R/W
- */
-
- /*!
- \internal ODBC Rule
-
- For ARDs, this field is defined only for output or input/output
- parameters.
- */
- nReturn = setOctetLength( (SQLINTEGER)pValuePtr );
- break;
-
- case SQL_DESC_OCTET_LENGTH_PTR:
- /*!
- \internal ODBC Rule
-
- ARD: R/W
- */
- nReturn = setOctetLengthPtr( (SQLINTEGER*)pValuePtr );
- break;
-
- case SQL_DESC_PARAMETER_TYPE:
- /*!
- \internal ODBC Rule
-
- ARD: Unused
- */
- nReturn = getDes()->getDia()->doAppend( MYODBC_DIA_HY091, 0, NULL );
- break;
-
- case SQL_DESC_PRECISION:
- /*!
- \internal ODBC Rule
-
- ARD: R/W
- */
-
- /*!
- \internal ODBC Rule
-
- This SQLSMALLINT pDesRec field contains the number of digits
- for an exact numeric type, the number of bits in the mantissa
- (binary precision) for an approximate numeric type, or the numbers
- of digits in the fractional seconds component for the SQL_TYPE_TIME,
- SQL_TYPE_TIMESTAMP, or SQL_INTERVAL_SECOND data type. This field
- is undefined for all other data types.
- */
- nReturn = setPrecision( (SQLSMALLINT)pValuePtr );
- break;
-
- case SQL_DESC_ROWVER:
- /*!
- \internal ODBC Rule
-
- ARD: Unused
- */
- nReturn = getDes()->getDia()->doAppend( MYODBC_DIA_HY091, 0, NULL );
- break;
-
- case SQL_DESC_SCALE:
- /*!
- \internal ODBC Rule
-
- ARD: R/W
- */
-
- /*!
- \internal ODBC Rule
-
- This SQLSMALLINT pDesRec field contains the defined scale for
- decimal and numeric data types. The field is undefined for all
- other data types.
- */
- nReturn = setScale( (SQLSMALLINT)pValuePtr );
- break;
-
- case SQL_DESC_SCHEMA_NAME:
- /*!
- \internal ODBC Rule
-
- ARD: Unused
- */
- case SQL_DESC_SEARCHABLE:
- /*!
- \internal ODBC Rule
-
- ARD: Unused
- */
- case SQL_DESC_TABLE_NAME:
- /*!
- \internal ODBC Rule
-
- ARD: Unused
- */
- nReturn = getDes()->getDia()->doAppend( MYODBC_DIA_HY091, 0, NULL );
- break;
-
- case SQL_DESC_TYPE:
- /*!
- \internal ODBC Rule
-
- ARD: R/W
- */
- nReturn = setTypeC( (SQLSMALLINT)pValuePtr );
- break;
-
- case SQL_DESC_TYPE_NAME:
- /*!
- \internal ODBC Rule
-
- ARD: Unused
- */
- case SQL_DESC_UNNAMED:
- /*!
- \internal ODBC Rule
-
- ARD: Unused
- */
- case SQL_DESC_UNSIGNED:
- /*!
- \internal ODBC Rule
-
- ARD: Unused
- */
- case SQL_DESC_UPDATABLE:
- /*!
- \internal ODBC Rule
-
- ARD: Unused
- */
- nReturn = getDes()->getDia()->doAppend( MYODBC_DIA_HY091, 0, NULL );
- break;
-
- default:
- nReturn = getDes()->getDia()->doAppend( MYODBC_DIA_HY091, 0, NULL );
- break;
- }
-
- MYODBCDbgReturn( nReturn );
-}
-
-SQLRETURN MYODBCDesRecARD::setConciseType( SQLSMALLINT nConciseType )
-{
- MYODBCDbgEnter();
-
- MYODBCDbgReturn( setConciseTypeC( nConciseType ) );
-}
-
-SQLRETURN MYODBCDesRecARD::setDefault( SQLSMALLINT nConciseType )
-{
- MYODBCDbgEnter();
-
- MYODBCDbgReturn( setDefaultC( nConciseType ) );
-}
-
-
Deleted: MYSQLCC/MYSQLCCLib/MDesRecIPD.cpp
===================================================================
--- MYSQLCC/MYSQLCCLib/MDesRecIPD.cpp 2006-04-26 20:14:23 UTC (rev 128)
+++ MYSQLCC/MYSQLCCLib/MDesRecIPD.cpp 2006-04-26 20:17:48 UTC (rev 129)
@@ -1,394 +0,0 @@
-#include "MYODBCDesInternal.h"
-
-/*!
- \brief zzzzz
-
- zzzzz
-
- \param zzzzz
-
- \return zzzzz
-
- \sa zzzzz
-*/
-MYODBCDesRecIPD::MYODBCDesRecIPD( MYODBCDesIPD *pdes )
- : MYODBCDesRec( pdes )
-{
- MYODBCDbgEnter();
-
- Q_ASSERT( !pdes );
-
- MYODBCDbgReturn2();
-}
-
-SQLRETURN MYODBCDesRecIPD::setDescField( SQLSMALLINT nFieldIdentifier, SQLPOINTER
pValuePtr, SQLINTEGER /* nBufferLength */ )
-{
- MYODBCDbgEnter();
-
- /*! \internal ODBC Rule
-
- If an application calls SQLSetDescField to set any field other than
SQL_DESC_COUNT or the
- deferred fields SQL_DESC_DATA_PTR, SQL_DESC_OCTET_LENGTH_PTR, or
SQL_DESC_INDICATOR_PTR,
- the record becomes unbound.
- */
- if ( nFieldIdentifier != SQL_DESC_DATA_PTR &&
- nFieldIdentifier != SQL_DESC_OCTET_LENGTH_PTR &&
- nFieldIdentifier != SQL_DESC_INDICATOR_PTR )
- {
- doUnbind();
- }
-
- switch ( nFieldIdentifier )
- {
- case SQL_DESC_AUTO_UNIQUE_VALUE:
- /*!
- \internal ODBC Rule
-
- IPD: Unused
- */
- case SQL_DESC_BASE_COLUMN_NAME:
- /*!
- \internal ODBC Rule
-
- IPD: Unused
- */
- case SQL_DESC_BASE_TABLE_NAME:
- /*!
- \internal ODBC Rule
-
- IPD: Unused
- */
- case SQL_DESC_CASE_SENSITIVE:
- /*!
- \internal ODBC Rule
-
- IPD: Unused
- */
- case SQL_DESC_CATALOG_NAME:
- /*!
- \internal ODBC Rule
-
- IPD: Unused
- */
- MYODBCDbgReturn( getDes()->getDia()->doAppend( MYODBC_DIA_HY091, 0,
NULL ) );
-
- case SQL_DESC_CONCISE_TYPE:
- /*!
- \internal ODBC Rule
-
- IPD: R/W
- */
- MYODBCDbgReturn( setConciseTypeC( (SQLSMALLINT)pValuePtr ) );
-
- case SQL_DESC_DATA_PTR:
- /*!
- \internal ODBC Rule
-
- IPD: R/W
- */
- {
- bool bHasInfo = false;
- SQLRETURN nReturn = setDataPtr( pValuePtr );
-
- if ( nReturn == SQL_SUCCESS_WITH_INFO )
- bHasInfo = true;
- if ( !SQL_SUCCEEDED( nReturn ) )
- MYODBCDbgReturn( nReturn );
-
- /*!
- \internal ODBC Rule
-
- The SQL_DESC_DATA_PTR field in the IPD can be set to force a
- consistency check. In a subsequent call to SQLGetDescField or
- SQLGetDescRec, the driver is not required to return the value
- that SQL_DESC_DATA_PTR was set to.
-
- Whenever the SQL_DESC_DATA_PTR field of an IPD, APD, or IPD is set,
- the driver checks that the value in the SQL_DESC_TYPE field contains
- one of the valid ODBC C data types or a driver-specific data type,
- and that all other fields affecting the data types are consistent.
- */
- nReturn = doConsistencyCheck();
- if ( nReturn == SQL_SUCCESS_WITH_INFO )
- bHasInfo = true;
- if ( !SQL_SUCCEEDED( nReturn ) )
- MYODBCDbgReturn( nReturn );
-
- if ( bHasInfo )
- MYODBCDbgReturn( SQL_SUCCESS_WITH_INFO );
- }
- MYODBCDbgReturn( SQL_SUCCESS );
-
- case SQL_DESC_DATETIME_INTERVAL_CODE:
- /*!
- \internal ODBC Rule
-
- IPD: R/W
- */
- MYODBCDbgReturn( setIntervalCode( (SQLSMALLINT)pValuePtr ) );
-
- case SQL_DESC_DATETIME_INTERVAL_PRECISION:
- /*!
- \internal ODBC Rule
-
- IPD: R/W
- */
-
- /*!
- \internal ODBC Rule
-
- The number of digits for an exact numeric type, the number
- of bits in the mantissa (binary precision) for an approximate
- numeric type, or the numbers of digits in the fractional
- seconds component for the SQL_TYPE_TIME, SQL_TYPE_TIMESTAMP,
- or SQL_INTERVAL_SECOND data type. This field is undefined for
- all other data types.
- */
- MYODBCDbgReturn( setDatetimeIntervalPrecision( (SQLSMALLINT)pValuePtr ) );
-
- case SQL_DESC_DISPLAY_SIZE:
- /*!
- \internal ODBC Rule
-
- IPD: Unused
- */
- case SQL_DESC_FIXED_PREC_SCALE:
- /*!
- \internal ODBC Rule
-
- IPD: Unused
- */
- MYODBCDbgReturn( getDes()->getDia()->doAppend( MYODBC_DIA_HY091, 0,
NULL ) );
-
- case SQL_DESC_INDICATOR_PTR:
- /*!
- \internal ODBC Rule
-
- IPD: R/W
- */
- MYODBCDbgReturn( setIndicatorPtr( (SQLINTEGER*)pValuePtr ) );
-
- case SQL_DESC_LABEL:
- /*!
- \internal ODBC Rule
-
- IPD: Unused
- */
- MYODBCDbgReturn( getDes()->getDia()->doAppend( MYODBC_DIA_HY091, 0,
NULL ) );
-
- case SQL_DESC_LENGTH:
- /*!
- \internal ODBC Rule
-
- IPD: R/W
- */
- MYODBCDbgReturn( setLength( (SQLUINTEGER)pValuePtr ) );
-
- case SQL_DESC_LITERAL_PREFIX:
- /*!
- \internal ODBC Rule
-
- IPD: Unused
- */
- case SQL_DESC_LITERAL_SUFFIX:
- /*!
- \internal ODBC Rule
-
- IPD: Unused
- */
- case SQL_DESC_LOCAL_TYPE_NAME:
- /*!
- \internal ODBC Rule
-
- IPD: Unused
- */
- case SQL_DESC_NAME:
- /*!
- \internal ODBC Rule
-
- IPD: Unused
- */
- case SQL_DESC_NULLABLE:
- /*!
- \internal ODBC Rule
-
- IPD: Unused
- */
- MYODBCDbgReturn( getDes()->getDia()->doAppend( MYODBC_DIA_HY091, 0,
NULL ) );
-
- case SQL_DESC_NUM_PREC_RADIX:
- /*!
- \internal ODBC Rule
-
- IPD: R/W
- */
-
- /*!
- \internal ODBC Rule
-
- This SQLINTEGER field contains a value of 2 if the data type in
- the SQL_DESC_TYPE field is an approximate numeric data type,
- because the SQL_DESC_PRECISION field contains the number of bits.
- This field contains a value of 10 if the data type in the
- SQL_DESC_TYPE field is an exact numeric data type, because the
- SQL_DESC_PRECISION field contains the number of decimal digits.
- This field is set to 0 for all non-numeric data types.
- */
- {
- SQLINTEGER n = (SQLINTEGER)pValuePtr;
-
- if ( n != 0 && n != 2 && n != 10 )
- MYODBCDbgReturn( getDes()->getDia()->doAppend(
MYODBC_DIA_HY092, 0, NULL ) );
- }
- MYODBCDbgReturn( setNumPrecRadix( (SQLINTEGER)pValuePtr ) );
-
- case SQL_DESC_OCTET_LENGTH:
- /*!
- \internal ODBC Rule
-
- IPD: R/W
- */
-
- /*!
- \internal ODBC Rule
-
- For IPDs, this field is defined only for output or input/output
- parameters.
- */
- MYODBCDbgReturn( setOctetLength( (SQLINTEGER)pValuePtr ) );
-
- case SQL_DESC_OCTET_LENGTH_PTR:
- /*!
- \internal ODBC Rule
-
- IPD: R/W
- */
- MYODBCDbgReturn( setOctetLengthPtr( (SQLINTEGER*)pValuePtr ) );
-
- case SQL_DESC_PARAMETER_TYPE:
- /*!
- \internal ODBC Rule
-
- IPD: Unused
- */
- MYODBCDbgReturn( getDes()->getDia()->doAppend( MYODBC_DIA_HY091, 0,
NULL ) );
-
- case SQL_DESC_PRECISION:
- /*!
- \internal ODBC Rule
-
- IPD: R/W
- */
-
- /*!
- \internal ODBC Rule
-
- This SQLSMALLINT pDesRec field contains the number of digits
- for an exact numeric type, the number of bits in the mantissa
- (binary precision) for an approximate numeric type, or the numbers
- of digits in the fractional seconds component for the SQL_TYPE_TIME,
- SQL_TYPE_TIMESTAMP, or SQL_INTERVAL_SECOND data type. This field
- is undefined for all other data types.
- */
- MYODBCDbgReturn( setPrecision( (SQLSMALLINT)pValuePtr ) );
-
- case SQL_DESC_ROWVER:
- /*!
- \internal ODBC Rule
-
- IPD: Unused
- */
- MYODBCDbgReturn( getDes()->getDia()->doAppend( MYODBC_DIA_HY091, 0,
NULL ) );
-
- case SQL_DESC_SCALE:
- /*!
- \internal ODBC Rule
-
- IPD: R/W
- */
-
- /*!
- \internal ODBC Rule
-
- This SQLSMALLINT pDesRec field contains the defined scale for
- decimal and numeric data types. The field is undefined for all
- other data types.
- */
- MYODBCDbgReturn( setScale( (SQLSMALLINT)pValuePtr ) );
-
- case SQL_DESC_SCHEMA_NAME:
- /*!
- \internal ODBC Rule
-
- IPD: Unused
- */
- case SQL_DESC_SEARCHABLE:
- /*!
- \internal ODBC Rule
-
- IPD: Unused
- */
- case SQL_DESC_TABLE_NAME:
- /*!
- \internal ODBC Rule
-
- IPD: Unused
- */
- MYODBCDbgReturn( getDes()->getDia()->doAppend( MYODBC_DIA_HY091, 0,
NULL ) );
-
- case SQL_DESC_TYPE:
- /*!
- \internal ODBC Rule
-
- IPD: R/W
- */
- MYODBCDbgReturn( setTypeC( (SQLSMALLINT)pValuePtr ) );
-
- case SQL_DESC_TYPE_NAME:
- /*!
- \internal ODBC Rule
-
- IPD: Unused
- */
- case SQL_DESC_UNNAMED:
- /*!
- \internal ODBC Rule
-
- IPD: Unused
- */
- case SQL_DESC_UNSIGNED:
- /*!
- \internal ODBC Rule
-
- IPD: Unused
- */
- case SQL_DESC_UPDATABLE:
- /*!
- \internal ODBC Rule
-
- IPD: Unused
- */
- MYODBCDbgReturn( getDes()->getDia()->doAppend( MYODBC_DIA_HY091, 0,
NULL ) );
-
- default:
- MYODBCDbgReturn( getDes()->getDia()->doAppend( MYODBC_DIA_HY091, 0,
NULL ) );
- }
-
- MYODBCDbgReturn( SQL_SUCCESS );
-}
-
-SQLRETURN MYODBCDesRecIPD::setConciseType( SQLSMALLINT nConciseType )
-{
- MYODBCDbgEnter();
-
- MYODBCDbgReturn( setConciseTypeSQL( nConciseType ) );
-}
-
-SQLRETURN MYODBCDesRecIPD::setDefault( SQLSMALLINT nConciseType )
-{
- MYODBCDbgEnter();
-
- MYODBCDbgReturn( setDefaultSQL( nConciseType ) );
-}
-
-
Deleted: MYSQLCC/MYSQLCCLib/MDesRecIRD.cpp
===================================================================
--- MYSQLCC/MYSQLCCLib/MDesRecIRD.cpp 2006-04-26 20:14:23 UTC (rev 128)
+++ MYSQLCC/MYSQLCCLib/MDesRecIRD.cpp 2006-04-26 20:17:48 UTC (rev 129)
@@ -1,51 +0,0 @@
-#include "MYODBCDesInternal.h"
-
-/*!
- \brief zzzzz
-
- zzzzz
-
- \param zzzzz
-
- \return zzzzz
-
- \sa zzzzz
-*/
-MYODBCDesRecIRD::MYODBCDesRecIRD( MYODBCDesIRD *pdes )
- : MYODBCDesRec( pdes )
-{
- MYODBCDbgEnter();
-
- Q_ASSERT( !pdes );
-
- MYODBCDbgReturn2();
-}
-
-SQLRETURN MYODBCDesRecIRD::setDescField( SQLSMALLINT /* nFieldIdentifier */, SQLPOINTER
/* pValuePtr */, SQLINTEGER /* nBufferLength */ )
-{
- MYODBCDbgEnter();
-
- /*! \internal ODBC Rule
-
- The DescriptorHandle argument was associated with an IRD, and the FieldIdentifier
- argument was not SQL_DESC_ARRAY_STATUS_PTR or SQL_DESC_ROWS_PROCESSED_PTR.
- */
-
- MYODBCDbgReturn( getDes()->getDia()->doAppend( MYODBC_DIA_HY016, 0, NULL ) );
-}
-
-SQLRETURN MYODBCDesRecIRD::setConciseType( SQLSMALLINT nConciseType )
-{
- MYODBCDbgEnter();
-
- MYODBCDbgReturn( setConciseTypeSQL( nConciseType ) );
-}
-
-SQLRETURN MYODBCDesRecIRD::setDefault( SQLSMALLINT nConciseType )
-{
- MYODBCDbgEnter();
-
- MYODBCDbgReturn( setDefaultSQL( nConciseType ) );
-}
-
-
Deleted: MYSQLCC/MYSQLCCLib/MDesRecIRD.h
===================================================================
--- MYSQLCC/MYSQLCCLib/MDesRecIRD.h 2006-04-26 20:14:23 UTC (rev 128)
+++ MYSQLCC/MYSQLCCLib/MDesRecIRD.h 2006-04-26 20:17:48 UTC (rev 129)
@@ -1,21 +0,0 @@
-#ifndef M_DES_REC_IRD_H
-#define M_DES_REC_IRD_H
-
-class MDesIRD;
-
-class MDesRecIRD : public MDesRec
-{
-public:
- MDesRecIRD( MDesIRD *pDescriptor );
-
- /* setters */
- SQLRETURN setDescField( SQLSMALLINT nFieldIdentifier, SQLPOINTER pValuePtr,
SQLINTEGER nBufferLength );
- SQLRETURN setConciseType( SQLSMALLINT nConciseType );
- SQLRETURN setDefault( SQLSMALLINT nConciseType );
-
- /* getters */
-};
-
-
-#endif
-
Copied: MYSQLCC/MYSQLCCLib/MDescriptorIRD.cpp (from rev 120,
MYSQLCC/MYSQLCCLib/MDesIRD.cpp)
Copied: MYSQLCC/MYSQLCCLib/MDescriptorIRD.h (from rev 123, MYSQLCC/MYSQLCCLib/MDesIRD.h)
Copied: MYSQLCC/MYSQLCCLib/MDescriptorRecordAPD.cpp (from rev 120,
MYSQLCC/MYSQLCCLib/MDesRecAPD.cpp)
Copied: MYSQLCC/MYSQLCCLib/MDescriptorRecordARD.cpp (from rev 120,
MYSQLCC/MYSQLCCLib/MDesRecARD.cpp)
Copied: MYSQLCC/MYSQLCCLib/MDescriptorRecordIPD.cpp (from rev 120,
MYSQLCC/MYSQLCCLib/MDesRecIPD.cpp)
Copied: MYSQLCC/MYSQLCCLib/MDescriptorRecordIRD.cpp (from rev 120,
MYSQLCC/MYSQLCCLib/MDesRecIRD.cpp)
Copied: MYSQLCC/MYSQLCCLib/MDescriptorRecordIRD.h (from rev 123,
MYSQLCC/MYSQLCCLib/MDesRecIRD.h)
Added: MYSQLCC/MYSQLCCLib/MDiagnostic.h
===================================================================
--- MYSQLCC/MYSQLCCLib/MDiagnostic.h 2006-04-26 20:14:23 UTC (rev 128)
+++ MYSQLCC/MYSQLCCLib/MDiagnostic.h 2006-04-26 20:17:48 UTC (rev 129)
@@ -0,0 +1,118 @@
+/*! \file MDiagnostic.h
+ \author Peter Harvey <pharvey@stripped>
+ \brief This code is used to support diagnostic information
+ associated with various handles.
+
+ This code is for internal use and as such is for MySQL C/ODBC
+ developers.
+
+ 0 - n diagnostic records can be associated with the following
+ ODBC handles;
+
+ - Environment
+ - Connection
+ - Statement
+ - Descriptor
+
+ Diagnostic information can be retreived by calling;
+
+ - SQLGetDiagRec
+ - SQLGetDiagField
+
+ Diagnostic information, if any, should be retreived immediatly after
+ calling an ODBC function because it will be lost when more ODBC
+ functions are called. The exceptions to this are SQLGetDiagRec and
+ SQLGetDiagField - these functions never clear diagnostic information.
+*/
+
+#ifndef MDIAGNOSTIC_H
+#define MDIAGNOSTIC_H
+
+#include "MInternal.h"
+
+/*!
+ \internal
+ \brief This is the main handle for diagnostic information.
+
+ This contains the diagnostic header fields and 0 - n
+ diagnostic records. Each; environment, connection, statement
+ and descriptor handle has one of these.
+*/
+class MDiagnostic : public QObject
+{
+ friend class MEnvironment;
+ friend class MConnection;
+ friend class MStatement;
+ friend class MDiagnosticRecord;
+ friend QTextStream &operator<<( QTextStream &stream, const MDiagnostic
&rval );
+
+public:
+ MDiagnostic();
+ ~MDiagnostic();
+
+ /* setters */
+
+ /* getters */
+ SQLRETURN getDiagRec( SQLSMALLINT nRecNumber /* 1-based */, SQLWCHAR *psSqlstate,
SQLINTEGER *pnNativeErrorPtr, SQLWCHAR *psMessageText, SQLSMALLINT nBufferLength,
SQLSMALLINT *pnTextLengthPtr );
+ SQLRETURN getDiagField( SQLSMALLINT nRecNumber /* 1-based */, SQLSMALLINT
nDiagIdentifier, SQLPOINTER pDiagInfoPtr, SQLSMALLINT nBufferLength, SQLSMALLINT
*pnStringLengthPtr );
+
+protected:
+ /* setters */
+
+ /* header fields... */
+ SQLRETURN setCursorRowCount( SQLINTEGER nCursorRowCount );
+ SQLRETURN setDynamicFunctionCode( SQLINTEGER nDynamicFunctionCode );
+ SQLRETURN setReturnCode( SQLRETURN nReturn );
+ SQLRETURN setRowCount( SQLINTEGER nRowCount );
+ /* record fields... */
+ /* N/A (only set by doAppend) */
+ /* these are cached so doAppend has them when called... */
+ SQLRETURN setConnectionName( const QString &stringConnectionName );
+ SQLRETURN setServerName( const QString &stringServerName );
+
+ /* getters */
+
+ /* header fields... */
+ SQLINTEGER getCursorRowCount();
+ QString getDynamicFunction(); /*!< String indicating type of SQL
executed (ie "UPDATE WHERE") */
+ SQLINTEGER getDynamicFunctionCode();
+ SQLINTEGER getNumber(); /*!< The number of status records in records
array. */
+ SQLRETURN getReturnCode();
+ SQLINTEGER getRowCount();
+ /* record fields... */
+ QString getClassOrigin( SQLSMALLINT nRecNumber ); /*!< Doc that defines
the class portion of the SQLSTATE val in this rec. */
+ SQLINTEGER getColumnNumber( SQLSMALLINT nRecNumber );
+ QString getConnectionName( SQLSMALLINT nRecNumber );
+ QString getMessageText( SQLSMALLINT nRecNumber ); /*!< Formatted,
informational message on the error or warning. No max length.
*/
+ QString getMessage( SQLSMALLINT nRecNumber ); /*!< Unformatted,
informational message on the error or warning. Should be !> SQL_MAX_MESSAGE_LENGTH
*/
+ SQLINTEGER getNative( SQLSMALLINT nRecNumber );
+ SQLINTEGER getRowNumber( SQLSMALLINT nRecNumber );
+ QString getServerName( SQLSMALLINT nRecNumber );
+ QString getSQLState( SQLSMALLINT nRecNumber ); /*!< A five-character
SQLSTATE diagnostic code. */
+ QString getSubClassOrigin( SQLSMALLINT nRecNumber);
+ /* these are cached so doAppend has them when called... */
+ QString getConnectionName();
+ QString getServerName();
+
+ /* doers */
+
+ SQLRETURN doAppend( MYODBC_DIA_ID nState, SQLINTEGER nNative = 0, const QString
&stringMessage = QString::null );
+ SQLRETURN doAppend( MYODBC_DIA_ID nState, SQLINTEGER nNative, const QString
&stringMessage, SQLINTEGER nRowNumber, SQLINTEGER nColumnNumber );
+ void doClear();
+ SQLRETURN doDelete( SQLSMALLINT nRecNumber );
+
+private:
+ SQLINTEGER nCursorRowCount; /*!< Count of rows in the cursor.
*/
+ SQLINTEGER nDynamicFunctionCode; /*!< Code indicating type of SQL executed (ie
SQL_DIAG_UPDATE_WHERE) */
+ SQLRETURN nReturnCode; /*!< Return code (as in SQLRETURN) returned by
the function. */
+ SQLINTEGER nRowCount; /*!< The number of rows affected by an insert,
delete, or update. */
+
+ /* these values are copied by new records */
+ QString stringConnectionName; /*!< This is dbc->server.
*/
+ QString stringServerName; /*!< This is dbc->dsn. Same as
SQL_DATA_SOURCE_NAME in SQLGetInfo(). */
+};
+
+
+#endif
+
+
Deleted: MYSQLCC/include/MDiagnostic.h
===================================================================
--- MYSQLCC/include/MDiagnostic.h 2006-04-26 20:14:23 UTC (rev 128)
+++ MYSQLCC/include/MDiagnostic.h 2006-04-26 20:17:48 UTC (rev 129)
@@ -1,118 +0,0 @@
-/*! \file MDiagnostic.h
- \author Peter Harvey <pharvey@stripped>
- \brief This code is used to support diagnostic information
- associated with various handles.
-
- This code is for internal use and as such is for MySQL C/ODBC
- developers.
-
- 0 - n diagnostic records can be associated with the following
- ODBC handles;
-
- - Environment
- - Connection
- - Statement
- - Descriptor
-
- Diagnostic information can be retreived by calling;
-
- - SQLGetDiagRec
- - SQLGetDiagField
-
- Diagnostic information, if any, should be retreived immediatly after
- calling an ODBC function because it will be lost when more ODBC
- functions are called. The exceptions to this are SQLGetDiagRec and
- SQLGetDiagField - these functions never clear diagnostic information.
-*/
-
-#ifndef MDIAGNOSTIC_H
-#define MDIAGNOSTIC_H
-
-#include "MInternal.h"
-
-/*!
- \internal
- \brief This is the main handle for diagnostic information.
-
- This contains the diagnostic header fields and 0 - n
- diagnostic records. Each; environment, connection, statement
- and descriptor handle has one of these.
-*/
-class MDiagnostic : public QObject
-{
- friend class MEnvironment;
- friend class MConnection;
- friend class MStatement;
- friend class MDiagnosticRecord;
- friend QTextStream &operator<<( QTextStream &stream, const MDiagnostic
&rval );
-
-public:
- MDiagnostic();
- ~MDiagnostic();
-
- /* setters */
-
- /* getters */
- SQLRETURN getDiagRec( SQLSMALLINT nRecNumber /* 1-based */, SQLWCHAR *psSqlstate,
SQLINTEGER *pnNativeErrorPtr, SQLWCHAR *psMessageText, SQLSMALLINT nBufferLength,
SQLSMALLINT *pnTextLengthPtr );
- SQLRETURN getDiagField( SQLSMALLINT nRecNumber /* 1-based */, SQLSMALLINT
nDiagIdentifier, SQLPOINTER pDiagInfoPtr, SQLSMALLINT nBufferLength, SQLSMALLINT
*pnStringLengthPtr );
-
-protected:
- /* setters */
-
- /* header fields... */
- SQLRETURN setCursorRowCount( SQLINTEGER nCursorRowCount );
- SQLRETURN setDynamicFunctionCode( SQLINTEGER nDynamicFunctionCode );
- SQLRETURN setReturnCode( SQLRETURN nReturn );
- SQLRETURN setRowCount( SQLINTEGER nRowCount );
- /* record fields... */
- /* N/A (only set by doAppend) */
- /* these are cached so doAppend has them when called... */
- SQLRETURN setConnectionName( const QString &stringConnectionName );
- SQLRETURN setServerName( const QString &stringServerName );
-
- /* getters */
-
- /* header fields... */
- SQLINTEGER getCursorRowCount();
- QString getDynamicFunction(); /*!< String indicating type of SQL
executed (ie "UPDATE WHERE") */
- SQLINTEGER getDynamicFunctionCode();
- SQLINTEGER getNumber(); /*!< The number of status records in records
array. */
- SQLRETURN getReturnCode();
- SQLINTEGER getRowCount();
- /* record fields... */
- QString getClassOrigin( SQLSMALLINT nRecNumber ); /*!< Doc that defines
the class portion of the SQLSTATE val in this rec. */
- SQLINTEGER getColumnNumber( SQLSMALLINT nRecNumber );
- QString getConnectionName( SQLSMALLINT nRecNumber );
- QString getMessageText( SQLSMALLINT nRecNumber ); /*!< Formatted,
informational message on the error or warning. No max length.
*/
- QString getMessage( SQLSMALLINT nRecNumber ); /*!< Unformatted,
informational message on the error or warning. Should be !> SQL_MAX_MESSAGE_LENGTH
*/
- SQLINTEGER getNative( SQLSMALLINT nRecNumber );
- SQLINTEGER getRowNumber( SQLSMALLINT nRecNumber );
- QString getServerName( SQLSMALLINT nRecNumber );
- QString getSQLState( SQLSMALLINT nRecNumber ); /*!< A five-character
SQLSTATE diagnostic code. */
- QString getSubClassOrigin( SQLSMALLINT nRecNumber);
- /* these are cached so doAppend has them when called... */
- QString getConnectionName();
- QString getServerName();
-
- /* doers */
-
- SQLRETURN doAppend( MYODBC_DIA_ID nState, SQLINTEGER nNative = 0, const QString
&stringMessage = QString::null );
- SQLRETURN doAppend( MYODBC_DIA_ID nState, SQLINTEGER nNative, const QString
&stringMessage, SQLINTEGER nRowNumber, SQLINTEGER nColumnNumber );
- void doClear();
- SQLRETURN doDelete( SQLSMALLINT nRecNumber );
-
-private:
- SQLINTEGER nCursorRowCount; /*!< Count of rows in the cursor.
*/
- SQLINTEGER nDynamicFunctionCode; /*!< Code indicating type of SQL executed (ie
SQL_DIAG_UPDATE_WHERE) */
- SQLRETURN nReturnCode; /*!< Return code (as in SQLRETURN) returned by
the function. */
- SQLINTEGER nRowCount; /*!< The number of rows affected by an insert,
delete, or update. */
-
- /* these values are copied by new records */
- QString stringConnectionName; /*!< This is dbc->server.
*/
- QString stringServerName; /*!< This is dbc->dsn. Same as
SQL_DATA_SOURCE_NAME in SQLGetInfo(). */
-};
-
-
-#endif
-
-
| Thread |
|---|
| • Connector/ODBC 5 commit: r129 - in MYSQLCC: MYSQLCCLib include | pharvey | 26 Apr |