Created IndexModel for displaying the indexes on a table. Constraints can now show the SQL to drop and create them.
The keyword list is now directly based of the official keyword list from postgresql.
This commit is contained in:
parent
b436814eb5
commit
97d4e2a1a4
24 changed files with 754 additions and 228 deletions
|
|
@ -2,6 +2,7 @@
|
|||
#define PGCONSTRAINT_H
|
||||
|
||||
#include "Pgsql_Value.h"
|
||||
#include "PgCatalogTypes.h"
|
||||
#include <QString>
|
||||
#include <libpq-fe.h>
|
||||
|
||||
|
|
@ -33,6 +34,8 @@ enum class ForeignKeyAction {
|
|||
|
||||
void operator<<(ForeignKeyAction &s, const Pgsql::Value &v);
|
||||
|
||||
QString ForeignKeyActionToString(ForeignKeyAction fka);
|
||||
|
||||
enum class ForeignKeyMatch {
|
||||
Full, // f
|
||||
Partial, // p
|
||||
|
|
@ -41,6 +44,8 @@ enum class ForeignKeyMatch {
|
|||
|
||||
void operator<<(ForeignKeyMatch &s, const Pgsql::Value &v);
|
||||
|
||||
QString ForeignKeyMatchToString(ForeignKeyMatch fkm);
|
||||
|
||||
class PgConstraint {
|
||||
public:
|
||||
Oid oid = InvalidOid;
|
||||
|
|
@ -60,12 +65,12 @@ public:
|
|||
bool islocal;
|
||||
int32_t inhcount;
|
||||
bool noinherit;
|
||||
std::vector<int16_t> key; // list of constraint columns attnum
|
||||
std::vector<int16_t> fkey; // fkey list of referenced columns
|
||||
std::vector<Oid> pfeqop;
|
||||
std::vector<Oid> ppeqop;
|
||||
std::vector<Oid> ffeqop;
|
||||
std::vector<Oid> exclop;
|
||||
AttNumVec key; // list of constraint columns attnum
|
||||
AttNumVec fkey; // fkey list of referenced columns
|
||||
OidVec pfeqop;
|
||||
OidVec ppeqop;
|
||||
OidVec ffeqop;
|
||||
OidVec exclop;
|
||||
QString bin;
|
||||
QString src;
|
||||
|
||||
|
|
@ -78,4 +83,5 @@ public:
|
|||
bool operator<(const PgConstraint &rhs) const { return oid < rhs.oid; }
|
||||
};
|
||||
|
||||
|
||||
#endif // PGCONSTRAINT_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue