Resolve "Improve GENERATED support"

This commit is contained in:
Eelke Klein 2022-09-06 11:17:18 +00:00
parent 54e39ccdb3
commit 9277731c4e
13 changed files with 749 additions and 246 deletions

View file

@ -11,6 +11,16 @@ class PgDatabaseCatalog;
class PgAttribute {
public:
enum class Identity {
None,
Always,
ByDefault
};
enum class Generated {
None,
Stored
};
using Key = std::tuple<Oid, int16_t>;
Oid relid = InvalidOid;
@ -23,12 +33,16 @@ public:
bool notnull = false;
bool hasdef = false;
char identity = '\0';
char generated = '\0';
bool isdropped = false;
bool islocal = true;
Oid collation = InvalidOid;
QString acl;
QString options;
Identity getIdentity() const;
Generated getGenerated() const;
QString defaultValue; ///< Comes from pg_attrdef table
QString sername, serschema; // serial sequence name and schema
QString description; ///< from pg_description