Added list of databases and roles.
Roles works for atleast 9.3 and up. Reorganizing code for communicating with database.
This commit is contained in:
parent
8c077b3d5f
commit
2d962334da
28 changed files with 881 additions and 428 deletions
|
|
@ -5,11 +5,17 @@
|
|||
#include <vector>
|
||||
#include <pgsql/libpq-fe.h>
|
||||
|
||||
class PgsqlDatabaseCatalogue;
|
||||
|
||||
template<typename T>
|
||||
class PgContainer {
|
||||
public:
|
||||
using t_Container = std::vector<T>; ///< Do not assume it will stay a vector only expect bidirectional access
|
||||
|
||||
explicit PgContainer(PgsqlDatabaseCatalogue *cat)
|
||||
: m_catalogue(cat)
|
||||
{}
|
||||
|
||||
typename t_Container::const_iterator begin() const
|
||||
{
|
||||
return m_container.begin();
|
||||
|
|
@ -54,6 +60,7 @@ public:
|
|||
return m_container.at(idx);
|
||||
}
|
||||
protected:
|
||||
PgsqlDatabaseCatalogue *m_catalogue;
|
||||
t_Container m_container;
|
||||
private:
|
||||
T m_invalidInstance;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue