The trigger SQL now also shows the function definition.
This commit is contained in:
parent
3fdd42ffb2
commit
b08bd1a315
2 changed files with 8 additions and 0 deletions
|
|
@ -7,6 +7,7 @@
|
|||
#include "CustomFilterSortModel.h"
|
||||
#include "CustomDataRole.h"
|
||||
#include "PgLabTableView.h"
|
||||
#include "catalog/PgProcContainer.h"
|
||||
#include <QStringBuilder>
|
||||
#include <unordered_set>
|
||||
|
||||
|
|
@ -44,6 +45,11 @@ void TriggerPage::tableView_selectionChanged(const QItemSelection &/*selected*/,
|
|||
auto&& t = m_model->trigger(rij);
|
||||
drops += t.dropSql() % "\n";
|
||||
creates += t.createSql() % "\n";
|
||||
|
||||
const PgProc *proc = m_catalog->procs()->getByKey(t.foid);
|
||||
if (proc) {
|
||||
creates += "\n" % proc->createSql() % "\n";
|
||||
}
|
||||
}
|
||||
m_definitionView->setPlainText(drops % "\n" % creates);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue