Tag: cws_src680_qiq
User: fs      
Date: 06/05/23 06:27:09

Modified:
 /dba/connectivity/source/drivers/hsqldb/
  HTable.cxx, HTables.cxx, HViews.cxx
 /dba/connectivity/source/drivers/mysql/
  YTable.cxx, YTables.cxx, YViews.cxx

Log:
 some refactoring of compose/quoteTableName and friends, in preparation of 
#i51143#

File Changes:

Directory: /dba/connectivity/source/drivers/hsqldb/
===================================================

File [changed]: HTable.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/hsqldb/HTable.cxx?r1=1.7&r2=1.7.96.1
Delta lines:  +7 -9
-------------------
--- HTable.cxx  23 Sep 2005 11:39:56 -0000      1.7
+++ HTable.cxx  23 May 2006 13:27:03 -0000      1.7.96.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: HTable.cxx,v $
  *
- *  $Revision: 1.7 $
+ *  $Revision: 1.7.96.1 $
  *
- *  last change: $Author: hr $ $Date: 2005/09/23 11:39:56 $
+ *  last change: $Author: fs $ $Date: 2006/05/23 13:27:03 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -361,8 +361,7 @@
        ::rtl::OUString sSql = ::rtl::OUString::createFromAscii("ALTER TABLE ");
        const ::rtl::OUString sQuote = getMetaData()->getIdentifierQuoteString( 
 );
 
-       ::rtl::OUString sComposedName;
-       
::dbtools::composeTableName(getMetaData(),m_CatalogName,m_SchemaName,m_Name,sComposedName,sal_True,::dbtools::eInTableDefinitions);
+       ::rtl::OUString sComposedName( ::dbtools::composeTableName( 
getMetaData(), m_CatalogName, m_SchemaName, m_Name, sal_True, 
::dbtools::eInTableDefinitions ) );
        sSql += sComposedName;
 
        return sSql;
@@ -429,12 +428,11 @@
                ::rtl::OUString sCatalog,sSchema,sTable;
                
::dbtools::qualifiedNameComponents(getMetaData(),newName,sCatalog,sSchema,sTable,::dbtools::eInDataManipulation);
 
-               ::rtl::OUString sComposedName;
-               
::dbtools::composeTableName(getMetaData(),m_CatalogName,m_SchemaName,m_Name,sComposedName,sal_True,::dbtools::eInDataManipulation);
+               ::rtl::OUString sComposedName(
+            ::dbtools::composeTableName( getMetaData(), m_CatalogName, 
m_SchemaName, m_Name, sal_True, ::dbtools::eInDataManipulation ) );
                sSql += sComposedName
             + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" RENAME TO "));
-               
::dbtools::composeTableName(getMetaData(),sCatalog,sSchema,sTable,sComposedName,sal_True,::dbtools::eInDataManipulation);
-               sSql += sComposedName;
+               sSql += ::dbtools::composeTableName( getMetaData(), sCatalog, 
sSchema, sTable, sal_True, ::dbtools::eInDataManipulation );
 
         executeStatement(sSql);
 

File [changed]: HTables.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/hsqldb/HTables.cxx?r1=1.4&r2=1.4.104.1
Delta lines:  +6 -6
-------------------
--- HTables.cxx 8 Sep 2005 06:04:35 -0000       1.4
+++ HTables.cxx 23 May 2006 13:27:03 -0000      1.4.104.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: HTables.cxx,v $
  *
- *  $Revision: 1.4 $
+ *  $Revision: 1.4.104.1 $
  *
- *  last change: $Author: rt $ $Date: 2005/09/08 06:04:35 $
+ *  last change: $Author: fs $ $Date: 2006/05/23 13:27:03 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -195,8 +195,8 @@
                else
                        aSql += ::rtl::OUString::createFromAscii("TABLE ");
 
-               ::rtl::OUString sComposedName;
-               
::dbtools::composeTableName(m_xMetaData,sCatalog,sSchema,sTable,sComposedName,sal_True,::dbtools::eInDataManipulation);
+               ::rtl::OUString sComposedName(
+                   ::dbtools::composeTableName( m_xMetaData, sCatalog, 
sSchema, sTable, sal_True, ::dbtools::eInDataManipulation ) );
                aSql += sComposedName;
                Reference< XStatement > xStmt = xConnection->createStatement(  
);
                if ( xStmt.is() )
@@ -241,7 +241,7 @@
 ::rtl::OUString OTables::getNameForObject(const sdbcx::ObjectType& _xObject)
 {
     OSL_ENSURE(_xObject.is(),"OTables::getNameForObject: Object is NULL!");
-       return 
::dbtools::composeTableName(m_xMetaData,_xObject,sal_False,::dbtools::eInDataManipulation);
+       return ::dbtools::composeTableName( m_xMetaData, _xObject, 
::dbtools::eInDataManipulation, false, false, false );
 }
 // 
-----------------------------------------------------------------------------
 

File [changed]: HViews.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/hsqldb/HViews.cxx?r1=1.3&r2=1.3.104.1
Delta lines:  +6 -6
-------------------
--- HViews.cxx  8 Sep 2005 06:05:46 -0000       1.3
+++ HViews.cxx  23 May 2006 13:27:04 -0000      1.3.104.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: HViews.cxx,v $
  *
- *  $Revision: 1.3 $
+ *  $Revision: 1.3.104.1 $
  *
- *  last change: $Author: rt $ $Date: 2005/09/08 06:05:46 $
+ *  last change: $Author: fs $ $Date: 2006/05/23 13:27:04 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -162,7 +162,7 @@
                ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("DROP 
VIEW");
                
                Reference<XPropertySet> xProp(xTunnel,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(  
);
@@ -186,7 +186,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;
@@ -203,7 +203,7 @@
        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);
        }
 }

Directory: /dba/connectivity/source/drivers/mysql/
==================================================

File [changed]: YTable.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/mysql/YTable.cxx?r1=1.6&r2=1.6.104.1
Delta lines:  +5 -5
-------------------
--- YTable.cxx  8 Sep 2005 06:31:54 -0000       1.6
+++ YTable.cxx  23 May 2006 13:27:05 -0000      1.6.104.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: YTable.cxx,v $
  *
- *  $Revision: 1.6 $
+ *  $Revision: 1.6.104.1 $
  *
- *  last change: $Author: rt $ $Date: 2005/09/08 06:31:54 $
+ *  last change: $Author: fs $ $Date: 2006/05/23 13:27:05 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -372,8 +372,8 @@
        ::rtl::OUString sSql = ::rtl::OUString::createFromAscii("ALTER TABLE ");
        const ::rtl::OUString sQuote = getMetaData()->getIdentifierQuoteString( 
 );
 
-       ::rtl::OUString sComposedName;
-       
::dbtools::composeTableName(getMetaData(),m_CatalogName,m_SchemaName,m_Name,sComposedName,sal_True,::dbtools::eInTableDefinitions);
+       ::rtl::OUString sComposedName(
+           ::dbtools::composeTableName( getMetaData(), m_CatalogName, 
m_SchemaName, m_Name, sal_True, ::dbtools::eInTableDefinitions ) );
        sSql += sComposedName;
 
        return sSql;

File [changed]: YTables.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/mysql/YTables.cxx?r1=1.7&r2=1.7.104.1
Delta lines:  +6 -6
-------------------
--- YTables.cxx 8 Sep 2005 06:32:07 -0000       1.7
+++ YTables.cxx 23 May 2006 13:27:05 -0000      1.7.104.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: YTables.cxx,v $
  *
- *  $Revision: 1.7 $
+ *  $Revision: 1.7.104.1 $
  *
- *  last change: $Author: rt $ $Date: 2005/09/08 06:32:07 $
+ *  last change: $Author: fs $ $Date: 2006/05/23 13:27:05 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -212,8 +212,8 @@
                else
                        aSql += ::rtl::OUString::createFromAscii("TABLE ");
 
-               ::rtl::OUString sComposedName;
-               
::dbtools::composeTableName(m_xMetaData,sCatalog,sSchema,sTable,sComposedName,sal_True,::dbtools::eInDataManipulation);
+               ::rtl::OUString sComposedName(
+                   ::dbtools::composeTableName( m_xMetaData, sCatalog, 
sSchema, sTable, sal_True, ::dbtools::eInDataManipulation ) );
                aSql += sComposedName;
                Reference< XStatement > xStmt = xConnection->createStatement(  
);
                if ( xStmt.is() )
@@ -258,7 +258,7 @@
 ::rtl::OUString OTables::getNameForObject(const sdbcx::ObjectType& _xObject)
 {
     OSL_ENSURE(_xObject.is(),"OTables::getNameForObject: Object is NULL!");
-       return 
::dbtools::composeTableName(m_xMetaData,_xObject,sal_False,::dbtools::eInDataManipulation);
+       return ::dbtools::composeTableName( m_xMetaData, _xObject, 
::dbtools::eInDataManipulation, false, false, false );
 }
 // 
-----------------------------------------------------------------------------
 

File [changed]: YViews.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/mysql/YViews.cxx?r1=1.6&r2=1.6.104.1
Delta lines:  +6 -6
-------------------
--- YViews.cxx  8 Sep 2005 06:32:45 -0000       1.6
+++ YViews.cxx  23 May 2006 13:27:06 -0000      1.6.104.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: YViews.cxx,v $
  *
- *  $Revision: 1.6 $
+ *  $Revision: 1.6.104.1 $
  *
- *  last change: $Author: rt $ $Date: 2005/09/08 06:32:45 $
+ *  last change: $Author: fs $ $Date: 2006/05/23 13:27:06 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -162,7 +162,7 @@
                ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("DROP 
VIEW");
                
                Reference<XPropertySet> xProp(xTunnel,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(  
);
@@ -186,7 +186,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;
@@ -203,7 +203,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]

Reply via email to