summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/postgresql/pq_connection.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'connectivity/source/drivers/postgresql/pq_connection.hxx')
-rw-r--r--connectivity/source/drivers/postgresql/pq_connection.hxx19
1 files changed, 8 insertions, 11 deletions
diff --git a/connectivity/source/drivers/postgresql/pq_connection.hxx b/connectivity/source/drivers/postgresql/pq_connection.hxx
index f8d19c406b18..2bba070a7273 100644
--- a/connectivity/source/drivers/postgresql/pq_connection.hxx
+++ b/connectivity/source/drivers/postgresql/pq_connection.hxx
@@ -34,8 +34,7 @@
*
************************************************************************/
-#ifndef INCLUDED_CONNECTIVITY_SOURCE_DRIVERS_POSTGRESQL_PQ_CONNECTION_HXX
-#define INCLUDED_CONNECTIVITY_SOURCE_DRIVERS_POSTGRESQL_PQ_CONNECTION_HXX
+#pragma once
#include <config_lgpl.h>
#include <com/sun/star/uno/XComponentContext.hpp>
@@ -61,19 +60,18 @@
#include <libpq-fe.h>
#include <unordered_map>
+#include "pq_xtables.hxx"
+#include "pq_xviews.hxx"
+
namespace pq_sdbc_driver
{
struct ConnectionSettings;
-class Tables;
-class Views;
struct ConnectionSettings
{
ConnectionSettings() :
pConnection(nullptr),
maxNameLen(0),
- maxIndexKeys(0),
- pTablesImpl(nullptr),
- pViewsImpl(nullptr)
+ maxIndexKeys(0)
{}
static const rtl_TextEncoding encoding = RTL_TEXTENCODING_UTF8;
PGconn *pConnection;
@@ -83,8 +81,8 @@ struct ConnectionSettings
css::uno::Reference< css::container::XNameAccess > tables;
css::uno::Reference< css::container::XNameAccess > users;
css::uno::Reference< css::container::XNameAccess > views;
- Tables *pTablesImpl; // needed to implement renaming of tables / views
- Views *pViewsImpl; // needed to implement renaming of tables / views
+ rtl::Reference<Tables> pTablesImpl; // needed to implement renaming of tables / views
+ rtl::Reference<Views> pViewsImpl; // needed to implement renaming of tables / views
OUString user;
OUString catalog;
};
@@ -136,7 +134,7 @@ private:
public:
Connection(
const rtl::Reference< comphelper::RefCountedMutex > &refMutex,
- const css::uno::Reference< css::uno::XComponentContext > & ctx );
+ css::uno::Reference< css::uno::XComponentContext > ctx );
virtual ~Connection( ) override;
@@ -192,6 +190,5 @@ public: // helper function
};
}
-#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */