Modified:
trunk/MYSQLPlus/MYSQLPlusLib/MResultPlus.cpp
Log:
completed SQLStatistics (but no testing thus far)
Modified: trunk/MYSQLPlus/MYSQLPlusLib/MResultPlus.cpp
===================================================================
--- trunk/MYSQLPlus/MYSQLPlusLib/MResultPlus.cpp 2006-06-29 04:48:24 UTC (rev 417)
+++ trunk/MYSQLPlus/MYSQLPlusLib/MResultPlus.cpp 2006-06-29 05:13:32 UTC (rev 418)
@@ -824,6 +824,14 @@
MYODBCDbgReturn( nReturn );
}
+/*!
+ \brief Get indexs.
+
+ Get indexs for the given catalog->schema->table. Optionally
include/exclude unique indexs.
+
+ \note We map the ODBC catalog to/from the MySQL schema. This means we do not
support an ODBC schema
+ and we do not support a MySQL catalog (there is none).
+*/
SQLRETURN MResultPlus::doStatistics( const QString &stringCatalog, const QString
&stringSchema, const QString &stringTable, SQLUSMALLINT nUnique, SQLUSMALLINT
nReserved )
{
MYODBCDbgEnter();
@@ -871,11 +879,15 @@
while ( pRow = mysql_fetch_row( pResult ) )
{
- doAppendStatistics( stringCatalog,
- stringSchema,
- stringTable,
- pRow[0],
- pRow[1] );
+ doAppendStatistics( pRow[4], // catalog - we put MySQL schema in here
+ pRow[2], // table
+ pRow[3], // unique
+ pRow[5], // column
+ MYODBCC::getIndexType( pRow[13] ), // type (char to
smallint for example "BTREE" = SQL_INDEX_BTREE
+ pRow[6], // ordinal
+ pRow[7], // column
+ pRow[9], // AscDesc,
+ pRow[10] ); // Cardinality
}
mysql_free_result( pResult );
| Thread |
|---|
| • Connector/ODBC 5 commit: r418 - trunk/MYSQLPlus/MYSQLPlusLib | pharvey | 29 Jun |