2017-12-16 21:43:51 +01:00
|
|
|
|
#ifndef PGINDEX_H
|
|
|
|
|
|
#define PGINDEX_H
|
|
|
|
|
|
|
|
|
|
|
|
#include "Pgsql_declare.h"
|
|
|
|
|
|
#include <QString>
|
|
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
|
|
|
|
class PgIndex {
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
2017-12-17 11:28:20 +01:00
|
|
|
|
Oid indexrelid = InvalidOid;
|
|
|
|
|
|
Oid relid = InvalidOid;
|
|
|
|
|
|
int16_t natts = 0;
|
|
|
|
|
|
bool isunique = false;
|
|
|
|
|
|
bool isprimary = false;
|
|
|
|
|
|
bool isexclusion = false;
|
|
|
|
|
|
bool immediate = false;
|
|
|
|
|
|
bool isclustered = false;
|
|
|
|
|
|
bool isvalid = false;
|
|
|
|
|
|
bool checkxmin = false;
|
|
|
|
|
|
bool isready = false;
|
|
|
|
|
|
bool islive = false;
|
|
|
|
|
|
bool isreplident = false;
|
|
|
|
|
|
std::vector<int16_t> key;
|
|
|
|
|
|
std::vector<Oid> collation;
|
2017-12-16 21:43:51 +01:00
|
|
|
|
std::vector<Oid> indclass;
|
2017-12-17 11:28:20 +01:00
|
|
|
|
std::vector<int16_t> option;
|
|
|
|
|
|
QString exprs;
|
|
|
|
|
|
QString pred;
|
2017-12-16 21:43:51 +01:00
|
|
|
|
|
|
|
|
|
|
PgIndex();
|
2017-12-17 11:28:20 +01:00
|
|
|
|
|
|
|
|
|
|
bool operator==(Oid _oid) const { return indexrelid == _oid; }
|
|
|
|
|
|
//bool operator==(const QString &n) const { return name == n; }
|
|
|
|
|
|
bool operator<(Oid _oid) const { return indexrelid < _oid; }
|
|
|
|
|
|
bool operator<(const PgIndex &rhs) const { return indexrelid < rhs.indexrelid; }
|
2017-12-16 21:43:51 +01:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif // PGINDEX_H
|