Tag: cws_src680_dba24a
User: oj      
Date: 2007-08-28 06:58:50+0000
Modified:
   dba/connectivity/inc/connectivity/dbmetadata.hxx
   dba/connectivity/source/commontools/dbmetadata.cxx

Log:
 #i68858# enable relation for mysql inodb

File Changes:

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

File [changed]: dbmetadata.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/connectivity/inc/connectivity/dbmetadata.hxx?r1=1.4&r2=1.4.82.1
Delta lines:  +14 -8
--------------------
--- dbmetadata.hxx      2006-12-13 16:11:26+0000        1.4
+++ dbmetadata.hxx      2007-08-28 06:58:47+0000        1.4.82.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: dbmetadata.hxx,v $
  *
- *  $Revision: 1.4 $
+ *  $Revision: 1.4.82.1 $
  *
- *  last change: $Author: kz $ $Date: 2006/12/13 16:11:26 $
+ *  last change: $Author: oj $ $Date: 2007/08/28 06:58:47 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -109,10 +109,10 @@
         }
 
         /// wraps XDatabaseMetaData::getIdentifierQuoteString
-        const ::rtl::OUString&  SAL_CALL getIdentifierQuoteString() const;
+        const ::rtl::OUString&  getIdentifierQuoteString() const;
 
         /// wraps XDatabaseMetaData::getCatalogSeparator
-        const ::rtl::OUString&  SAL_CALL getCatalogSeparator() const;
+        const ::rtl::OUString&  getCatalogSeparator() const;
 
         /** determines whether the database supports sub queries in the FROM 
part
             of a SELECT clause are supported.
@@ -120,14 +120,14 @@
                 with SQLState 08003 (connection does not exist) if the 
instances was
                 default-constructed and does not have a connection, yet.
         */
-        bool SAL_CALL supportsSubqueriesInFrom() const;
+        bool supportsSubqueriesInFrom() const;
 
         /** determines whether names in the database should be restricted to 
SQL-92 identifiers
 
             Effectively, this method checks the EnableSQL92Check property of 
the data source settings,
             if present.
         */
-        bool SAL_CALL restrictIdentifiersToSQL92() const;
+        bool restrictIdentifiersToSQL92() const;
 
         /** determines whether when generating SQL statements, an AS keyword 
should be generated
             before a correlation name.
@@ -135,7 +135,13 @@
             E.g., it determines whether <code>SELECT * FROM table AS 
correlation_name</code> or
             <code>SELECT * FROM table correlation_name</code> is generated.
         */
-        bool SAL_CALL generateASBeforeCorrelationName() const;
+        bool generateASBeforeCorrelationName() const;
+
+        /** 
+        *
+        * \return <TRUE/> when relations are supported, otherwise <FALSE/>
+        */
+        bool supportsRelations() const;
        };
 
 //........................................................................

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

File [changed]: dbmetadata.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/connectivity/source/commontools/dbmetadata.cxx?r1=1.5&r2=1.5.82.1
Delta lines:  +30 -8
--------------------
--- dbmetadata.cxx      2006-12-13 16:13:43+0000        1.5
+++ dbmetadata.cxx      2007-08-28 06:58:48+0000        1.5.82.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: dbmetadata.cxx,v $
  *
- *  $Revision: 1.5 $
+ *  $Revision: 1.5.82.1 $
  *
- *  last change: $Author: kz $ $Date: 2006/12/13 16:13:43 $
+ *  last change: $Author: oj $ $Date: 2007/08/28 06:58:48 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -220,7 +220,7 @@
     }
 
     //--------------------------------------------------------------------
-    bool SAL_CALL DatabaseMetaData::supportsSubqueriesInFrom() const
+    bool DatabaseMetaData::supportsSubqueriesInFrom() const
     {
         lcl_checkConnected( *m_pImpl );
 
@@ -240,19 +240,19 @@
     }
 
     //--------------------------------------------------------------------
-    const ::rtl::OUString&  SAL_CALL 
DatabaseMetaData::getIdentifierQuoteString() const
+    const ::rtl::OUString&  DatabaseMetaData::getIdentifierQuoteString() const
     {
         return lcl_getConnectionStringSetting( *m_pImpl, 
m_pImpl->sCachedIdentifierQuoteString, 
&XDatabaseMetaData::getIdentifierQuoteString );
     }
 
     //--------------------------------------------------------------------
-    const ::rtl::OUString&  SAL_CALL DatabaseMetaData::getCatalogSeparator() 
const
+    const ::rtl::OUString&  DatabaseMetaData::getCatalogSeparator() const
     {
         return lcl_getConnectionStringSetting( *m_pImpl, 
m_pImpl->sCachedCatalogSeparator, &XDatabaseMetaData::getCatalogSeparator );
     }
 
     //--------------------------------------------------------------------
-    bool SAL_CALL DatabaseMetaData::restrictIdentifiersToSQL92() const
+    bool DatabaseMetaData::restrictIdentifiersToSQL92() const
     {
         lcl_checkConnected( *m_pImpl );
 
@@ -264,7 +264,7 @@
     }
 
     //--------------------------------------------------------------------
-    bool SAL_CALL DatabaseMetaData::generateASBeforeCorrelationName() const
+    bool DatabaseMetaData::generateASBeforeCorrelationName() const
     {
         bool doGenerate( true );
         Any setting;
@@ -273,6 +273,28 @@
         return doGenerate;
     }
 
+    //--------------------------------------------------------------------
+    bool DatabaseMetaData::supportsRelations() const
+    {
+        lcl_checkConnected( *m_pImpl );
+        bool bSupport = false;
+        try
+        {
+            bSupport = 
m_pImpl->xConnectionMetaData->supportsIntegrityEnhancementFacility();
+            if ( !bSupport )
+            {
+                const ::rtl::OUString url = 
m_pImpl->xConnectionMetaData->getURL();
+                char pMySQL[] = "sdbc:mysql:";
+                           bSupport = 
url.matchAsciiL(pMySQL,(sizeof(pMySQL)/sizeof(pMySQL[0]))-1);
+            }
+        }
+        catch( const Exception& )
+        {
+               DBG_UNHANDLED_EXCEPTION();
+        }
+        return bSupport;
+    }
+
 //........................................................................
 } // namespace dbtools
 //........................................................................




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

Reply via email to