summaryrefslogtreecommitdiff
path: root/connectivity/inc
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2008-06-06 12:14:21 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2008-06-06 12:14:21 +0000
commite28234ab9ecfc129db236d81d7089acf7ab43b8f (patch)
tree8e32592836e851277fad26c36448bb952329578b /connectivity/inc
parentf100941940bff65e554d2b5dec1f95c145851b55 (diff)
INTEGRATION: CWS dba30c (1.6.10); FILE MERGED
2008/05/08 12:54:45 oj 1.6.10.3: #i64472# use of create pattern 2008/05/08 07:14:48 oj 1.6.10.2: #i87131# collect keys only once, getKeys always refetch keys 2008/05/05 10:57:50 oj 1.6.10.1: #i87131# collect keys only once, getKeys always refetch the keys
Diffstat (limited to 'connectivity/inc')
-rw-r--r--connectivity/inc/connectivity/TTableHelper.hxx17
1 files changed, 14 insertions, 3 deletions
diff --git a/connectivity/inc/connectivity/TTableHelper.hxx b/connectivity/inc/connectivity/TTableHelper.hxx
index e1a22be26d..cff6488a2d 100644
--- a/connectivity/inc/connectivity/TTableHelper.hxx
+++ b/connectivity/inc/connectivity/TTableHelper.hxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: TTableHelper.hxx,v $
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
* This file is part of OpenOffice.org.
*
@@ -32,7 +32,9 @@
#define CONNECTIVITY_TABLEHELPER_HXX
#include "connectivity/sdbcx/VTable.hxx"
+#include "connectivity/sdbcx/VKey.hxx"
#include "connectivity/StdTypeDefs.hxx"
+#include <comphelper/stl_types.hxx>
namespace connectivity
{
@@ -40,13 +42,16 @@ namespace connectivity
::rtl::OUString getTypeString(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xColProp);
+ DECLARE_STL_USTRINGACCESS_MAP( sdbcx::TKeyProperties , TKeyMap);
+
class OTableHelper : public OTable_TYPEDEF
{
+ TKeyMap m_aKeys;
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData > m_xMetaData;
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > m_xConnection;
- void refreshPrimaryKeys(std::vector< ::rtl::OUString>& _rKeys);
- void refreshForgeinKeys(std::vector< ::rtl::OUString>& _rKeys);
+ void refreshPrimaryKeys(TStringVector& _rKeys);
+ void refreshForgeinKeys(TStringVector& _rKeys);
protected:
/** creates the column collection for the table
@@ -109,6 +114,12 @@ namespace connectivity
virtual void SAL_CALL alterColumnByIndex( sal_Int32 index, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& descriptor ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
// XNamed
virtual ::rtl::OUString SAL_CALL getName() throw(::com::sun::star::uno::RuntimeException);
+
+ // helper method to get key properties
+ sdbcx::TKeyProperties getKeyProperties(const ::rtl::OUString& _sName) const;
+ void addKey(const ::rtl::OUString& _sName,const sdbcx::TKeyProperties& _aKeyProperties);
+
+ virtual ::rtl::OUString getTypeCreatePattern() const;
};
}
#endif // CONNECTIVITY_TABLEHELPER_HXX