summaryrefslogtreecommitdiff
path: root/connectivity/inc
diff options
context:
space:
mode:
authorOcke Janssen <oj@openoffice.org>2002-10-07 12:09:48 +0000
committerOcke Janssen <oj@openoffice.org>2002-10-07 12:09:48 +0000
commit490501f728e64d8e1f7c1ac9d0740a54590c76b5 (patch)
treefaed6b232780bb91d22aa41c7a5885e4f83de956 /connectivity/inc
parent62577268f72c9ae9f77894784f9b713c5a122d2a (diff)
#i3289# correct table name quoting so that in every situation the correct schema, catalog is used
Diffstat (limited to 'connectivity/inc')
-rw-r--r--connectivity/inc/connectivity/dbtools.hxx20
-rw-r--r--connectivity/inc/connectivity/virtualdbtools.hxx28
2 files changed, 39 insertions, 9 deletions
diff --git a/connectivity/inc/connectivity/dbtools.hxx b/connectivity/inc/connectivity/dbtools.hxx
index 778274222e5e..d1e8ff2316a9 100644
--- a/connectivity/inc/connectivity/dbtools.hxx
+++ b/connectivity/inc/connectivity/dbtools.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: dbtools.hxx,v $
*
- * $Revision: 1.16 $
+ * $Revision: 1.17 $
*
- * last change: $Author: hr $ $Date: 2001-09-27 14:07:17 $
+ * last change: $Author: oj $ $Date: 2002-10-07 12:47:18 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -123,6 +123,14 @@ namespace task {
//.........................................................................
namespace dbtools
{
+ enum EComposeRule
+ {
+ eInTableDefinitions,
+ eInIndexDefinitions,
+ eInDataManipulation,
+ eInProcedureCalls,
+ eInPrivilegeDefinitions
+ };
//=========================================================================
// date conversion
@@ -211,7 +219,7 @@ namespace dbtools
/** quote the given table name (which may contain a catalog and a schema) according to the rules provided by the meta data
*/
- ::rtl::OUString quoteTableName(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData>& _rxMeta, const ::rtl::OUString& _rName);
+ ::rtl::OUString quoteTableName(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData>& _rxMeta, const ::rtl::OUString& _rName,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
@@ -219,9 +227,10 @@ namespace dbtools
@param _rCatalog (out parameter) upon return, contains the catalog name
@param _rSchema (out parameter) upon return, contains the schema name
@param _rName (out parameter) upon return, contains the table name
+ @param _eComposeRule where do you need the name for
*/
void qualifiedNameComponents(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData >& _rxConnMetaData,
- const ::rtl::OUString& _rQualifiedName, ::rtl::OUString& _rCatalog, ::rtl::OUString& _rSchema, ::rtl::OUString& _rName);
+ const ::rtl::OUString& _rQualifiedName, ::rtl::OUString& _rCatalog, ::rtl::OUString& _rSchema, ::rtl::OUString& _rName,EComposeRule _eComposeRule);
/** calculate a NumberFormatsSupplier for use with an given connection
@param _rxConn the connection for which the formatter is requested
@@ -278,7 +287,8 @@ namespace dbtools
const ::rtl::OUString& _rSchema,
const ::rtl::OUString& _rName,
::rtl::OUString& _rComposedName,
- sal_Bool _bQuote);
+ sal_Bool _bQuote,
+ EComposeRule _eComposeRule);
sal_Int32 getSearchColumnFlag( const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _rxConn,
sal_Int32 _nDataType);
diff --git a/connectivity/inc/connectivity/virtualdbtools.hxx b/connectivity/inc/connectivity/virtualdbtools.hxx
index 42140ccf8b8c..31b92631cef6 100644
--- a/connectivity/inc/connectivity/virtualdbtools.hxx
+++ b/connectivity/inc/connectivity/virtualdbtools.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: virtualdbtools.hxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: oj $ $Date: 2002-09-27 10:58:12 $
+ * last change: $Author: oj $ $Date: 2002-10-07 12:47:18 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -77,9 +77,7 @@
#ifndef _COM_SUN_STAR_SDBC_SQLEXCEPTION_HPP_
#include <com/sun/star/sdbc/SQLException.hpp>
#endif
-#ifndef _VECTOR_
#include <vector>
-#endif
//========================================================================
//= forward declarations
@@ -167,6 +165,10 @@ namespace connectivity
sal_Bool _bSetAsActiveConnection
) const SAL_THROW ( (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) ) = 0;
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> getRowSetConnection(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet>& _rxRowSet)
+ const SAL_THROW ( (::com::sun::star::uno::RuntimeException) ) = 0;
+
virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatsSupplier> getNumberFormats(
const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _rxConn,
sal_Bool _bAllowDefault
@@ -205,6 +207,21 @@ namespace connectivity
const ::rtl::OUString& _rsRegisteredName,
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory
) const = 0;
+
+ /** check if the property "Privileges" supports ::com::sun::star::sdbcx::Privilege::INSERT
+ @param _rxCursorSet the property set
+ */
+ virtual sal_Bool canInsert(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _rxCursorSet) const = 0;
+
+ /** check if the property "Privileges" supports ::com::sun::star::sdbcx::Privilege::UPDATE
+ @param _rxCursorSet the property set
+ */
+ virtual sal_Bool canUpdate(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _rxCursorSet) const = 0;
+
+ /** check if the property "Privileges" supports ::com::sun::star::sdbcx::Privilege::DELETE
+ @param _rxCursorSet the property set
+ */
+ virtual sal_Bool canDelete(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _rxCursorSet) const = 0;
};
//================================================================
@@ -330,6 +347,9 @@ namespace connectivity
/*************************************************************************
* history:
* $Log: not supported by cvs2svn $
+ * Revision 1.4 2002/09/27 10:58:12 oj
+ * #97230# new interface for ParseContext
+ *
* Revision 1.3 2001/08/13 14:53:21 fs
* #90761# +IDataAccessCharset / +createCharsetHelper
*