Merge branch '62-missing-or-in-trigger-definitions' into 'master'
Resolve "Missing OR in trigger definitions" Closes #62 See merge request eelke/pgLab!6
This commit is contained in:
commit
2c615f3b96
1 changed files with 9 additions and 3 deletions
|
|
@ -91,12 +91,18 @@ QString PgTrigger::event() const
|
||||||
QString event;
|
QString event;
|
||||||
if (type & TriggerTypeInsert)
|
if (type & TriggerTypeInsert)
|
||||||
event += "INSERT ";
|
event += "INSERT ";
|
||||||
if (type & TriggerTypeUpdate)
|
if (type & TriggerTypeUpdate) {
|
||||||
|
if (!event.isEmpty()) event += "OR ";
|
||||||
event += "UPDATE ";
|
event += "UPDATE ";
|
||||||
if (type & TriggerTypeDelete)
|
}
|
||||||
|
if (type & TriggerTypeDelete) {
|
||||||
|
if (!event.isEmpty()) event += "OR ";
|
||||||
event += "DELETE ";
|
event += "DELETE ";
|
||||||
if (type & TriggerTypeTruncate)
|
}
|
||||||
|
if (type & TriggerTypeTruncate) {
|
||||||
|
if (!event.isEmpty()) event += "OR ";
|
||||||
event += "TRUNCATE";
|
event += "TRUNCATE";
|
||||||
|
}
|
||||||
return event.trimmed();
|
return event.trimmed();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue