aboutsummaryrefslogtreecommitdiffstats
path: root/Plugins/SqlEnterpriseFormatter
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@ubuntu.com>2014-12-14 08:24:26 -0500
committerLibravatarUnit 193 <unit193@ubuntu.com>2014-12-14 08:24:26 -0500
commit89214766d8e3e7b8dd749a1fa18a5b9727f5010d (patch)
tree34ad5aa84ac9674ebb5b7a23b5a3377e8629ee33 /Plugins/SqlEnterpriseFormatter
parent7167ce41b61d2ba2cdb526777a4233eb84a3b66a (diff)
Imported Upstream version 3.0.0upstream/3.0.0
Diffstat (limited to 'Plugins/SqlEnterpriseFormatter')
-rw-r--r--Plugins/SqlEnterpriseFormatter/formatcreateview.cpp2
-rw-r--r--Plugins/SqlEnterpriseFormatter/formatstatement.cpp3
-rw-r--r--Plugins/SqlEnterpriseFormatter/sqlenterpriseformatter.json2
3 files changed, 5 insertions, 2 deletions
diff --git a/Plugins/SqlEnterpriseFormatter/formatcreateview.cpp b/Plugins/SqlEnterpriseFormatter/formatcreateview.cpp
index faec87a..4fe1c27 100644
--- a/Plugins/SqlEnterpriseFormatter/formatcreateview.cpp
+++ b/Plugins/SqlEnterpriseFormatter/formatcreateview.cpp
@@ -22,5 +22,5 @@ void FormatCreateView::formatInternal()
if (dialect == Dialect::Sqlite3 && !createView->database.isNull())
withId(createView->database).withIdDot();
- withId(createView->view).withKeyword("AS").withStatement(createView->select).withSemicolon();
+ withId(createView->view).withKeyword("AS").withNewLine().withIncrIndent().withStatement(createView->select).withSemicolon().withDecrIndent();
}
diff --git a/Plugins/SqlEnterpriseFormatter/formatstatement.cpp b/Plugins/SqlEnterpriseFormatter/formatstatement.cpp
index 04c6aae..b5fd408 100644
--- a/Plugins/SqlEnterpriseFormatter/formatstatement.cpp
+++ b/Plugins/SqlEnterpriseFormatter/formatstatement.cpp
@@ -19,6 +19,7 @@
#include "formatcopy.h"
#include "formatcreateindex.h"
#include "formatcreatetrigger.h"
+#include "formatcreateview.h"
#include "formatdelete.h"
#include "formatupdate.h"
#include "formatdropindex.h"
@@ -46,6 +47,7 @@
#include "parser/ast/sqlitecopy.h"
#include "parser/ast/sqlitecreateindex.h"
#include "parser/ast/sqlitecreatetrigger.h"
+#include "parser/ast/sqlitecreateview.h"
#include "parser/ast/sqliteupdate.h"
#include "parser/ast/sqlitedelete.h"
#include "parser/ast/sqlitedropindex.h"
@@ -139,6 +141,7 @@ FormatStatement *FormatStatement::forQuery(SqliteStatement *query)
FORMATTER_FACTORY_ENTRY(query, SqliteCreateIndex, FormatCreateIndex);
FORMATTER_FACTORY_ENTRY(query, SqliteCreateTrigger, FormatCreateTrigger);
FORMATTER_FACTORY_ENTRY(query, SqliteCreateTrigger::Event, FormatCreateTriggerEvent);
+ FORMATTER_FACTORY_ENTRY(query, SqliteCreateView, FormatCreateView);
FORMATTER_FACTORY_ENTRY(query, SqliteUpdate, FormatUpdate);
FORMATTER_FACTORY_ENTRY(query, SqliteDelete, FormatDelete);
FORMATTER_FACTORY_ENTRY(query, SqliteDropIndex, FormatDropIndex);
diff --git a/Plugins/SqlEnterpriseFormatter/sqlenterpriseformatter.json b/Plugins/SqlEnterpriseFormatter/sqlenterpriseformatter.json
index 2e6f543..492f811 100644
--- a/Plugins/SqlEnterpriseFormatter/sqlenterpriseformatter.json
+++ b/Plugins/SqlEnterpriseFormatter/sqlenterpriseformatter.json
@@ -2,6 +2,6 @@
"type": "CodeFormatterPlugin",
"title": "SQL Enterprise",
"description": "Advanced SQL formatter.",
- "version": 10002,
+ "version": 10003,
"author": "SalSoft"
}