Tag: cws_src680_dba205a
User: oj      
Date: 2006/07/28 06:07:45

Modified:
   dba/connectivity/inc/connectivity/TTableHelper.hxx
   dba/connectivity/source/commontools/TTableHelper.cxx
   dba/connectivity/source/drivers/mysql/YTable.cxx
   dba/connectivity/source/inc/mysql/YTable.hxx

Log:
 #i67014# rename view for mysql impl

File Changes:

Directory: /dba/connectivity/inc/connectivity/
==============================================

File [changed]: TTableHelper.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/connectivity/inc/connectivity/TTableHelper.hxx?r1=1.3&r2=1.3.132.1
Delta lines:  +9 -3
-------------------
--- TTableHelper.hxx    8 Sep 2005 05:00:11 -0000       1.3
+++ TTableHelper.hxx    28 Jul 2006 13:07:41 -0000      1.3.132.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: TTableHelper.hxx,v $
  *
- *  $Revision: 1.3 $
+ *  $Revision: 1.3.132.1 $
  *
- *  last change: $Author: rt $ $Date: 2005/09/08 05:00:11 $
+ *  last change: $Author: oj $ $Date: 2006/07/28 13:07:41 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -79,6 +79,12 @@
                /** this function is called upon disposing the component
                */
                virtual void SAL_CALL disposing();
+
+        /** The default returns "RENAME TABLE " or "RENAME VIEW " depending on 
the type.
+        *
+        * \return The start of the rename statement.
+        */
+        virtual ::rtl::OUString getRenameStart() const;
 
        public:
                virtual void refreshColumns();

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

File [changed]: TTableHelper.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/connectivity/source/commontools/TTableHelper.cxx?r1=1.5&r2=1.5.10.1
Delta lines:  +15 -9
--------------------
--- TTableHelper.cxx    10 Jul 2006 14:19:45 -0000      1.5
+++ TTableHelper.cxx    28 Jul 2006 13:07:41 -0000      1.5.10.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: TTableHelper.cxx,v $
  *
- *  $Revision: 1.5 $
+ *  $Revision: 1.5.10.1 $
  *
- *  last change: $Author: obo $ $Date: 2006/07/10 14:19:45 $
+ *  last change: $Author: oj $ $Date: 2006/07/28 13:07:41 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -262,6 +262,17 @@
        else
                m_pIndexes      = createIndexes(aVector);
 }
+// 
-----------------------------------------------------------------------------
+::rtl::OUString OTableHelper::getRenameStart() const
+{
+    ::rtl::OUString sSql(RTL_CONSTASCII_USTRINGPARAM("RENAME "));
+    if ( m_Type == ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VIEW")) )
+           sSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" VIEW "));
+    else
+           sSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" TABLE "));
+
+    return sSql;
+}
 // -------------------------------------------------------------------------
 // XRename
 void SAL_CALL OTableHelper::rename( const ::rtl::OUString& newName ) 
throw(SQLException, ElementExistException, RuntimeException)
@@ -277,12 +288,7 @@
 
        if(!isNew())
        {
-               ::rtl::OUString sSql = 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RENAME "));
-               if ( m_Type == 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VIEW")) )
-                       sSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" 
VIEW "));
-               else
-                       sSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" 
TABLE "));
-
+               ::rtl::OUString sSql = getRenameStart();
                ::rtl::OUString sQuote = 
getMetaData()->getIdentifierQuoteString(  );
 
                ::rtl::OUString sCatalog,sSchema,sTable;

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.8&r2=1.8.10.1
Delta lines:  +7 -3
-------------------
--- YTable.cxx  10 Jul 2006 14:30:42 -0000      1.8
+++ YTable.cxx  28 Jul 2006 13:07:41 -0000      1.8.10.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: YTable.cxx,v $
  *
- *  $Revision: 1.8 $
+ *  $Revision: 1.8.10.1 $
  *
- *  last change: $Author: obo $ $Date: 2006/07/10 14:30:42 $
+ *  last change: $Author: oj $ $Date: 2006/07/28 13:07:41 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -388,6 +388,10 @@
        }
 }
 // 
-----------------------------------------------------------------------------
+::rtl::OUString OMySQLTable::getRenameStart() const
+{
+    return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RENAME TABLE "));
+}
 
 
 

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

File [changed]: YTable.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/connectivity/source/inc/mysql/YTable.hxx?r1=1.4&r2=1.4.18.1
Delta lines:  +10 -3
--------------------
--- YTable.hxx  20 Jun 2006 02:04:54 -0000      1.4
+++ YTable.hxx  28 Jul 2006 13:07:42 -0000      1.4.18.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: YTable.hxx,v $
  *
- *  $Revision: 1.4 $
+ *  $Revision: 1.4.18.1 $
  *
- *  last change: $Author: hr $ $Date: 2006/06/20 02:04:54 $
+ *  last change: $Author: oj $ $Date: 2006/07/28 13:07:42 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -84,6 +84,13 @@
                                        The index names.
                        */
                        virtual sdbcx::OCollection* createIndexes(const 
TStringVector& _rNames);
+
+            /** Returns always "RENAME TABLE " even for views.
+            *
+            * \return The start of the rename statement.
+            * @see http://dev.mysql.com/doc/refman/5.1/de/rename-table.html
+            */
+            virtual ::rtl::OUString getRenameStart() const;
 
                        /** used to implement the creation of the array helper 
which is shared amongst all instances of the class.
                                This method needs to be implemented in derived 
classes.




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

Reply via email to