summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2006-07-10 13:28:56 +0000
committerOliver Bolte <obo@openoffice.org>2006-07-10 13:28:56 +0000
commit9a1a4750a068273e2357bda63c0f71580dfd8c1e (patch)
treeb68180cb393539afe41fa5deb8b7d143a387a005 /connectivity
parent3619612df254a2561d9946e7cb5841d1ba922c5c (diff)
INTEGRATION: CWS qiq (1.3.104); FILE MERGED
2006/06/27 14:28:12 fs 1.3.104.3: RESYNC: (1.3-1.4); FILE MERGED 2006/06/16 11:32:34 fs 1.3.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:04 fs 1.3.104.1: some refactoring of compose/quoteTableName and friends, in preparation of #i51143#
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/drivers/hsqldb/HViews.cxx19
1 files changed, 8 insertions, 11 deletions
diff --git a/connectivity/source/drivers/hsqldb/HViews.cxx b/connectivity/source/drivers/hsqldb/HViews.cxx
index a523ddcbd15d..93aadda15158 100644
--- a/connectivity/source/drivers/hsqldb/HViews.cxx
+++ b/connectivity/source/drivers/hsqldb/HViews.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: HViews.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: hr $ $Date: 2006-06-20 01:31:40 $
+ * last change: $Author: obo $ $Date: 2006-07-10 14:28:56 $
*
* 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<OHCatalog&>(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<OHCatalog&>(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<OHCatalog&>(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);
}
}