Kaydet (Commit) babc5a94 authored tarafından Ivo Hinkelmann's avatar Ivo Hinkelmann

INTEGRATION: CWS dba205b (1.12.38); FILE MERGED

2006/08/09 19:52:36 fs 1.12.38.1: refactored the OColumnAlias class, in preparation of fixing #b6248060#
üst c2873771
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
* *
* $RCSfile: MDatabaseMetaData.cxx,v $ * $RCSfile: MDatabaseMetaData.cxx,v $
* *
* $Revision: 1.13 $ * $Revision: 1.14 $
* *
* last change: $Author: obo $ $Date: 2006-09-17 02:56:24 $ * last change: $Author: ihi $ $Date: 2006-10-18 13:08:28 $
* *
* The Contents of this file are made available subject to * The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1. * the terms of GNU Lesser General Public License Version 2.1.
...@@ -115,7 +115,6 @@ ODatabaseMetaDataResultSet::ORows& SAL_CALL ODatabaseMetaData::getColumnRows( ...@@ -115,7 +115,6 @@ ODatabaseMetaDataResultSet::ORows& SAL_CALL ODatabaseMetaData::getColumnRows(
ODatabaseMetaDataResultSet::ORow aRow(19); ODatabaseMetaDataResultSet::ORow aRow(19);
aRows.clear(); aRows.clear();
const ::std::vector< ::rtl::OUString >& colNames = m_pConnection->getColumnAlias().getAlias();
::osl::MutexGuard aGuard( m_aMutex ); ::osl::MutexGuard aGuard( m_aMutex );
::std::vector< ::rtl::OUString > tables; ::std::vector< ::rtl::OUString > tables;
...@@ -159,6 +158,8 @@ ODatabaseMetaDataResultSet::ORows& SAL_CALL ODatabaseMetaData::getColumnRows( ...@@ -159,6 +158,8 @@ ODatabaseMetaDataResultSet::ORows& SAL_CALL ODatabaseMetaData::getColumnRows(
// IS_NULLABLE // IS_NULLABLE
aRow[18] = new ORowSetValueDecorator(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("YES"))); aRow[18] = new ORowSetValueDecorator(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("YES")));
const OColumnAlias& colNames = m_pConnection->getColumnAlias();
// Iterate over all tables // Iterate over all tables
for(size_t j = 0; j < tables.size(); j++ ) { for(size_t j = 0; j < tables.size(); j++ ) {
if(match(tableNamePattern, tables[j],'\0')) { if(match(tableNamePattern, tables[j],'\0')) {
...@@ -168,13 +169,18 @@ ODatabaseMetaDataResultSet::ORows& SAL_CALL ODatabaseMetaData::getColumnRows( ...@@ -168,13 +169,18 @@ ODatabaseMetaDataResultSet::ORows& SAL_CALL ODatabaseMetaData::getColumnRows(
OSL_TRACE( "\t\tTableName = %s;\n",OUtoCStr( tables[j] )); OSL_TRACE( "\t\tTableName = %s;\n",OUtoCStr( tables[j] ));
// Iterate over all collumns in the table. // Iterate over all collumns in the table.
for ( size_t i = 0; i < colNames.size(); i++ ) { for ( OColumnAlias::AliasMap::const_iterator compare = colNames.begin();
if(match(columnNamePattern, colNames[i],'\0')) { compare != colNames.end();
OSL_TRACE( "\t\t\tColumnName = %s;\n",OUtoCStr( colNames[i] )); ++compare
)
{
if ( match( columnNamePattern, compare->first, '\0' ) )
{
OSL_TRACE( "\t\t\tColumnName = %s;\n", OUtoCStr( compare->first ) );
// COLUMN_NAME // COLUMN_NAME
aRow[4] = new ORowSetValueDecorator( colNames[i] ); aRow[4] = new ORowSetValueDecorator( compare->first );
// ORDINAL_POSITION // ORDINAL_POSITION
aRow[17] = new ORowSetValueDecorator(sal_Int32(i+1)); aRow[17] = new ORowSetValueDecorator( static_cast< sal_Int32 >( compare->second.eProgrammaticNameIndex ) + 1 );
aRows.push_back(aRow); aRows.push_back(aRow);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment