From 1fdc150116cad39aae5c5da407c3312b47a59e3a Mon Sep 17 00:00:00 2001 From: Unit 193 Date: Fri, 17 Dec 2021 07:06:30 -0500 Subject: New upstream version 3.3.3+dfsg1. --- .../SqlEnterpriseFormatter/formatcreateindex.cpp | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) (limited to 'Plugins/SqlEnterpriseFormatter/formatcreateindex.cpp') diff --git a/Plugins/SqlEnterpriseFormatter/formatcreateindex.cpp b/Plugins/SqlEnterpriseFormatter/formatcreateindex.cpp index ac5fd7c..7a984bd 100644 --- a/Plugins/SqlEnterpriseFormatter/formatcreateindex.cpp +++ b/Plugins/SqlEnterpriseFormatter/formatcreateindex.cpp @@ -19,25 +19,13 @@ void FormatCreateIndex::formatInternal() if (createIndex->ifNotExistsKw) withKeyword("IF").withKeyword("NOT").withKeyword("EXISTS"); - if (dialect == Dialect::Sqlite2) - { - withId(createIndex->index).withKeyword("ON"); + if (!createIndex->database.isNull()) + withId(createIndex->database).withIdDot(); - if (!createIndex->database.isNull()) - withId(createIndex->database).withIdDot(); + withId(createIndex->index).withKeyword("ON").withId(createIndex->table).withParDefLeft().withStatementList(createIndex->indexedColumns).withParDefRight(); - withId(createIndex->table).withParDefLeft().withStatementList(createIndex->indexedColumns).withParDefRight().withConflict(createIndex->onConflict); - } - else - { - if (!createIndex->database.isNull()) - withId(createIndex->database).withIdDot(); - - withId(createIndex->index).withKeyword("ON").withId(createIndex->table).withParDefLeft().withStatementList(createIndex->indexedColumns).withParDefRight(); - - if (createIndex->where) - withKeyword("WHERE").withStatement(createIndex->where); - } + if (createIndex->where) + withKeyword("WHERE").withStatement(createIndex->where); withSemicolon(); } -- cgit v1.2.3