Moved several files from pglab project to pglablib
This commit is contained in:
parent
206d734ff5
commit
f4538069cb
44 changed files with 45 additions and 44 deletions
31
pglablib/PgDatabase.h
Normal file
31
pglablib/PgDatabase.h
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
#ifndef PGDATABASE_H
|
||||
#define PGDATABASE_H
|
||||
|
||||
#include <QString>
|
||||
#include <libpq-fe.h>
|
||||
|
||||
class PgDatabase {
|
||||
public:
|
||||
PgDatabase();
|
||||
|
||||
Oid oid = InvalidOid;
|
||||
QString name;
|
||||
Oid dba; // owner?
|
||||
int encoding;
|
||||
QString collate;
|
||||
QString ctype;
|
||||
bool isTemplate;
|
||||
bool allowConn;
|
||||
int connLimit;
|
||||
Oid tablespace;
|
||||
QString acl;//"ARRAY";"YES"
|
||||
|
||||
bool isValid() const { return oid != InvalidOid; }
|
||||
|
||||
bool operator==(Oid _oid) const { return oid == _oid; }
|
||||
bool operator==(const QString &n) const { return name == n; }
|
||||
bool operator<(Oid _oid) const { return oid < _oid; }
|
||||
bool operator<(const PgDatabase &rhs) const { return oid < rhs.oid; }
|
||||
};
|
||||
|
||||
#endif // PGDATABASE_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue