The create table statement now lists the inherited tables and inherited columns are commented out.
This commit is contained in:
parent
498233d58c
commit
6c76c70a97
11 changed files with 118 additions and 6 deletions
25
pglablib/PgInherits.h
Normal file
25
pglablib/PgInherits.h
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
#ifndef PGINHERITS_H
|
||||
#define PGINHERITS_H
|
||||
|
||||
#include "Pgsql_declare.h"
|
||||
#include <QString>
|
||||
#include <vector>
|
||||
#include <tuple>
|
||||
|
||||
class PgInherits {
|
||||
public:
|
||||
using Key = std::tuple<Oid, int32_t>;
|
||||
|
||||
|
||||
Oid relid = InvalidOid; // oid
|
||||
Oid parent = InvalidOid; // oid
|
||||
int32_t seqno = 0; // integer
|
||||
|
||||
PgInherits();
|
||||
|
||||
bool operator==(Key _k) const { return relid == std::get<0>(_k) && seqno == std::get<1>(_k); }
|
||||
bool operator<(Key _k) const { return relid < std::get<0>(_k) || (relid == std::get<0>(_k) && seqno < std::get<1>(_k)); }
|
||||
bool operator<(const PgInherits &rhs) const { return relid < rhs.relid || (relid == rhs.relid && seqno < rhs.seqno); }
|
||||
};
|
||||
|
||||
#endif // PGINHERITS_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue