pgLab/pglablib/PgIndex.h

45 lines
1.1 KiB
C
Raw Normal View History

2017-12-16 21:43:51 +01:00
#ifndef PGINDEX_H
#define PGINDEX_H
#include "PgObject.h"
2017-12-16 21:43:51 +01:00
#include "Pgsql_declare.h"
#include <QString>
#include <vector>
class PgIndex : public PgObject {
2017-12-16 21:43:51 +01:00
public:
Oid indexrelid = InvalidOid; // oid of pg_class for this index
Oid relid = InvalidOid; // oid of table (pg_class) where this is an index on
2017-12-17 11:28:20 +01:00
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;
QString definition;
2017-12-16 21:43:51 +01:00
PgIndex();
explicit PgIndex(std::weak_ptr<PgDatabaseCatalog> cat);
QString getAm() const;
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