From 7167ce41b61d2ba2cdb526777a4233eb84a3b66a Mon Sep 17 00:00:00 2001 From: Unit 193 Date: Sat, 6 Dec 2014 17:33:25 -0500 Subject: Imported Upstream version 2.99.6 --- Plugins/SqlEnterpriseFormatter/formatraise.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 Plugins/SqlEnterpriseFormatter/formatraise.cpp (limited to 'Plugins/SqlEnterpriseFormatter/formatraise.cpp') diff --git a/Plugins/SqlEnterpriseFormatter/formatraise.cpp b/Plugins/SqlEnterpriseFormatter/formatraise.cpp new file mode 100644 index 0000000..be3787e --- /dev/null +++ b/Plugins/SqlEnterpriseFormatter/formatraise.cpp @@ -0,0 +1,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().withString(raise->message); + + withParFuncRight(); +} -- cgit v1.2.3