List:Commits« Previous MessageNext Message »
From:pharvey Date:June 26 2006 8:34pm
Subject:Connector/ODBC 5 commit: r396 - in trunk: MYODBCDriver/MYODBCDriverLib MYSQLPlus/MYSQLPlusLib
View as plain text  
Modified:
   trunk/MYODBCDriver/MYODBCDriverLib/SQLGetFunctions.cpp
   trunk/MYODBCDriver/MYODBCDriverLib/SQLSpecialColumnsW.cpp
   trunk/MYSQLPlus/MYSQLPlusLib/MStatement.cpp
Log:
some doc

Modified: trunk/MYODBCDriver/MYODBCDriverLib/SQLGetFunctions.cpp
===================================================================
--- trunk/MYODBCDriver/MYODBCDriverLib/SQLGetFunctions.cpp	2006-06-26 07:36:57 UTC (rev
395)
+++ trunk/MYODBCDriver/MYODBCDriverLib/SQLGetFunctions.cpp	2006-06-26 20:34:48 UTC (rev
396)
@@ -27,7 +27,7 @@
                 A           - ANSI char version of function.
 
                 A driver can implement just the Wide version, ANSI (undecorated is same
as ANSI in a driver),
-                or both. The DM considers  the driver to be a UNICODE driver if it finds
that it implements
+                or both. The DM considers the driver to be a UNICODE driver if it finds
that it implements
                 and exports SQLConnectW().
 
                 This driver, at this time, implements the Wide version of a function when
given a choice and in
@@ -91,7 +91,7 @@
 /*  SQL_API_SQLSETPARAM             Dep */
     SQL_API_SQLSETSTMTATTR,
 /*  SQL_API_SQLSETSTMTOPTION,       Dep */
-/*  SQL_API_SQLSPECIALCOLUMNS,          */
+    SQL_API_SQLSPECIALCOLUMNS,
 /*  SQL_API_SQLSTATISTICS,              */
     SQL_API_SQLTABLES,
 /*  SQL_API_SQLTRANSACT,            Dep */

Modified: trunk/MYODBCDriver/MYODBCDriverLib/SQLSpecialColumnsW.cpp
===================================================================
--- trunk/MYODBCDriver/MYODBCDriverLib/SQLSpecialColumnsW.cpp	2006-06-26 07:36:57 UTC (rev
395)
+++ trunk/MYODBCDriver/MYODBCDriverLib/SQLSpecialColumnsW.cpp	2006-06-26 20:34:48 UTC (rev
396)
@@ -8,6 +8,24 @@
 */
 #include "MYODBCDriverInternal.h"
 
+/*!
+    \brief  <B>ODBC 1.0 API</B>
+            <BR>
+            Retrieves the following information about columns within a
+            specified table:
+            - The optimal set of columns that uniquely identifies a row
+            in the table.
+            - Columns that are automatically updated when any value in the
+            row is updated by a transaction
+
+    \return SQLRETURN
+
+    \retval SQL_SUCCESS             Request processed ok.
+    \retval SQL_SUCCESS_WITH_INFO   Request was probably processed ok - check diagnostic.
+    \retval SQL_STILL_EXECUTING     Still executing from a previous call.     
+    \retval SQL_ERROR               Request failed.
+    \retval SQL_INVALID_HANDLE      Invalid handle was provided.
+*/
 SQLRETURN SQL_API SQLSpecialColumnsW( SQLHSTMT      hStm,
                                       SQLSMALLINT   nIdentifierType, 
                                       SQLWCHAR *    psCatalogName, 

Modified: trunk/MYSQLPlus/MYSQLPlusLib/MStatement.cpp
===================================================================
--- trunk/MYSQLPlus/MYSQLPlusLib/MStatement.cpp	2006-06-26 07:36:57 UTC (rev 395)
+++ trunk/MYSQLPlus/MYSQLPlusLib/MStatement.cpp	2006-06-26 20:34:48 UTC (rev 396)
@@ -2975,6 +2975,95 @@
     MYODBCDbgReturn( SQL_SUCCESS_WITH_INFO );
 }
 
