User: rt Date: 2008-01-30 07:49:21+0000 Modified: dba/connectivity/source/drivers/ado/ADatabaseMetaData.cxx
Log: INTEGRATION: CWS dba24d (1.21.152); FILE MERGED 2007/11/28 09:30:14 oj 1.21.152.2: #i58268# cache some databasemetadata 2007/11/21 12:40:39 oj 1.21.152.1: #i68854# impl TypeSettingInfo for Oracle and some clean up File Changes: Directory: /dba/connectivity/source/drivers/ado/ ================================================ File [changed]: ADatabaseMetaData.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/ado/ADatabaseMetaData.cxx?r1=1.21&r2=1.22 Delta lines: +17 -52 --------------------- --- ADatabaseMetaData.cxx 2006-09-17 02:11:56+0000 1.21 +++ ADatabaseMetaData.cxx 2008-01-30 07:49:19+0000 1.22 @@ -82,7 +82,7 @@ // using namespace connectivity; ODatabaseMetaData::ODatabaseMetaData(OConnection* _pCon) - : ::connectivity::ODatabaseMetaDataBase(_pCon) + : ::connectivity::ODatabaseMetaDataBase(_pCon,_pCon->getConnectionInfo()) ,m_pADOConnection(_pCon->getConnection()) ,m_pConnection(_pCon) { @@ -124,7 +124,7 @@ return aValue; } // ------------------------------------------------------------------------- -Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTypeInfo( ) throw(SQLException, RuntimeException) +Reference< XResultSet > ODatabaseMetaData::impl_getTypeInfo_throw( ) { ADORecordset *pRecordset = m_pADOConnection->getTypeInfo(); // ADOS::ThrowException(*m_pADOConnection,*this); @@ -153,7 +153,7 @@ return xRef; } // ------------------------------------------------------------------------- -::rtl::OUString SAL_CALL ODatabaseMetaData::getCatalogSeparator( ) throw(SQLException, RuntimeException) +::rtl::OUString ODatabaseMetaData::impl_getCatalogSeparator_throw( ) { return getLiteral(DBLITERAL_CATALOG_SEPARATOR); } @@ -255,16 +255,6 @@ return xRef; } // ------------------------------------------------------------------------- -Reference< XResultSet > SAL_CALL ODatabaseMetaData::getVersionColumns( - const Any& /*catalog*/, const ::rtl::OUString& /*schema*/, const ::rtl::OUString& /*table*/ ) throw(SQLException, RuntimeException) -{ - Reference< XResultSet > xRef; - ::connectivity::ODatabaseMetaDataResultSet* pResult = new ::connectivity::ODatabaseMetaDataResultSet(); - xRef = pResult; - pResult->setVersionColumnsMap(); - return xRef; -} -// ------------------------------------------------------------------------- sal_Int32 SAL_CALL ODatabaseMetaData::getMaxBinaryLiteralLength( ) throw(SQLException, RuntimeException) { return getMaxSize(DBLITERAL_BINARY_LITERAL); @@ -321,7 +311,7 @@ return getMaxSize(DBLITERAL_TABLE_NAME); } // ------------------------------------------------------------------------- -sal_Int32 SAL_CALL ODatabaseMetaData::getMaxTablesInSelect( ) throw(SQLException, RuntimeException) +sal_Int32 ODatabaseMetaData::impl_getMaxTablesInSelect_throw( ) { return getInt32Property(::rtl::OUString::createFromAscii("Maximum Tables in SELECT")); } @@ -386,18 +376,6 @@ return xRef; } // ------------------------------------------------------------------------- -Reference< XResultSet > SAL_CALL ODatabaseMetaData::getBestRowIdentifier( - const Any& /*catalog*/, const ::rtl::OUString& /*schema*/, const ::rtl::OUString& /*table*/, sal_Int32 /*scope*/, - sal_Bool /*nullable*/ ) throw(SQLException, RuntimeException) -{ - Reference< XResultSet > xRef; - - ::connectivity::ODatabaseMetaDataResultSet* pResult = new ::connectivity::ODatabaseMetaDataResultSet(); - xRef = pResult; - pResult->setBestRowIdentifierMap(); - return xRef; -} -// ------------------------------------------------------------------------- Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTablePrivileges( const Any& catalog, const ::rtl::OUString& schemaPattern, const ::rtl::OUString& tableNamePattern ) throw(SQLException, RuntimeException) { @@ -415,9 +393,8 @@ } else { - ::connectivity::ODatabaseMetaDataResultSet* pResult = new ::connectivity::ODatabaseMetaDataResultSet(); + ::connectivity::ODatabaseMetaDataResultSet* pResult = new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eTablePrivileges); xRef = pResult; - pResult->setTablePrivilegesMap(); ::connectivity::ODatabaseMetaDataResultSet::ORows aRows; ::connectivity::ODatabaseMetaDataResultSet::ORow aRow(8); aRows.reserve(8); @@ -484,7 +461,7 @@ return (getInt32Property(::rtl::OUString::createFromAscii("Identifier Case Sensitivity")) & DBPROPVAL_IC_LOWER) == DBPROPVAL_IC_LOWER ; } // ------------------------------------------------------------------------- -sal_Bool SAL_CALL ODatabaseMetaData::storesMixedCaseQuotedIdentifiers( ) throw(SQLException, RuntimeException) +sal_Bool ODatabaseMetaData::impl_storesMixedCaseQuotedIdentifiers_throw( ) { return (getInt32Property(::rtl::OUString::createFromAscii("Identifier Case Sensitivity")) & DBPROPVAL_IC_MIXED) == DBPROPVAL_IC_MIXED ; } @@ -504,12 +481,12 @@ return (getInt32Property(::rtl::OUString::createFromAscii("Identifier Case Sensitivity")) & DBPROPVAL_IC_UPPER) == DBPROPVAL_IC_UPPER ; } // ------------------------------------------------------------------------- -sal_Bool SAL_CALL ODatabaseMetaData::supportsAlterTableWithAddColumn( ) throw(SQLException, RuntimeException) +sal_Bool ODatabaseMetaData::impl_supportsAlterTableWithAddColumn_throw( ) { return sal_True; } // ------------------------------------------------------------------------- -sal_Bool SAL_CALL ODatabaseMetaData::supportsAlterTableWithDropColumn( ) throw(SQLException, RuntimeException) +sal_Bool ODatabaseMetaData::impl_supportsAlterTableWithDropColumn_throw( ) { return sal_True; } @@ -529,7 +506,7 @@ return getStringProperty(::rtl::OUString::createFromAscii("Catalog Term")); } // ------------------------------------------------------------------------- -::rtl::OUString SAL_CALL ODatabaseMetaData::getIdentifierQuoteString( ) throw(SQLException, RuntimeException) +::rtl::OUString ODatabaseMetaData::impl_getIdentifierQuoteString_throw( ) { return getLiteral(DBLITERAL_QUOTE_PREFIX); @@ -546,7 +523,7 @@ return isCapable(DBLITERAL_CORRELATION_NAME); } // ------------------------------------------------------------------------- -sal_Bool SAL_CALL ODatabaseMetaData::isCatalogAtStart( ) throw(SQLException, RuntimeException) +sal_Bool ODatabaseMetaData::impl_isCatalogAtStart_throw( ) { return getInt32Property(::rtl::OUString::createFromAscii("Catalog Location")) == DBPROPVAL_CL_START; } @@ -620,7 +597,7 @@ return bValue; } // ------------------------------------------------------------------------- -sal_Bool SAL_CALL ODatabaseMetaData::supportsSchemasInDataManipulation( ) throw(SQLException, RuntimeException) +sal_Bool ODatabaseMetaData::impl_supportsSchemasInDataManipulation_throw( ) { return (getInt32Property(::rtl::OUString::createFromAscii("Schema Usage")) & DBPROPVAL_SU_DML_STATEMENTS) == DBPROPVAL_SU_DML_STATEMENTS; } @@ -648,12 +625,12 @@ return (getInt32Property(::rtl::OUString::createFromAscii("Schema Usage")) & DBPROPVAL_SU_INDEX_DEFINITION) == DBPROPVAL_SU_INDEX_DEFINITION; } // ------------------------------------------------------------------------- -sal_Bool SAL_CALL ODatabaseMetaData::supportsSchemasInTableDefinitions( ) throw(SQLException, RuntimeException) +sal_Bool ODatabaseMetaData::impl_supportsSchemasInTableDefinitions_throw( ) { return (getInt32Property(::rtl::OUString::createFromAscii("Schema Usage")) & DBPROPVAL_SU_TABLE_DEFINITION) == DBPROPVAL_SU_TABLE_DEFINITION; } // ------------------------------------------------------------------------- -sal_Bool SAL_CALL ODatabaseMetaData::supportsCatalogsInTableDefinitions( ) throw(SQLException, RuntimeException) +sal_Bool ODatabaseMetaData::impl_supportsCatalogsInTableDefinitions_throw( ) { // return (getInt32Property(::rtl::OUString::createFromAscii("Catalog Usage")) & DBPROPVAL_CU_TABLE_DEFINITION) == DBPROPVAL_CU_TABLE_DEFINITION; return sal_False; @@ -665,7 +642,7 @@ return sal_False; } // ------------------------------------------------------------------------- -sal_Bool SAL_CALL ODatabaseMetaData::supportsCatalogsInDataManipulation( ) throw(SQLException, RuntimeException) +sal_Bool ODatabaseMetaData::impl_supportsCatalogsInDataManipulation_throw( ) { // return (getInt32Property(::rtl::OUString::createFromAscii("Catalog Usage")) & DBPROPVAL_CU_DML_STATEMENTS) == DBPROPVAL_CU_DML_STATEMENTS; return sal_False; @@ -680,16 +657,10 @@ // ------------------------------------------------------------------------- Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTableTypes( ) throw(SQLException, RuntimeException) { - // Create elements used in the array - Reference< XResultSet > xRef; - - ::connectivity::ODatabaseMetaDataResultSet* pResult = new ::connectivity::ODatabaseMetaDataResultSet(); - xRef = pResult; - pResult->setTableTypes(); - return xRef; + return new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eTableTypes); } // ------------------------------------------------------------------------- -sal_Int32 SAL_CALL ODatabaseMetaData::getMaxStatements( ) throw(SQLException, RuntimeException) +sal_Int32 ODatabaseMetaData::impl_getMaxStatements_throw( ) { return 0; } @@ -824,7 +795,7 @@ return (getInt32Property(::rtl::OUString::createFromAscii("Identifier Case Sensitivity")) & DBPROPVAL_IC_MIXED) == DBPROPVAL_IC_MIXED; } // ------------------------------------------------------------------------- -sal_Bool SAL_CALL ODatabaseMetaData::supportsMixedCaseQuotedIdentifiers( ) throw(SQLException, RuntimeException) +sal_Bool ODatabaseMetaData::impl_supportsMixedCaseQuotedIdentifiers_throw( ) { return (getInt32Property(::rtl::OUString::createFromAscii("Identifier Case Sensitivity")) & DBPROPVAL_IC_MIXED) == DBPROPVAL_IC_MIXED; } @@ -1149,10 +1120,4 @@ return Reference< XResultSet >(); } // ------------------------------------------------------------------------- -Reference< XConnection > SAL_CALL ODatabaseMetaData::getConnection( ) throw(SQLException, RuntimeException) -{ - return (Reference< XConnection >)m_pConnection;//new OConnection(m_aConnectionHandle); -} -// ------------------------------------------------------------------------- - --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
