diff --git a/src/SqlExecutionArea.cpp b/src/SqlExecutionArea.cpp index fc3db0af..810091f2 100644 --- a/src/SqlExecutionArea.cpp +++ b/src/SqlExecutionArea.cpp @@ -103,28 +103,6 @@ void SqlExecutionArea::saveAsCsv() dialog.exec(); } -void SqlExecutionArea::saveAsView() -{ - // Let the user select a name for the new view and make sure it doesn't already exist - QString name; - while(true) - { - name = QInputDialog::getText(this, qApp->applicationName(), tr("Please specify the view name")).trimmed(); - if(name.isEmpty()) - return; - if(db.getObjectByName(sqlb::ObjectIdentifier("main", name)) != nullptr) - QMessageBox::warning(this, qApp->applicationName(), tr("There is already an object with that name. Please choose a different name.")); - else - break; - } - - // Create the view - if(db.executeSQL(QString("CREATE VIEW %1 AS %2;").arg(sqlb::escapeIdentifier(name)).arg(model->query()))) - QMessageBox::information(this, qApp->applicationName(), tr("View successfully created.")); - else - QMessageBox::warning(this, qApp->applicationName(), tr("Error creating view: %1").arg(db.lastError())); -} - void SqlExecutionArea::reloadSettings() { // Reload editor and table settings diff --git a/src/SqlExecutionArea.h b/src/SqlExecutionArea.h index ef68fc7a..b8c53326 100644 --- a/src/SqlExecutionArea.h +++ b/src/SqlExecutionArea.h @@ -33,7 +33,6 @@ public: public slots: virtual void finishExecution(const QString& result, const bool ok); virtual void saveAsCsv(); - virtual void saveAsView(); virtual void reloadSettings(); void fetchedData(); void setFindFrameVisibility(bool show);