Restructuring catalog tabs
- Moved detail tabs of table to their own components - Table list has become seperate component on seperate tab - Table list does not use designer anymore - Moved sequences and functions tabs into the catalog inspector
This commit is contained in:
parent
a704332342
commit
42432b06a9
31 changed files with 598 additions and 472 deletions
|
|
@ -1,4 +1,5 @@
|
|||
#include "PgConstraint.h"
|
||||
#include "SqlFormattingUtils.h"
|
||||
|
||||
void operator<<(ConstraintType &s, const Pgsql::Value &v)
|
||||
{
|
||||
|
|
@ -172,3 +173,13 @@ QString PgConstraint::typeName() const
|
|||
{
|
||||
return "CONSTRAINT";
|
||||
}
|
||||
|
||||
QString PgConstraint::dropSql() const
|
||||
{
|
||||
return getDropConstraintDefinition(catalog(), *this);
|
||||
}
|
||||
|
||||
QString PgConstraint::createSql() const
|
||||
{
|
||||
return getAlterTableConstraintDefinition(catalog(), *this);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -77,6 +77,9 @@ public:
|
|||
using PgNamespaceObject::PgNamespaceObject;
|
||||
|
||||
QString typeName() const override;
|
||||
|
||||
QString dropSql() const override;
|
||||
QString createSql() const override;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -245,7 +245,7 @@ QString PgProc::argSigList(const bool forScript) const
|
|||
}
|
||||
|
||||
|
||||
const QString& PgProc::createSql() const
|
||||
QString PgProc::createSql() const
|
||||
{
|
||||
if (createSqlCache.isEmpty()) {
|
||||
QString sql;
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ public:
|
|||
);
|
||||
const std::vector<Arg>& args() const;
|
||||
|
||||
const QString& createSql() const;
|
||||
QString createSql() const override;
|
||||
QString argListWithNames(bool multiline = false) const;
|
||||
QString argSigList(const bool forScript = false) const;
|
||||
QString volatility() const;
|
||||
|
|
|
|||
|
|
@ -91,3 +91,13 @@ QString PgServerObject::aclAllPattern() const
|
|||
{
|
||||
return {};
|
||||
}
|
||||
|
||||
QString PgServerObject::dropSql() const
|
||||
{
|
||||
return {};
|
||||
}
|
||||
|
||||
QString PgServerObject::createSql() const
|
||||
{
|
||||
return {};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,6 +41,9 @@ public:
|
|||
* @return A string containing all posible privileges for this type of object.
|
||||
*/
|
||||
virtual QString aclAllPattern() const;
|
||||
|
||||
virtual QString dropSql() const;
|
||||
virtual QString createSql() const;
|
||||
private:
|
||||
Oid m_ownerOid = InvalidOid;
|
||||
const PgAuthId * m_owner;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
#include "SqlFormattingUtils.h"
|
||||
#include <QStringBuilder>
|
||||
|
||||
QString PgTrigger::dropSql()
|
||||
QString PgTrigger::dropSql() const
|
||||
{
|
||||
if (m_dropSql.isEmpty()) {
|
||||
auto&& fqtablename = catalog().classes()->getByKey(relid)->fullyQualifiedQuotedObjectName(); // genFQTableName(catalog(), *catalog().classes()->getByKey(relid));
|
||||
|
|
@ -15,7 +15,7 @@ QString PgTrigger::dropSql()
|
|||
return m_dropSql;
|
||||
}
|
||||
|
||||
QString PgTrigger::createSql()
|
||||
QString PgTrigger::createSql() const
|
||||
{
|
||||
if (m_createSql.isEmpty()) {
|
||||
auto&& fqtablename = catalog().classes()->getByKey(relid)->fullyQualifiedQuotedObjectName(); //genFQTableName(catalog(), *catalog().classes()->getByKey(relid));
|
||||
|
|
|
|||
|
|
@ -47,8 +47,8 @@ public:
|
|||
static constexpr int TriggerTypeTruncate = (1 << 5);
|
||||
static constexpr int TriggerTypeInstead = (1 << 6);
|
||||
|
||||
QString dropSql();
|
||||
QString createSql();
|
||||
QString dropSql() const override;
|
||||
QString createSql() const override;
|
||||
bool isRow() const { return type & TriggerTypeRow; }
|
||||
bool isBefore() const { return type & TriggerTypeBefore; }
|
||||
QString typeFireWhen() const;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue