aboutsummaryrefslogtreecommitdiffstats
path: root/Plugins/SqlEnterpriseFormatter
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@ubuntu.com>2015-04-04 14:41:10 -0400
committerLibravatarUnit 193 <unit193@ubuntu.com>2015-04-04 14:41:10 -0400
commitb5f93b05578293d1d233b4920a28a5c2fd826f94 (patch)
tree82332679f647e9c76e331206786d07a58dcfa9b8 /Plugins/SqlEnterpriseFormatter
parentaf8a7a3e3dccf9c9ad257e3952173d180c8a7421 (diff)
parenta5b034d4a9c44f9bc1e83b01de82530f8fc63013 (diff)
Merge tag 'upstream/3.0.4'
Upstream version 3.0.4 # gpg: Signature made Sat 04 Apr 2015 02:41:09 PM EDT using RSA key ID EBE9BD91 # gpg: Good signature from "Unit 193 <unit193@gmail.com>" # gpg: aka "Unit 193 <unit193@ninthfloor.org>" # gpg: aka "Unit 193 <unit193@ubuntu.com>" # gpg: aka "Unit 193 <unit193@ninthfloor.com>"
Diffstat (limited to 'Plugins/SqlEnterpriseFormatter')
-rw-r--r--Plugins/SqlEnterpriseFormatter/SqlEnterpriseFormatter_de.ts2
-rw-r--r--Plugins/SqlEnterpriseFormatter/SqlEnterpriseFormatter_es.ts2
-rw-r--r--Plugins/SqlEnterpriseFormatter/SqlEnterpriseFormatter_fr.ts2
-rw-r--r--Plugins/SqlEnterpriseFormatter/SqlEnterpriseFormatter_pl.ts2
-rw-r--r--Plugins/SqlEnterpriseFormatter/SqlEnterpriseFormatter_pt_BR.ts2
-rw-r--r--Plugins/SqlEnterpriseFormatter/SqlEnterpriseFormatter_ru.ts2
-rw-r--r--Plugins/SqlEnterpriseFormatter/SqlEnterpriseFormatter_sk.ts2
-rw-r--r--Plugins/SqlEnterpriseFormatter/SqlEnterpriseFormatter_zh_CN.ts2
-rw-r--r--Plugins/SqlEnterpriseFormatter/formataltertable.cpp1
-rw-r--r--Plugins/SqlEnterpriseFormatter/formatanalyze.cpp1
-rw-r--r--Plugins/SqlEnterpriseFormatter/formatattach.cpp1
-rw-r--r--Plugins/SqlEnterpriseFormatter/formatbegintrans.cpp1
-rw-r--r--Plugins/SqlEnterpriseFormatter/formatcommittrans.cpp1
-rw-r--r--Plugins/SqlEnterpriseFormatter/formatcopy.cpp1
-rw-r--r--Plugins/SqlEnterpriseFormatter/formatcreateindex.cpp1
-rw-r--r--Plugins/SqlEnterpriseFormatter/formatcreatetable.cpp1
-rw-r--r--Plugins/SqlEnterpriseFormatter/formatcreatetrigger.cpp1
-rw-r--r--Plugins/SqlEnterpriseFormatter/formatcreateview.cpp1
-rw-r--r--Plugins/SqlEnterpriseFormatter/formatcreatevirtualtable.cpp1
-rw-r--r--Plugins/SqlEnterpriseFormatter/formatdelete.cpp1
-rw-r--r--Plugins/SqlEnterpriseFormatter/formatdetach.cpp1
-rw-r--r--Plugins/SqlEnterpriseFormatter/formatdropindex.cpp1
-rw-r--r--Plugins/SqlEnterpriseFormatter/formatdroptable.cpp1
-rw-r--r--Plugins/SqlEnterpriseFormatter/formatdroptrigger.cpp1
-rw-r--r--Plugins/SqlEnterpriseFormatter/formatdropview.cpp1
-rw-r--r--Plugins/SqlEnterpriseFormatter/formatinsert.cpp1
-rw-r--r--Plugins/SqlEnterpriseFormatter/formatpragma.cpp1
-rw-r--r--Plugins/SqlEnterpriseFormatter/formatreindex.cpp1
-rw-r--r--Plugins/SqlEnterpriseFormatter/formatrelease.cpp1
-rw-r--r--Plugins/SqlEnterpriseFormatter/formatrollback.cpp1
-rw-r--r--Plugins/SqlEnterpriseFormatter/formatsavepoint.cpp1
-rw-r--r--Plugins/SqlEnterpriseFormatter/formatselect.cpp1
-rw-r--r--Plugins/SqlEnterpriseFormatter/formatstatement.cpp10
-rw-r--r--Plugins/SqlEnterpriseFormatter/formatstatement.h2
-rw-r--r--Plugins/SqlEnterpriseFormatter/formatupdate.cpp1
-rw-r--r--Plugins/SqlEnterpriseFormatter/formatvacuum.cpp2
-rw-r--r--Plugins/SqlEnterpriseFormatter/sqlenterpriseformatter.json2
-rw-r--r--Plugins/SqlEnterpriseFormatter/sqlenterpriseformatter.qrc2
38 files changed, 50 insertions, 9 deletions
diff --git a/Plugins/SqlEnterpriseFormatter/SqlEnterpriseFormatter_de.ts b/Plugins/SqlEnterpriseFormatter/SqlEnterpriseFormatter_de.ts
index bd56eba..a83f5df 100644
--- a/Plugins/SqlEnterpriseFormatter/SqlEnterpriseFormatter_de.ts
+++ b/Plugins/SqlEnterpriseFormatter/SqlEnterpriseFormatter_de.ts
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
-<TS version="2.0" language="de_DE">
+<TS version="2.1" language="de_DE">
<context>
<name>QObject</name>
<message>
diff --git a/Plugins/SqlEnterpriseFormatter/SqlEnterpriseFormatter_es.ts b/Plugins/SqlEnterpriseFormatter/SqlEnterpriseFormatter_es.ts
index 15b85f4..4d873e5 100644
--- a/Plugins/SqlEnterpriseFormatter/SqlEnterpriseFormatter_es.ts
+++ b/Plugins/SqlEnterpriseFormatter/SqlEnterpriseFormatter_es.ts
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
-<TS version="2.0" language="es_ES">
+<TS version="2.1" language="es_ES">
<context>
<name>QObject</name>
<message>
diff --git a/Plugins/SqlEnterpriseFormatter/SqlEnterpriseFormatter_fr.ts b/Plugins/SqlEnterpriseFormatter/SqlEnterpriseFormatter_fr.ts
index 519235f..8a9178b 100644
--- a/Plugins/SqlEnterpriseFormatter/SqlEnterpriseFormatter_fr.ts
+++ b/Plugins/SqlEnterpriseFormatter/SqlEnterpriseFormatter_fr.ts
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
-<TS version="2.0" language="fr_FR">
+<TS version="2.1" language="fr_FR">
<context>
<name>QObject</name>
<message>
diff --git a/Plugins/SqlEnterpriseFormatter/SqlEnterpriseFormatter_pl.ts b/Plugins/SqlEnterpriseFormatter/SqlEnterpriseFormatter_pl.ts
index b73d4ad..5cfbf32 100644
--- a/Plugins/SqlEnterpriseFormatter/SqlEnterpriseFormatter_pl.ts
+++ b/Plugins/SqlEnterpriseFormatter/SqlEnterpriseFormatter_pl.ts
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
-<TS version="2.0" language="pl_PL">
+<TS version="2.1" language="pl_PL">
<context>
<name>QObject</name>
<message>
diff --git a/Plugins/SqlEnterpriseFormatter/SqlEnterpriseFormatter_pt_BR.ts b/Plugins/SqlEnterpriseFormatter/SqlEnterpriseFormatter_pt_BR.ts
index 8921d18..b89804a 100644
--- a/Plugins/SqlEnterpriseFormatter/SqlEnterpriseFormatter_pt_BR.ts
+++ b/Plugins/SqlEnterpriseFormatter/SqlEnterpriseFormatter_pt_BR.ts
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
-<TS version="2.0" language="pt_BR">
+<TS version="2.1" language="pt_BR">
<context>
<name>QObject</name>
<message>
diff --git a/Plugins/SqlEnterpriseFormatter/SqlEnterpriseFormatter_ru.ts b/Plugins/SqlEnterpriseFormatter/SqlEnterpriseFormatter_ru.ts
index 0212e14..a5656d8 100644
--- a/Plugins/SqlEnterpriseFormatter/SqlEnterpriseFormatter_ru.ts
+++ b/Plugins/SqlEnterpriseFormatter/SqlEnterpriseFormatter_ru.ts
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
-<TS version="2.0" language="ru_RU">
+<TS version="2.1" language="ru_RU">
<context>
<name>QObject</name>
<message>
diff --git a/Plugins/SqlEnterpriseFormatter/SqlEnterpriseFormatter_sk.ts b/Plugins/SqlEnterpriseFormatter/SqlEnterpriseFormatter_sk.ts
index 24086e8..407cc6e 100644
--- a/Plugins/SqlEnterpriseFormatter/SqlEnterpriseFormatter_sk.ts
+++ b/Plugins/SqlEnterpriseFormatter/SqlEnterpriseFormatter_sk.ts
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
-<TS version="2.0" language="sk_SK">
+<TS version="2.1" language="sk_SK">
<context>
<name>QObject</name>
<message>
diff --git a/Plugins/SqlEnterpriseFormatter/SqlEnterpriseFormatter_zh_CN.ts b/Plugins/SqlEnterpriseFormatter/SqlEnterpriseFormatter_zh_CN.ts
index a3296eb..3c80603 100644
--- a/Plugins/SqlEnterpriseFormatter/SqlEnterpriseFormatter_zh_CN.ts
+++ b/Plugins/SqlEnterpriseFormatter/SqlEnterpriseFormatter_zh_CN.ts
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
-<TS version="2.0" language="zh_CN">
+<TS version="2.1" language="zh_CN">
<context>
<name>QObject</name>
<message>
diff --git a/Plugins/SqlEnterpriseFormatter/formataltertable.cpp b/Plugins/SqlEnterpriseFormatter/formataltertable.cpp
index d562e1b..0f9a8ac 100644
--- a/Plugins/SqlEnterpriseFormatter/formataltertable.cpp
+++ b/Plugins/SqlEnterpriseFormatter/formataltertable.cpp
@@ -8,6 +8,7 @@ FormatAlterTable::FormatAlterTable(SqliteAlterTable* alterTable) :
void FormatAlterTable::formatInternal()
{
+ handleExplainQuery(alterTable);
withKeyword("ALTER").withKeyword("TABLE");
if (!alterTable->database.isNull())
diff --git a/Plugins/SqlEnterpriseFormatter/formatanalyze.cpp b/Plugins/SqlEnterpriseFormatter/formatanalyze.cpp
index 1b7a939..887fc52 100644
--- a/Plugins/SqlEnterpriseFormatter/formatanalyze.cpp
+++ b/Plugins/SqlEnterpriseFormatter/formatanalyze.cpp
@@ -8,6 +8,7 @@ FormatAnalyze::FormatAnalyze(SqliteAnalyze* analyze) :
void FormatAnalyze::formatInternal()
{
+ handleExplainQuery(analyze);
withKeyword("ANALYZE");
if (!analyze->database.isNull())
diff --git a/Plugins/SqlEnterpriseFormatter/formatattach.cpp b/Plugins/SqlEnterpriseFormatter/formatattach.cpp
index e969495..8ba3f3e 100644
--- a/Plugins/SqlEnterpriseFormatter/formatattach.cpp
+++ b/Plugins/SqlEnterpriseFormatter/formatattach.cpp
@@ -9,6 +9,7 @@ FormatAttach::FormatAttach(SqliteAttach* att) :
void FormatAttach::formatInternal()
{
+ handleExplainQuery(att);
withKeyword("ATTACH");
if (att->databaseKw)
diff --git a/Plugins/SqlEnterpriseFormatter/formatbegintrans.cpp b/Plugins/SqlEnterpriseFormatter/formatbegintrans.cpp
index 5a70d61..55144dc 100644
--- a/Plugins/SqlEnterpriseFormatter/formatbegintrans.cpp
+++ b/Plugins/SqlEnterpriseFormatter/formatbegintrans.cpp
@@ -8,6 +8,7 @@ FormatBeginTrans::FormatBeginTrans(SqliteBeginTrans* bt) :
void FormatBeginTrans::formatInternal()
{
+ handleExplainQuery(bt);
withKeyword("BEGIN");
if (bt->type != SqliteBeginTrans::Type::null)
diff --git a/Plugins/SqlEnterpriseFormatter/formatcommittrans.cpp b/Plugins/SqlEnterpriseFormatter/formatcommittrans.cpp
index 7fdafa3..5e69f09 100644
--- a/Plugins/SqlEnterpriseFormatter/formatcommittrans.cpp
+++ b/Plugins/SqlEnterpriseFormatter/formatcommittrans.cpp
@@ -8,6 +8,7 @@ FormatCommitTrans::FormatCommitTrans(SqliteCommitTrans* ct) :
void FormatCommitTrans::formatInternal()
{
+ handleExplainQuery(ct);
if (ct->endKw)
withKeyword("END");
else
diff --git a/Plugins/SqlEnterpriseFormatter/formatcopy.cpp b/Plugins/SqlEnterpriseFormatter/formatcopy.cpp
index fa07d48..18ce28c 100644
--- a/Plugins/SqlEnterpriseFormatter/formatcopy.cpp
+++ b/Plugins/SqlEnterpriseFormatter/formatcopy.cpp
@@ -8,6 +8,7 @@ FormatCopy::FormatCopy(SqliteCopy* copy) :
void FormatCopy::formatInternal()
{
+ handleExplainQuery(copy);
withKeyword("COPY");
if (copy->onConflict != SqliteConflictAlgo::null)
withKeyword("OR").withKeyword(sqliteConflictAlgo(copy->onConflict));
diff --git a/Plugins/SqlEnterpriseFormatter/formatcreateindex.cpp b/Plugins/SqlEnterpriseFormatter/formatcreateindex.cpp
index cc8f3f6..ac5fd7c 100644
--- a/Plugins/SqlEnterpriseFormatter/formatcreateindex.cpp
+++ b/Plugins/SqlEnterpriseFormatter/formatcreateindex.cpp
@@ -9,6 +9,7 @@ FormatCreateIndex::FormatCreateIndex(SqliteCreateIndex* createIndex) :
void FormatCreateIndex::formatInternal()
{
+ handleExplainQuery(createIndex);
withKeyword("CREATE");
if (createIndex->uniqueKw)
withKeyword("UNIQUE");
diff --git a/Plugins/SqlEnterpriseFormatter/formatcreatetable.cpp b/Plugins/SqlEnterpriseFormatter/formatcreatetable.cpp
index d37239a..d1f0996 100644
--- a/Plugins/SqlEnterpriseFormatter/formatcreatetable.cpp
+++ b/Plugins/SqlEnterpriseFormatter/formatcreatetable.cpp
@@ -9,6 +9,7 @@ FormatCreateTable::FormatCreateTable(SqliteCreateTable* createTable) :
void FormatCreateTable::formatInternal()
{
+ handleExplainQuery(createTable);
withKeyword("CREATE");
if (createTable->tempKw)
withKeyword("TEMP");
diff --git a/Plugins/SqlEnterpriseFormatter/formatcreatetrigger.cpp b/Plugins/SqlEnterpriseFormatter/formatcreatetrigger.cpp
index d05d8cf..01351e6 100644
--- a/Plugins/SqlEnterpriseFormatter/formatcreatetrigger.cpp
+++ b/Plugins/SqlEnterpriseFormatter/formatcreatetrigger.cpp
@@ -8,6 +8,7 @@ FormatCreateTrigger::FormatCreateTrigger(SqliteCreateTrigger* createTrig) :
void FormatCreateTrigger::formatInternal()
{
+ handleExplainQuery(createTrig);
withKeyword("CREATE");
if (createTrig->tempKw)
withKeyword("TEMP");
diff --git a/Plugins/SqlEnterpriseFormatter/formatcreateview.cpp b/Plugins/SqlEnterpriseFormatter/formatcreateview.cpp
index 4fe1c27..e8d0351 100644
--- a/Plugins/SqlEnterpriseFormatter/formatcreateview.cpp
+++ b/Plugins/SqlEnterpriseFormatter/formatcreateview.cpp
@@ -9,6 +9,7 @@ FormatCreateView::FormatCreateView(SqliteCreateView* createView) :
void FormatCreateView::formatInternal()
{
+ handleExplainQuery(createView);
withKeyword("CREATE");
if (createView->tempKw)
withKeyword("TEMP");
diff --git a/Plugins/SqlEnterpriseFormatter/formatcreatevirtualtable.cpp b/Plugins/SqlEnterpriseFormatter/formatcreatevirtualtable.cpp
index c702846..7525667 100644
--- a/Plugins/SqlEnterpriseFormatter/formatcreatevirtualtable.cpp
+++ b/Plugins/SqlEnterpriseFormatter/formatcreatevirtualtable.cpp
@@ -9,6 +9,7 @@ FormatCreateVirtualTable::FormatCreateVirtualTable(SqliteCreateVirtualTable* cvt
void FormatCreateVirtualTable::formatInternal()
{
+ handleExplainQuery(cvt);
withKeyword("CREATE").withKeyword("VIRTUAL").withKeyword("TABLE");
if (cvt->ifNotExistsKw)
withKeyword("IF").withKeyword("NOT").withKeyword("EXISTS");
diff --git a/Plugins/SqlEnterpriseFormatter/formatdelete.cpp b/Plugins/SqlEnterpriseFormatter/formatdelete.cpp
index ca6ac5b..fc154e2 100644
--- a/Plugins/SqlEnterpriseFormatter/formatdelete.cpp
+++ b/Plugins/SqlEnterpriseFormatter/formatdelete.cpp
@@ -10,6 +10,7 @@ FormatDelete::FormatDelete(SqliteDelete* del) :
void FormatDelete::formatInternal()
{
+ handleExplainQuery(del);
if (del->with)
withStatement(del->with);
diff --git a/Plugins/SqlEnterpriseFormatter/formatdetach.cpp b/Plugins/SqlEnterpriseFormatter/formatdetach.cpp
index e788da7..412ecb5 100644
--- a/Plugins/SqlEnterpriseFormatter/formatdetach.cpp
+++ b/Plugins/SqlEnterpriseFormatter/formatdetach.cpp
@@ -9,6 +9,7 @@ FormatDetach::FormatDetach(SqliteDetach* detach) :
void FormatDetach::formatInternal()
{
+ handleExplainQuery(detach);
withKeyword("DETACH");
if (detach->databaseKw)
diff --git a/Plugins/SqlEnterpriseFormatter/formatdropindex.cpp b/Plugins/SqlEnterpriseFormatter/formatdropindex.cpp
index 1e85bb8..9ff6324 100644
--- a/Plugins/SqlEnterpriseFormatter/formatdropindex.cpp
+++ b/Plugins/SqlEnterpriseFormatter/formatdropindex.cpp
@@ -8,6 +8,7 @@ FormatDropIndex::FormatDropIndex(SqliteDropIndex* dropIndex) :
void FormatDropIndex::formatInternal()
{
+ handleExplainQuery(dropIndex);
withKeyword("DROP").withKeyword("INDEX");
if (dropIndex->ifExistsKw)
diff --git a/Plugins/SqlEnterpriseFormatter/formatdroptable.cpp b/Plugins/SqlEnterpriseFormatter/formatdroptable.cpp
index 775adfe..986bee5 100644
--- a/Plugins/SqlEnterpriseFormatter/formatdroptable.cpp
+++ b/Plugins/SqlEnterpriseFormatter/formatdroptable.cpp
@@ -8,6 +8,7 @@ FormatDropTable::FormatDropTable(SqliteDropTable* dropTable) :
void FormatDropTable::formatInternal()
{
+ handleExplainQuery(dropTable);
withKeyword("DROP").withKeyword("TABLE");
if (dropTable->ifExistsKw)
diff --git a/Plugins/SqlEnterpriseFormatter/formatdroptrigger.cpp b/Plugins/SqlEnterpriseFormatter/formatdroptrigger.cpp
index ca8caa8..da75c66 100644
--- a/Plugins/SqlEnterpriseFormatter/formatdroptrigger.cpp
+++ b/Plugins/SqlEnterpriseFormatter/formatdroptrigger.cpp
@@ -8,6 +8,7 @@ FormatDropTrigger::FormatDropTrigger(SqliteDropTrigger* dropTrig) :
void FormatDropTrigger::formatInternal()
{
+ handleExplainQuery(dropTrig);
withKeyword("DROP").withKeyword("TRIGGER");
if (dropTrig->ifExistsKw)
diff --git a/Plugins/SqlEnterpriseFormatter/formatdropview.cpp b/Plugins/SqlEnterpriseFormatter/formatdropview.cpp
index 965d607..a8160e9 100644
--- a/Plugins/SqlEnterpriseFormatter/formatdropview.cpp
+++ b/Plugins/SqlEnterpriseFormatter/formatdropview.cpp
@@ -8,6 +8,7 @@ FormatDropView::FormatDropView(SqliteDropView* dropView) :
void FormatDropView::formatInternal()
{
+ handleExplainQuery(dropView);
withKeyword("DROP").withKeyword("VIEW");
if (dropView->ifExistsKw)
diff --git a/Plugins/SqlEnterpriseFormatter/formatinsert.cpp b/Plugins/SqlEnterpriseFormatter/formatinsert.cpp
index 1ff0535..6c1e763 100644
--- a/Plugins/SqlEnterpriseFormatter/formatinsert.cpp
+++ b/Plugins/SqlEnterpriseFormatter/formatinsert.cpp
@@ -10,6 +10,7 @@ FormatInsert::FormatInsert(SqliteInsert* insert) :
void FormatInsert::formatInternal()
{
+ handleExplainQuery(insert);
if (insert->replaceKw)
{
withStatement(insert->with);
diff --git a/Plugins/SqlEnterpriseFormatter/formatpragma.cpp b/Plugins/SqlEnterpriseFormatter/formatpragma.cpp
index 0b6491a..ee30aa9 100644
--- a/Plugins/SqlEnterpriseFormatter/formatpragma.cpp
+++ b/Plugins/SqlEnterpriseFormatter/formatpragma.cpp
@@ -8,6 +8,7 @@ FormatPragma::FormatPragma(SqlitePragma* pragma) :
void FormatPragma::formatInternal()
{
+ handleExplainQuery(pragma);
withKeyword("PRAGMA");
if (!pragma->database.isNull())
diff --git a/Plugins/SqlEnterpriseFormatter/formatreindex.cpp b/Plugins/SqlEnterpriseFormatter/formatreindex.cpp
index 441032e..1361396 100644
--- a/Plugins/SqlEnterpriseFormatter/formatreindex.cpp
+++ b/Plugins/SqlEnterpriseFormatter/formatreindex.cpp
@@ -8,6 +8,7 @@ FormatReindex::FormatReindex(SqliteReindex* reindex) :
void FormatReindex::formatInternal()
{
+ handleExplainQuery(reindex);
withKeyword("REINDEX");
if (!reindex->database.isNull())
withId(reindex->database).withIdDot();
diff --git a/Plugins/SqlEnterpriseFormatter/formatrelease.cpp b/Plugins/SqlEnterpriseFormatter/formatrelease.cpp
index 52c0b24..da86662 100644
--- a/Plugins/SqlEnterpriseFormatter/formatrelease.cpp
+++ b/Plugins/SqlEnterpriseFormatter/formatrelease.cpp
@@ -8,6 +8,7 @@ FormatRelease::FormatRelease(SqliteRelease* release) :
void FormatRelease::formatInternal()
{
+ handleExplainQuery(release);
withKeyword("RELEASE");
if (release->savepointKw)
withKeyword("SAVEPOINT");
diff --git a/Plugins/SqlEnterpriseFormatter/formatrollback.cpp b/Plugins/SqlEnterpriseFormatter/formatrollback.cpp
index c55f5cc..a7c9aed 100644
--- a/Plugins/SqlEnterpriseFormatter/formatrollback.cpp
+++ b/Plugins/SqlEnterpriseFormatter/formatrollback.cpp
@@ -8,6 +8,7 @@ FormatRollback::FormatRollback(SqliteRollback* rollback) :
void FormatRollback::formatInternal()
{
+ handleExplainQuery(rollback);
withKeyword("ROLLBACK");
if (rollback->transactionKw)
withKeyword("TRANSACTION");
diff --git a/Plugins/SqlEnterpriseFormatter/formatsavepoint.cpp b/Plugins/SqlEnterpriseFormatter/formatsavepoint.cpp
index 3f34679..5ce474f 100644
--- a/Plugins/SqlEnterpriseFormatter/formatsavepoint.cpp
+++ b/Plugins/SqlEnterpriseFormatter/formatsavepoint.cpp
@@ -8,5 +8,6 @@ FormatSavepoint::FormatSavepoint(SqliteSavepoint* savepoint) :
void FormatSavepoint::formatInternal()
{
+ handleExplainQuery(savepoint);
withKeyword("SAVEPOINT").withId(savepoint->name).withSemicolon();
}
diff --git a/Plugins/SqlEnterpriseFormatter/formatselect.cpp b/Plugins/SqlEnterpriseFormatter/formatselect.cpp
index 50aa8c2..4d2a229 100644
--- a/Plugins/SqlEnterpriseFormatter/formatselect.cpp
+++ b/Plugins/SqlEnterpriseFormatter/formatselect.cpp
@@ -9,6 +9,7 @@ FormatSelect::FormatSelect(SqliteSelect* select) :
void FormatSelect::formatInternal()
{
+ handleExplainQuery(select);
markKeywordLineUp("SELECT");
if (select->with)
diff --git a/Plugins/SqlEnterpriseFormatter/formatstatement.cpp b/Plugins/SqlEnterpriseFormatter/formatstatement.cpp
index be5bc49..dfdbb14 100644
--- a/Plugins/SqlEnterpriseFormatter/formatstatement.cpp
+++ b/Plugins/SqlEnterpriseFormatter/formatstatement.cpp
@@ -453,6 +453,16 @@ FormatStatement&FormatStatement::withSeparator(FormatStatement::ListSeparator se
return *this;
}
+void FormatStatement::handleExplainQuery(SqliteQuery* query)
+{
+ if (query->explain)
+ {
+ withKeyword("EXPLAIN");
+ if (query->queryPlan)
+ withKeyword("QUERY").withKeyword("PLAN");
+ }
+}
+
FormatStatement& FormatStatement::withIdList(const QStringList& names, const QString& indentName, ListSeparator sep)
{
if (!indentName.isNull())
diff --git a/Plugins/SqlEnterpriseFormatter/formatstatement.h b/Plugins/SqlEnterpriseFormatter/formatstatement.h
index 1702a3d..6bd0fea 100644
--- a/Plugins/SqlEnterpriseFormatter/formatstatement.h
+++ b/Plugins/SqlEnterpriseFormatter/formatstatement.h
@@ -103,6 +103,8 @@ class FormatStatement
}
protected:
+ void handleExplainQuery(SqliteQuery* query);
+
virtual void formatInternal() = 0;
virtual void resetInternal();
diff --git a/Plugins/SqlEnterpriseFormatter/formatupdate.cpp b/Plugins/SqlEnterpriseFormatter/formatupdate.cpp
index ffc3911..54ce927 100644
--- a/Plugins/SqlEnterpriseFormatter/formatupdate.cpp
+++ b/Plugins/SqlEnterpriseFormatter/formatupdate.cpp
@@ -10,6 +10,7 @@ FormatUpdate::FormatUpdate(SqliteUpdate* upd) :
void FormatUpdate::formatInternal()
{
+ handleExplainQuery(upd);
if (upd->with)
withStatement(upd->with);
diff --git a/Plugins/SqlEnterpriseFormatter/formatvacuum.cpp b/Plugins/SqlEnterpriseFormatter/formatvacuum.cpp
index 29b95e4..8cbff57 100644
--- a/Plugins/SqlEnterpriseFormatter/formatvacuum.cpp
+++ b/Plugins/SqlEnterpriseFormatter/formatvacuum.cpp
@@ -1,4 +1,5 @@
#include "formatvacuum.h"
+#include "parser/ast/sqlitevacuum.h"
FormatVacuum::FormatVacuum(SqliteVacuum* vacuum) :
vacuum(vacuum)
@@ -7,5 +8,6 @@ FormatVacuum::FormatVacuum(SqliteVacuum* vacuum) :
void FormatVacuum::formatInternal()
{
+ handleExplainQuery(vacuum);
withKeyword("VACUUM").withSemicolon();
}
diff --git a/Plugins/SqlEnterpriseFormatter/sqlenterpriseformatter.json b/Plugins/SqlEnterpriseFormatter/sqlenterpriseformatter.json
index 43095c2..85d6414 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": 10004,
+ "version": 10005,
"author": "SalSoft"
}
diff --git a/Plugins/SqlEnterpriseFormatter/sqlenterpriseformatter.qrc b/Plugins/SqlEnterpriseFormatter/sqlenterpriseformatter.qrc
index 4a62ae6..00b290f 100644
--- a/Plugins/SqlEnterpriseFormatter/sqlenterpriseformatter.qrc
+++ b/Plugins/SqlEnterpriseFormatter/sqlenterpriseformatter.qrc
@@ -6,5 +6,7 @@
<file>SqlEnterpriseFormatter_pl.qm</file>
<file>SqlEnterpriseFormatter_ru.qm</file>
<file>SqlEnterpriseFormatter_fr.qm</file>
+ <file>SqlEnterpriseFormatter_sk.qm</file>
+ <file>SqlEnterpriseFormatter_zh_CN.qm</file>
</qresource>
</RCC>