diff options
author | Unit 193 <unit193@ubuntu.com> | 2014-12-14 08:24:26 -0500 |
---|---|---|
committer | Unit 193 <unit193@ubuntu.com> | 2014-12-14 08:24:26 -0500 |
commit | 89214766d8e3e7b8dd749a1fa18a5b9727f5010d (patch) | |
tree | 34ad5aa84ac9674ebb5b7a23b5a3377e8629ee33 /Plugins | |
parent | 7167ce41b61d2ba2cdb526777a4233eb84a3b66a (diff) | |
download | sqlitestudio-89214766d8e3e7b8dd749a1fa18a5b9727f5010d.tar.bz2 sqlitestudio-89214766d8e3e7b8dd749a1fa18a5b9727f5010d.tar.xz sqlitestudio-89214766d8e3e7b8dd749a1fa18a5b9727f5010d.tar.zst |
Imported Upstream version 3.0.0upstream/3.0.0
Diffstat (limited to 'Plugins')
-rw-r--r-- | Plugins/CsvExport/csvexport.cpp | 15 | ||||
-rw-r--r-- | Plugins/CsvExport/csvexport.json | 2 | ||||
-rw-r--r-- | Plugins/ScriptingTcl/ScriptingTcl.pro | 11 | ||||
-rw-r--r-- | Plugins/SqlEnterpriseFormatter/formatcreateview.cpp | 2 | ||||
-rw-r--r-- | Plugins/SqlEnterpriseFormatter/formatstatement.cpp | 3 | ||||
-rw-r--r-- | Plugins/SqlEnterpriseFormatter/sqlenterpriseformatter.json | 2 |
6 files changed, 27 insertions, 8 deletions
diff --git a/Plugins/CsvExport/csvexport.cpp b/Plugins/CsvExport/csvexport.cpp index bdaf729..fcbf841 100644 --- a/Plugins/CsvExport/csvexport.cpp +++ b/Plugins/CsvExport/csvexport.cpp @@ -59,11 +59,14 @@ bool CsvExport::beforeExportQueryResults(const QString& query, QList<QueryExecut UNUSED(providedData); defineCsvFormat(); - QStringList cols; - for (QueryExecutor::ResultColumnPtr resCol : columns) - cols << resCol->displayName; + if (cfg.CsvExport.ColumnsInFirstRow.get()) + { + QStringList cols; + for (QueryExecutor::ResultColumnPtr resCol : columns) + cols << resCol->displayName; - writeln(CsvSerializer::serialize(cols, format)); + writeln(CsvSerializer::serialize(cols, format)); + } return true; } @@ -99,7 +102,9 @@ bool CsvExport::exportTable(const QStringList& columnNames) return false; defineCsvFormat(); - writeln(CsvSerializer::serialize(columnNames, format)); + if (cfg.CsvExport.ColumnsInFirstRow.get()) + writeln(CsvSerializer::serialize(columnNames, format)); + return true; } diff --git a/Plugins/CsvExport/csvexport.json b/Plugins/CsvExport/csvexport.json index 57def5c..d19e750 100644 --- a/Plugins/CsvExport/csvexport.json +++ b/Plugins/CsvExport/csvexport.json @@ -2,6 +2,6 @@ "type": "ExportPlugin", "title": "CSV export", "description": "Provides CSV format for exporting", - "version": 10000, + "version": 10001, "author": "SalSoft" } diff --git a/Plugins/ScriptingTcl/ScriptingTcl.pro b/Plugins/ScriptingTcl/ScriptingTcl.pro index 4b89ce6..08d8796 100644 --- a/Plugins/ScriptingTcl/ScriptingTcl.pro +++ b/Plugins/ScriptingTcl/ScriptingTcl.pro @@ -36,6 +36,17 @@ linux: { # Find tclConfig.sh TCL_CONFIG_DIR = $$system(echo "puts [info library]" | tclsh) TCL_CONFIG = $$TCL_CONFIG_DIR/tclConfig.sh + message("Looking for $$TCL_CONFIG") + !exists($$TCL_CONFIG) { + # Debian case + DEBIAN_ARCH_PATH=$$system(dpkg-architecture -qDEB_HOST_MULTIARCH) + TCL_CONFIG = /usr/lib/$$DEBIAN_ARCH_PATH/tcl$$TCL_VERSION/tclConfig.sh + } + message("Looking for $$TCL_CONFIG") + !exists($$TCL_CONFIG) { + error("Could not find tclConfig.sh file. You can define its absolute path by qmake parameter: TCL_CONFIG=/path/to/tclConfig.sh") + } + message("Using tclconfig: $$TCL_CONFIG") # Define other libs required when linking with Tcl eval($$system(cat $$TCL_CONFIG | grep TCL_LIBS)) 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" } |