diff options
| author | 2016-06-13 18:42:42 -0400 | |
|---|---|---|
| committer | 2016-06-13 18:42:42 -0400 | |
| commit | 5d9314f134ddd3dc4c853e398ac90ba247fb2e4f (patch) | |
| tree | 5c457fc188036988d7abd29a3eb09931e406510f /Plugins/SqlEnterpriseFormatter/formatcreateview.cpp | |
| parent | 8e640722c62692818ab840d50b3758f89a41a54e (diff) | |
Imported Upstream version 3.1.0upstream/3.1.0
Diffstat (limited to 'Plugins/SqlEnterpriseFormatter/formatcreateview.cpp')
| -rw-r--r-- | Plugins/SqlEnterpriseFormatter/formatcreateview.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Plugins/SqlEnterpriseFormatter/formatcreateview.cpp b/Plugins/SqlEnterpriseFormatter/formatcreateview.cpp index e8d0351..52a49a2 100644 --- a/Plugins/SqlEnterpriseFormatter/formatcreateview.cpp +++ b/Plugins/SqlEnterpriseFormatter/formatcreateview.cpp @@ -1,6 +1,7 @@ #include "formatcreateview.h" #include "parser/ast/sqlitecreateview.h" #include "parser/ast/sqliteselect.h" +#include "parser/ast/sqliteindexedcolumn.h" FormatCreateView::FormatCreateView(SqliteCreateView* createView) : createView(createView) @@ -23,5 +24,10 @@ void FormatCreateView::formatInternal() if (dialect == Dialect::Sqlite3 && !createView->database.isNull()) withId(createView->database).withIdDot(); - withId(createView->view).withKeyword("AS").withNewLine().withIncrIndent().withStatement(createView->select).withSemicolon().withDecrIndent(); + withId(createView->view); + + if (createView->columns.size() > 0) + withParDefLeft().withStatementList<SqliteIndexedColumn>(createView->columns).withParDefRight(); + + withKeyword("AS").withNewLine().withIncrIndent().withStatement(createView->select).withSemicolon().withDecrIndent(); } |
