Tag: cws_src680_qiq
User: fs      
Date: 06/05/23 06:02:13

Modified:
 /dba/connectivity/inc/connectivity/
  dbtools.hxx

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

File Changes:

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

File [changed]: dbtools.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/connectivity/inc/connectivity/dbtools.hxx?r1=1.29.96.1&r2=1.29.96.2
Delta lines:  +36 -18
---------------------
--- dbtools.hxx 11 May 2006 10:30:54 -0000      1.29.96.1
+++ dbtools.hxx 23 May 2006 13:02:10 -0000      1.29.96.2
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: dbtools.hxx,v $
  *
- *  $Revision: 1.29.96.1 $
+ *  $Revision: 1.29.96.2 $
  *
- *  last change: $Author: fs $ $Date: 2006/05/11 10:30:54 $
+ *  last change: $Author: fs $ $Date: 2006/05/23 13:02:10 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -106,7 +106,8 @@
                eInIndexDefinitions,
                eInDataManipulation,
                eInProcedureCalls,
-               eInPrivilegeDefinitions
+               eInPrivilegeDefinitions,
+        eComplete
        };
 //=========================================================================
        // date conversion
@@ -356,9 +357,7 @@
        */
        ::rtl::OUString quoteTableName(const ::com::sun::star::uno::Reference< 
::com::sun::star::sdbc::XDatabaseMetaData>& _rxMeta
                                                                        , const 
::rtl::OUString& _rName
-                                                                       
,EComposeRule _eComposeRule
-                                                                       
,sal_Bool _bUseCatalogInSelect = sal_True
-                                                                       
,sal_Bool _bUseSchemaInSelect = sal_True);
+                                                                       
,EComposeRule _eComposeRule);
 
        /** split a fully qualified table name (including catalog and schema, 
if appliable) into it's component parts.
                @param  _rxConnMetaData         meta data describing the 
connection where you got the table name from
@@ -448,16 +447,34 @@
        
//----------------------------------------------------------------------------------
        /** compose a complete table name from it's up to three parts, 
regarding to the database meta data composing rules
        */
-       void composeTableName(  const ::com::sun::star::uno::Reference< 
::com::sun::star::sdbc::XDatabaseMetaData >& _rxMetaData,
+       ::rtl::OUString composeTableName(       const 
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData >& 
_rxMetaData,
                                                        const ::rtl::OUString& 
_rCatalog,
                                                        const ::rtl::OUString& 
_rSchema,
                                                        const ::rtl::OUString& 
_rName,
-                                                       ::rtl::OUString& 
_rComposedName,
                                                        sal_Bool _bQuote,
-                                                       EComposeRule 
_eComposeRule
-                                                       ,sal_Bool 
_bUseCatalogInSelect = sal_True
-                                                       ,sal_Bool 
_bUseSchemaInSelect = sal_True);
+                                                       EComposeRule 
_eComposeRule);
 
+    /** composes a table name for usage in a SELECT statement
+
+        This includes quoting of the table as indicated by the connection's 
meta data, plus respecting
+        the settings "UseCatalogInSelect" and "UseSchemaInSelect", which might 
be present
+        in the data source which the connection belongs to.
+    */
+       ::rtl::OUString composeTableNameForSelect(
+                            const ::com::sun::star::uno::Reference< 
::com::sun::star::sdbc::XConnection >& _rxConnection,
+                                                       const ::rtl::OUString& 
_rCatalog,
+                                                       const ::rtl::OUString& 
_rSchema,
+                                                       const ::rtl::OUString& 
_rName );
+
+    /** composes a table name for usage in a SELECT statement
+
+        This includes quoting of the table as indicated by the connection's 
meta data, plus respecting
+        the settings "UseCatalogInSelect" and "UseSchemaInSelect", which might 
be present
+        in the data source which the connection belongs to.
+    */
+       ::rtl::OUString composeTableNameForSelect(
+                            const ::com::sun::star::uno::Reference< 
::com::sun::star::sdbc::XConnection >& _rxConnection,
+                                                       const 
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& 
_xTable );
        
//----------------------------------------------------------------------------------
        /** compose the table name out of the property set which must support 
the properties from the service <member scope= 
"com::sun::star::sdbcx">table</member>
                @param  _xMetaData
@@ -465,12 +482,13 @@
                @param  _xTable
                        The table.
        */
-       ::rtl::OUString composeTableName(const 
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData>& 
_xMetaData,
+       ::rtl::OUString composeTableName(
+        const ::com::sun::star::uno::Reference< 
::com::sun::star::sdbc::XDatabaseMetaData>& _xMetaData,
                                                                         const 
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& 
_xTable,
-                                                                        
sal_Bool _bQuote,
-                                                                        
EComposeRule _eComposeRule
-                                                                        
,sal_Bool _bUseCatalogInSelect = sal_True
-                                                                        
,sal_Bool _bUseSchemaInSelect = sal_True);
+               EComposeRule _eComposeRule,
+        bool _bSuppressCatalogName,
+        bool _bSuppressSchemaName,
+        bool _bQuote);
 
        
//----------------------------------------------------------------------------------
        sal_Int32 getSearchColumnFlag( const ::com::sun::star::uno::Reference< 
::com::sun::star::sdbc::XConnection>& _rxConn,




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

Reply via email to