Tag: cws_src680_dba24a
User: oj      
Date: 2007-09-25 10:37:17+0000
Modified:
   dba/connectivity/source/commontools/TKeys.cxx
   dba/connectivity/source/drivers/mysql/YTable.cxx

Log:
 #i81922# new method to get drop stmt

File Changes:

Directory: /dba/connectivity/source/commontools/
================================================

File [changed]: TKeys.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/connectivity/source/commontools/TKeys.cxx?r1=1.10&r2=1.10.118.1
Delta lines:  +9 -4
-------------------
--- TKeys.cxx   2006-09-17 02:00:42+0000        1.10
+++ TKeys.cxx   2007-09-25 10:37:15+0000        1.10.118.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: TKeys.cxx,v $
  *
- *  $Revision: 1.10 $
+ *  $Revision: 1.10.118.1 $
  *
- *  last change: $Author: obo $ $Date: 2006/09/17 02:00:42 $
+ *  last change: $Author: oj $ $Date: 2007/09/25 10:37:15 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -308,6 +308,11 @@
 
     return createObject( sNewName );
 }
+// 
-----------------------------------------------------------------------------
+::rtl::OUString OKeysHelper::getDropForeignKey() const
+{
+    return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" DROP CONSTRAINT "));
+}
 // -------------------------------------------------------------------------
 // XDrop
 void OKeysHelper::dropObject(sal_Int32 _nPos,const ::rtl::OUString 
_sElementName)
@@ -332,7 +337,7 @@
                }
                else
                {
-                       aSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" 
DROP CONSTRAINT "));
+                       aSql += getDropForeignKey();
                        ::rtl::OUString aQuote  = 
m_pTable->getConnection()->getMetaData()->getIdentifierQuoteString();
                        aSql += ::dbtools::quoteName( aQuote,_sElementName);
                }

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.10&r2=1.10.118.1
Delta lines:  +25 -4
--------------------
--- YTable.cxx  2006-09-17 03:03:45+0000        1.10
+++ YTable.cxx  2007-09-25 10:37:15+0000        1.10.118.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: YTable.cxx,v $
  *
- *  $Revision: 1.10 $
+ *  $Revision: 1.10.118.1 $
  *
- *  last change: $Author: obo $ $Date: 2006/09/17 03:03:45 $
+ *  last change: $Author: oj $ $Date: 2007/09/25 10:37:15 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -109,6 +109,27 @@
 using namespace ::com::sun::star::sdbc;
 using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::lang;
+namespace connectivity
+{
+    namespace mysql
+    {
+        class OMySQLKeysHelper : public OKeysHelper
+        {
+        protected:
+            // 
-----------------------------------------------------------------------------
+            virtual ::rtl::OUString getDropForeignKey() const
+            {
+                return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" DROP 
FOREIGN KEY "));
+            }
+        public:
+            OMySQLKeysHelper(  OTableHelper* _pTable,
+                               ::osl::Mutex& _rMutex,
+                               const TStringVector& _rVector
+                ) : OKeysHelper(_pTable,_rMutex,_rVector){}
+
+        };
+    }
+}
 
 OMySQLTable::OMySQLTable(      sdbcx::OCollection* _pTables,
                                                   const Reference<     
XConnection >& _xConnection)
@@ -174,7 +195,7 @@
 // 
-----------------------------------------------------------------------------
 sdbcx::OCollection* OMySQLTable::createKeys(const TStringVector& _rNames)
 {
-       return new OKeysHelper(this,m_aMutex,_rNames);
+       return new OMySQLKeysHelper(this,m_aMutex,_rNames);
 }
 // 
-----------------------------------------------------------------------------
 sdbcx::OCollection* OMySQLTable::createIndexes(const TStringVector& _rNames)




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to