Reorganize files in pglablib
The enitities and containers of the catalog now go into catalog subfolder Models go into model
This commit is contained in:
parent
56cbeea183
commit
f0c1035378
121 changed files with 226 additions and 183 deletions
25
pglablib/catalog/PgInherits.h
Normal file
25
pglablib/catalog/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