summaryrefslogtreecommitdiffstats
path: root/Plugins/SqlEnterpriseFormatter/formatdropview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Plugins/SqlEnterpriseFormatter/formatdropview.cpp')
-rw-r--r--Plugins/SqlEnterpriseFormatter/formatdropview.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/Plugins/SqlEnterpriseFormatter/formatdropview.cpp b/Plugins/SqlEnterpriseFormatter/formatdropview.cpp
new file mode 100644
index 0000000..965d607
--- /dev/null
+++ b/Plugins/SqlEnterpriseFormatter/formatdropview.cpp
@@ -0,0 +1,20 @@
+#include "formatdropview.h"
+#include "parser/ast/sqlitedropview.h"
+
+FormatDropView::FormatDropView(SqliteDropView* dropView) :
+ dropView(dropView)
+{
+}
+
+void FormatDropView::formatInternal()
+{
+ withKeyword("DROP").withKeyword("VIEW");
+
+ if (dropView->ifExistsKw)
+ withKeyword("IF").withKeyword("EXISTS");
+
+ if (!dropView->database.isNull())
+ withId(dropView->database).withIdDot();
+
+ withId(dropView->view).withSemicolon();
+}