+/*!
+    \brief  Gets list of columns which can be used to uniquely identify a row, or gets a
list of columns which are automatically updated due to changes on row.
+
+            This is a 'catalog' method which can be used to get;
+
+            - SQL_BEST_ROWID - columns which are optimal for uniquely identifing a row 
+            - SQL_ROWVER - columns which are silently updated when other columns altered
+
+            This method generates a result-set with the following columns;
+
+            <TABLE>
+                <TR>
+                   
<TD>NAME</TD><TD>TYPE</TD><TD>DESCRIPTION</TD>
+                </TR>
+                <TR>
+                    <TD>SCOPE</TD>
+                    <TD>SQLSMALLINT</TD>
+                    <TD>SQL_SCOPE_CURROW, SQL_SCOPE_TRANSACTION,
SQL_SCOPE_SESSION</TD>
+                    <TD>COLUMN_NAME</TD>
+                    <TD>SQLVARCHAR</TD>
+                    <TD>Column name.</TD>
+                    <TD>DATA_TYPE</TD>
+                    <TD>SQLSMALLINT</TD>
+                    <TD>SQL data type.</TD>
+                    <TD>TYPE_NAME</TD>
+                    <TD>SQLVARCHAR</TD>
+                    <TD>Type name.</TD>
+                    <TD>COLUMN_SIZE</TD>
+                    <TD>SQLINTEGER</TD>
+                    <TD>Column size.</TD>
+                    <TD>BUFFER_LENGTH</TD>
+                    <TD>SQLINTEGER</TD>
+                    <TD>Number of bytes of data provided for SQLGetData/SQLFetch if
target type is SQL_C_DEFAULT.</TD>
+                    <TD>DECIMAL_DIGITS</TD>
+                    <TD>SQLSMALLINT</TD>
+                    <TD>Number of decimal digits. Value is NULL if N/A.</TD>
+                    <TD>PSEUDO_COLUMN</TD>
+                    <TD>SQLSMALLINT</TD>
+                    <TD>SQL_PC_UNKNOWN, SQL_PC_NOT_PSEUDO, SQL_PC_PSEUDO</TD>
+                </TR>
+            </TABLE>
+
+            SQL_BEST_ROWID
+
+            The best rowid is chosen by looking for the availability of the following (in
priority order);
+
+            - primary key
+            - unique index
+
+            SQL_ROWVER
+
+            The best rowver is chosen by looking for the availability of the following
(in priority order);
+
+            - NOT NULL AUTO_INCREMENT UNIQUE
+            - NOT NULL TIMESTAMP UNIQUE DEFAULT <anything>
+
+            It is presumed that the TIMESTAMP DEFAULT is CURRENT_TIMESTAMP which, if we
are dealing with the
+            first timestamp column in table, is the same as NULL. However; any default is
safe as we are 
+            dealing with UNIQUE.
+
+    \note   This starts by clearing diagnostic information for the statement.
+
+    \param  nIdentifierType
+    \param  psCatalogName
+    \param  nNameLength1
+    \param  psSchemaName
+    \param  nNameLength2
+    \param  psTableName
+    \param  nNameLength3
+    \param  nScope
+    \param  nNullable
+
+    \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     doColumnPrivileges
+            doColumn
+            doForeignKeys
+            doPrimaryKeys
+            doProcedureColumns
+            doProcedures
+            doStatistics
+            doTablePrivileges
+            doTables
+
+*/
 SQLRETURN MStatement::doSpecialColumns( SQLSMALLINT nIdentifierType, SQLWCHAR
*psCatalogName, SQLSMALLINT nNameLength1, SQLWCHAR *psSchemaName, SQLSMALLINT
nNameLength2, SQLWCHAR *psTableName, SQLSMALLINT nNameLength3, SQLSMALLINT nScope,
SQLSMALLINT nNullable )
 {
     MYODBCDbgEnter();

Thread
Connector/ODBC 5 commit: r396 - in trunk: MYODBCDriver/MYODBCDriverLib MYSQLPlus/MYSQLPlusLibpharvey26 Jun