summaryrefslogtreecommitdiffstats
path: root/Plugins/SqlEnterpriseFormatter/formatraise.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Plugins/SqlEnterpriseFormatter/formatraise.cpp')
-rw-r--r--Plugins/SqlEnterpriseFormatter/formatraise.cpp16
1 files changed, 16 insertions, 0 deletions
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();
+}