aboutsummaryrefslogtreecommitdiffstats
path: root/Plugins/SqlEnterpriseFormatter/formatdroptrigger.cpp
blob: ca8caa89a45d97260c092e79bc70380cb98d3f3e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include "formatdroptrigger.h"
#include "parser/ast/sqlitedroptrigger.h"

FormatDropTrigger::FormatDropTrigger(SqliteDropTrigger* dropTrig) :
    dropTrig(dropTrig)
{
}

void FormatDropTrigger::formatInternal()
{
    withKeyword("DROP").withKeyword("TRIGGER");

    if (dropTrig->ifExistsKw)
        withKeyword("IF").withKeyword("EXISTS");

    if (!dropTrig->database.isNull())
        withId(dropTrig->database).withIdDot();

    withId(dropTrig->trigger).withSemicolon();

}