User: obo Date: 2006/07/10 07:31:15 Modified: dba/connectivity/source/drivers/mysql/YViews.cxx
Log: INTEGRATION: CWS qiq (1.6.104); FILE MERGED 2006/06/27 14:54:15 fs 1.6.104.3: RESYNC: (1.6-1.7); FILE MERGED 2006/06/16 11:32:34 fs 1.6.104.2: during #i51143#: refactored VCollection: - createEmptyObject now named createDescriptor - cloneObject removed - appendObject now returns the newly created object (previously done via a subsequent call to cloneObject) 2006/05/23 13:27:06 fs 1.6.104.1: some refactoring of compose/quoteTableName and friends, in preparation of #i51143# File Changes: Directory: /dba/connectivity/source/drivers/mysql/ ================================================== File [changed]: YViews.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/mysql/YViews.cxx?r1=1.7&r2=1.8 Delta lines: +11 -14 --------------------- --- YViews.cxx 20 Jun 2006 01:54:08 -0000 1.7 +++ YViews.cxx 10 Jul 2006 14:31:13 -0000 1.8 @@ -126,7 +126,7 @@ OCollection::disposing(); } // ------------------------------------------------------------------------- -Reference< XPropertySet > OViews::createEmptyObject() +Reference< XPropertySet > OViews::createDescriptor() { Reference<XConnection> xConnection = static_cast<OMySQLCatalog&>(m_rParent).getConnection(); connectivity::sdbcx::OView* pNew = new connectivity::sdbcx::OView(sal_True,xConnection->getMetaData()); @@ -134,13 +134,10 @@ } // ------------------------------------------------------------------------- // XAppend -void OViews::appendObject( const Reference< XPropertySet >& descriptor ) +sdbcx::ObjectType OViews::appendObject( const ::rtl::OUString& _rForName, const Reference< XPropertySet >& descriptor ) { - ::rtl::OUString aName = getString(descriptor->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME))); - if ( !aName.getLength() ) - ::dbtools::throwFunctionSequenceException(static_cast<XTypeProvider*>(this)); - createView(descriptor); + return createObject( _rForName ); } // ------------------------------------------------------------------------- // XDrop @@ -156,7 +153,7 @@ ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("DROP VIEW"); Reference<XPropertySet> xProp(xObject,UNO_QUERY); - aSql += ::dbtools::composeTableName(m_xMetaData,xProp,sal_True,::dbtools::eInTableDefinitions); + aSql += ::dbtools::composeTableName( m_xMetaData, xProp, ::dbtools::eInTableDefinitions, false, false, true ); Reference<XConnection> xConnection = static_cast<OMySQLCatalog&>(m_rParent).getConnection(); Reference< XStatement > xStmt = xConnection->createStatement( ); @@ -180,7 +177,7 @@ ::rtl::OUString aQuote = xConnection->getMetaData()->getIdentifierQuoteString( ); ::rtl::OUString sSchema,sCommand; - aSql += ::dbtools::composeTableName(m_xMetaData,descriptor,sal_True,::dbtools::eInTableDefinitions); + aSql += ::dbtools::composeTableName( m_xMetaData, descriptor, ::dbtools::eInTableDefinitions, false, false, true ); aSql += ::rtl::OUString::createFromAscii(" AS "); descriptor->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_COMMAND)) >>= sCommand; @@ -197,7 +194,7 @@ OTables* pTables = static_cast<OTables*>(static_cast<OMySQLCatalog&>(m_rParent).getPrivateTables()); if ( pTables ) { - ::rtl::OUString sName = ::dbtools::composeTableName(m_xMetaData,descriptor,sal_False,::dbtools::eInDataManipulation); + ::rtl::OUString sName = ::dbtools::composeTableName( m_xMetaData, descriptor, ::dbtools::eInDataManipulation, false, false, false ); pTables->appendNew(sName); } } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
