Make PgAuthId inherit PgServerObject and related changes.
This commit is contained in:
parent
c2c01cf431
commit
0b6c1a8544
8 changed files with 33 additions and 16 deletions
|
|
@ -1,16 +1,19 @@
|
|||
#ifndef PGAUTHID_H
|
||||
#define PGAUTHID_H
|
||||
|
||||
#include "PgServerObject.h"
|
||||
#include <libpq-fe.h>
|
||||
#include <QString>
|
||||
#include <QDateTime>
|
||||
|
||||
class PgAuthId {
|
||||
/**
|
||||
* @brief The PgAuthId class
|
||||
*
|
||||
* An AuthId is a database role
|
||||
*/
|
||||
class PgAuthId: public PgServerObject {
|
||||
public:
|
||||
PgAuthId();
|
||||
|
||||
Oid oid = InvalidOid;
|
||||
QString name;
|
||||
bool super;
|
||||
bool inherit;
|
||||
bool createRole;
|
||||
|
|
@ -21,12 +24,9 @@ public:
|
|||
int connLimit;
|
||||
QDateTime validUntil;
|
||||
|
||||
bool valid() const { return oid != InvalidOid; }
|
||||
using PgServerObject::PgServerObject;
|
||||
QString typeName() const override;
|
||||
|
||||
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 PgAuthId &rhs) const { return oid < rhs.oid; }
|
||||
};
|
||||
|
||||
#endif // PGAUTHID_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue