Made a start with showing foreignkeys in column list.
Not finished, need to decide what to do with multiple and multi column fkeys.
This commit is contained in:
parent
a76686acfd
commit
190a6c04dc
14 changed files with 97 additions and 94 deletions
|
|
@ -1,7 +1,6 @@
|
|||
#ifndef OPENDATABASE_H
|
||||
#define OPENDATABASE_H
|
||||
|
||||
#include <QObject>
|
||||
#include "ConnectionConfig.h"
|
||||
#include "Expected.h"
|
||||
#include <memory>
|
||||
|
|
@ -12,11 +11,13 @@ class TypeSelectionItemModel;
|
|||
/** Instances of this class represent a single database on which atleast one
|
||||
* window is opened. This class is used to track details about that database.
|
||||
*/
|
||||
class OpenDatabase : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
class OpenDatabase {
|
||||
public:
|
||||
static Expected<OpenDatabase*> createOpenDatabase(const ConnectionConfig &cfg);
|
||||
using OpenDatabaseSPtr = std::shared_ptr<OpenDatabase>;
|
||||
static Expected<OpenDatabaseSPtr> createOpenDatabase(const ConnectionConfig &cfg);
|
||||
|
||||
// using on_createResult_callback = std::function<void(Expected<std::shared_ptr<Pgsql::Result>>, qint64)>;
|
||||
// void asyncCreateOpenDatabase(const ConnectionConfig &cfg, );
|
||||
|
||||
OpenDatabase(const OpenDatabase &) = delete;
|
||||
OpenDatabase& operator=(const OpenDatabase &) = delete;
|
||||
|
|
@ -24,9 +25,6 @@ public:
|
|||
|
||||
std::shared_ptr<PgDatabaseCatalog> catalogue();
|
||||
TypeSelectionItemModel* typeSelectionModel();
|
||||
signals:
|
||||
|
||||
public slots:
|
||||
|
||||
private:
|
||||
ConnectionConfig m_config;
|
||||
|
|
@ -34,7 +32,7 @@ private:
|
|||
|
||||
TypeSelectionItemModel *m_typeSelectionModel = nullptr;
|
||||
|
||||
OpenDatabase(const ConnectionConfig& cfg, QObject *parent = 0);
|
||||
OpenDatabase(const ConnectionConfig& cfg);
|
||||
bool Init();
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue