aboutsummaryrefslogtreecommitdiffstats
path: root/Plugins/SqlEnterpriseFormatter/formatraise.cpp
blob: a347f2888fa966e6393397e35c34299f82f5c937 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include "formatraise.h"
#include "parser/ast/sqliteraise.h"

FormatRaise::FormatRaise(SqliteRaise *raise) :
    raise(raise)
{
}

void FormatRaise::formatInternal()
{
    withKeyword("RAISE").withParFuncLeft().withKeyword(SqliteRaise::raiseType(raise->type));
    if (raise->type != SqliteRaise::Type::IGNORE)
        withCommaOper().withStringOrId(raise->message);

    withParFuncRight();
}