pgLab/pglablib/catalog/PgIndex.h

47 lines
1 KiB
C
Raw Permalink 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 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;
int64_t sizeBytes;
2017-12-16 21:43:51 +01:00
using PgNamespaceObject::PgNamespaceObject;
QString getAm() const;
2017-12-17 11:28:20 +01:00
QString createSql() const override;
QString dropSql() const override;
QString typeName() const override;
/// Returns true when this index has been created as part of the creation
/// of a constaint.
bool isSupportingIndex() const;
2017-12-16 21:43:51 +01:00
};
#endif // PGINDEX_H