summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/mysql
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2006-07-10 13:31:13 +0000
committerOliver Bolte <obo@openoffice.org>2006-07-10 13:31:13 +0000
commit57a7f15ee3d93dcc54fc1876d0e41d78edcdcf75 (patch)
tree872dca5a5951795e92fdb0f2657baa6acd89914e /connectivity/source/drivers/mysql
parent59ae55c305f2790c142fb5a2d9ab1f25dfe3cf6a (diff)
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#
Diffstat (limited to 'connectivity/source/drivers/mysql')
-rw-r--r--connectivity/source/drivers/mysql/YViews.cxx19
1 files changed, 8 insertions, 11 deletions
diff --git a/connectivity/source/drivers/mysql/YViews.cxx b/connectivity/source/drivers/mysql/YViews.cxx
index a272669e2a64..c81078d5f261 100644
--- a/connectivity/source/drivers/mysql/YViews.cxx
+++ b/connectivity/source/drivers/mysql/YViews.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: YViews.cxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: hr $ $Date: 2006-06-20 01:54:08 $
+ * last change: $Author: obo $ $Date: 2006-07-10 14:31:13 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -126,7 +126,7 @@ void OViews::disposing(void)
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 @@ Reference< XPropertySet > OViews::createEmptyObject()
}
// -------------------------------------------------------------------------
// 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 @@ void OViews::dropObject(sal_Int32 _nPos,const ::rtl::OUString /*_sElementName*/)
::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 @@ void OViews::createView( const Reference< XPropertySet >& descriptor )
::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 @@ void OViews::createView( const Reference< XPropertySet >& descriptor )
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);
}
}