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
|
|
@ -3,22 +3,21 @@
|
|||
#include "Pgsql_Connection.h"
|
||||
#include "TypeSelectionItemModel.h"
|
||||
|
||||
Expected<OpenDatabase*> OpenDatabase::createOpenDatabase(const ConnectionConfig &cfg)
|
||||
Expected<OpenDatabase::OpenDatabaseSPtr> OpenDatabase::createOpenDatabase(const ConnectionConfig &cfg)
|
||||
{
|
||||
OpenDatabase *odb = new OpenDatabase(cfg, nullptr);
|
||||
OpenDatabaseSPtr odb(new OpenDatabase(cfg));
|
||||
if (odb->Init()) {
|
||||
|
||||
return odb;
|
||||
|
||||
}
|
||||
//return Expected<ConnectionConfig>::fromException(std::out_of_range("Invalid row"));
|
||||
return Expected<OpenDatabase*>::fromException(
|
||||
return Expected<OpenDatabaseSPtr>::fromException(
|
||||
std::runtime_error("Failed to get database information"));
|
||||
}
|
||||
|
||||
OpenDatabase::OpenDatabase(const ConnectionConfig& cfg, QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_config(cfg)
|
||||
OpenDatabase::OpenDatabase(const ConnectionConfig& cfg)
|
||||
: m_config(cfg)
|
||||
, m_catalogue(std::make_shared<PgDatabaseCatalog>())
|
||||
{
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue