pgLab/pglablib/catalog/PgIndex.h

46 lines
1.2 KiB
C
Raw Normal View History

2017-12-16 21:43:51 +01:00
#ifndef PGINDEX_H
#define PGINDEX_H
#include "PgNamespaceObject.h"
2017-12-16 21:43:51 +01:00
#include "Pgsql_declare.h"
#include <QString>
#include <vector>
class PgIndex : public PgNamespaceObject {
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
using PgNamespaceObject::PgNamespaceObject;
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; }
QString createSql() const;
QString dropSql() const;
2017-12-16 21:43:51 +01:00
};
#endif // PGINDEX_H