2017-02-12 14:03:42 +01:00
|
|
|
|
#ifndef PGDATABASE_H
|
|
|
|
|
|
#define PGDATABASE_H
|
|
|
|
|
|
|
2018-11-25 19:45:06 +01:00
|
|
|
|
#include "PgServerObject.h"
|
2017-02-12 14:03:42 +01:00
|
|
|
|
#include <QString>
|
2017-08-23 13:27:23 +02:00
|
|
|
|
#include <libpq-fe.h>
|
2017-02-12 14:03:42 +01:00
|
|
|
|
|
2018-11-25 19:45:06 +01:00
|
|
|
|
class PgDatabase: public PgServerObject {
|
2017-02-12 14:03:42 +01:00
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
|
|
Oid dba; // owner?
|
|
|
|
|
|
int encoding;
|
2021-03-10 20:49:03 +01:00
|
|
|
|
QString encodingString;
|
2017-02-12 14:03:42 +01:00
|
|
|
|
QString collate;
|
|
|
|
|
|
QString ctype;
|
|
|
|
|
|
bool isTemplate;
|
|
|
|
|
|
bool allowConn;
|
|
|
|
|
|
int connLimit;
|
|
|
|
|
|
Oid tablespace;
|
2021-03-11 06:59:31 +01:00
|
|
|
|
QString description;
|
2017-02-12 14:03:42 +01:00
|
|
|
|
|
2018-11-25 19:45:06 +01:00
|
|
|
|
using PgServerObject::PgServerObject;
|
2017-02-12 14:03:42 +01:00
|
|
|
|
|
2018-11-25 19:45:06 +01:00
|
|
|
|
bool isValid() const { return oid() != InvalidOid; }
|
|
|
|
|
|
|
2018-12-24 11:31:56 +01:00
|
|
|
|
QString typeName() const override;
|
2017-02-12 14:03:42 +01:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif // PGDATABASE_H
|