pgLab/pglab/PgAuthId.h
Eelke Klein 04723a289b Switching to linux for development of pglab.
Switched from qmake to cmake. Code changes to make it compile.
2017-08-23 08:10:01 +02:00

32 lines
662 B
C++

#ifndef PGAUTHID_H
#define PGAUTHID_H
#include <pgsql/libpq-fe.h>
#include <QString>
#include <QDateTime>
class PgAuthId {
public:
PgAuthId();
Oid oid = InvalidOid;
QString name;
bool super;
bool inherit;
bool createRole;
bool createDB;
bool canlogin;
bool replication;
bool bypassRls;
int connLimit;
QDateTime validUntil;
bool valid() 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 PgAuthId &rhs) const { return oid < rhs.oid; }
};
#endif // PGAUTHID_H