The list of indexes on a table now also shows the access method (ie btree)

This commit is contained in:
eelke 2018-08-25 18:11:12 +02:00
parent 7c4f1a4752
commit 50cb21b6f9
17 changed files with 198 additions and 26 deletions

View file

@ -1,15 +1,16 @@
#ifndef PGINDEX_H
#define PGINDEX_H
#include "PgObject.h"
#include "Pgsql_declare.h"
#include <QString>
#include <vector>
class PgIndex {
class PgIndex : public PgObject {
public:
Oid indexrelid = InvalidOid;
Oid relid = InvalidOid;
Oid indexrelid = InvalidOid; // oid of pg_class for this index
Oid relid = InvalidOid; // oid of table (pg_class) where this is an index on
int16_t natts = 0;
bool isunique = false;
bool isprimary = false;
@ -30,6 +31,9 @@ public:
QString definition;
PgIndex();
explicit PgIndex(std::weak_ptr<PgDatabaseCatalog> cat);
QString getAm() const;
bool operator==(Oid _oid) const { return indexrelid == _oid; }
//bool operator==(const QString &n) const { return name == n; }