kDB: Knowledge DataBase
Loading...
Searching...
No Matches
ConnectionHandle_p.h
1#pragma once
2
3#include <libpq-fe.h>
4
5#include "Connection.h"
6
7namespace kDB
8{
9 namespace Repository
10 {
16 class ConnectionHandle
17 {
18 ConnectionHandle(const ConnectionHandle& _rhs);
19 ConnectionHandle& operator=(const ConnectionHandle& _rhs);
20 public:
21 ConnectionHandle(const Connection& _cp, bool _force = false);
22 ~ConnectionHandle();
23 PGconn* connection() { return m_conn; }
24 void release();
25 private:
26 Connection m_cp;
27 PGconn* m_conn = nullptr;
28 };
29 }
30}