From 016003905ca0e8e459e3dc33e786beda8ec92f45 Mon Sep 17 00:00:00 2001 From: Unit 193 Date: Fri, 30 Jan 2015 17:00:07 -0500 Subject: Imported Upstream version 3.0.2 --- Plugins/ConfigMigration/ConfigMigration.pro | 4 + Plugins/ConfigMigration/ConfigMigration_pl.qm | Bin 0 -> 7282 bytes Plugins/ConfigMigration/ConfigMigration_pl.ts | 152 + Plugins/ConfigMigration/configmigration.cpp | 2 + Plugins/ConfigMigration/configmigration.json | 2 +- Plugins/ConfigMigration/configmigration.qrc | 3 + Plugins/ConfigMigration/configmigrationwizard.cpp | 4 +- Plugins/CsvExport/CsvExport.pro | 4 + Plugins/CsvExport/CsvExport.ui | 10 +- Plugins/CsvExport/CsvExport_pl.qm | Bin 0 -> 953 bytes Plugins/CsvExport/CsvExport_pl.ts | 57 + Plugins/CsvExport/csvexport.qrc | 3 + Plugins/CsvImport/CsvImport.pro | 4 + Plugins/CsvImport/CsvImportOptions.ui | 25 +- Plugins/CsvImport/CsvImport_pl.qm | Bin 0 -> 2366 bytes Plugins/CsvImport/CsvImport_pl.ts | 89 + Plugins/CsvImport/csvimport.json | 2 +- Plugins/CsvImport/csvimport.qrc | 3 + Plugins/HtmlExport/HtmlExport.pro | 4 + Plugins/HtmlExport/HtmlExport_pl.qm | Bin 0 -> 3840 bytes Plugins/HtmlExport/HtmlExport_pl.ts | 173 + Plugins/HtmlExport/htmlexport.qrc | 3 + Plugins/HtmlExport/htmlexport.ui | 20 +- Plugins/JsonExport/JsonExport.pro | 4 + Plugins/JsonExport/JsonExport_pl.qm | Bin 0 -> 442 bytes Plugins/JsonExport/JsonExport_pl.ts | 22 + Plugins/JsonExport/jsonexport.qrc | 3 + Plugins/JsonExport/jsonexport.ui | 10 +- Plugins/PdfExport/PdfExport.pro | 4 + Plugins/PdfExport/PdfExport_pl.qm | Bin 0 -> 3945 bytes Plugins/PdfExport/PdfExport_pl.ts | 256 + Plugins/PdfExport/pdfexport.cpp | 4 +- Plugins/PdfExport/pdfexport.qrc | 3 + Plugins/PdfExport/pdfexport.ui | 36 +- Plugins/Printing/Printing.pro | 4 + Plugins/Printing/Printing_pl.qm | Bin 0 -> 514 bytes Plugins/Printing/Printing_pl.ts | 40 + Plugins/Printing/printing.cpp | 3 + Plugins/Printing/printing.json | 2 +- Plugins/Printing/printing.qrc | 3 + Plugins/RegExpImport/RegExpImport.pro | 4 + Plugins/RegExpImport/RegExpImport_pl.qm | Bin 0 -> 3752 bytes Plugins/RegExpImport/RegExpImport_pl.ts | 86 + Plugins/RegExpImport/regexpimport.qrc | 3 + Plugins/RegExpImport/regexpimport.ui | 14 +- Plugins/ScriptingTcl/ScriptingTcl.pro | 4 + Plugins/ScriptingTcl/ScriptingTcl_pl.qm | Bin 0 -> 653 bytes Plugins/ScriptingTcl/ScriptingTcl_pl.ts | 25 + Plugins/ScriptingTcl/scriptingtcl.cpp | 6 +- Plugins/ScriptingTcl/scriptingtcl.qrc | 3 + .../SqlEnterpriseFormatter.pro | 4 + .../SqlEnterpriseFormatter_pl.qm | Bin 0 -> 5528 bytes .../SqlEnterpriseFormatter_pl.ts | 209 + .../sqlenterpriseformatter.qrc | 3 + .../sqlenterpriseformatter.ui | 80 +- Plugins/SqlExport/SqlExport.pro | 4 + Plugins/SqlExport/SqlExportCommon.ui | 8 +- Plugins/SqlExport/SqlExportQuery.ui | 16 +- Plugins/SqlExport/SqlExport_pl.qm | Bin 0 -> 2768 bytes Plugins/SqlExport/SqlExport_pl.ts | 99 + Plugins/SqlExport/sqlexport.qrc | 3 + Plugins/SqlFormatterSimple/SqlFormatterSimple.pro | 4 + Plugins/SqlFormatterSimple/SqlFormatterSimple.ui | 7 +- .../SqlFormatterSimple/SqlFormatterSimple_pl.qm | Bin 0 -> 376 bytes .../SqlFormatterSimple/SqlFormatterSimple_pl.ts | 17 + Plugins/SqlFormatterSimple/sqlformattersimple.qrc | 3 + Plugins/XmlExport/XmlExport.pro | 4 + Plugins/XmlExport/XmlExport.ui | 26 +- Plugins/XmlExport/XmlExport_pl.qm | Bin 0 -> 2551 bytes Plugins/XmlExport/XmlExport_pl.ts | 71 + Plugins/XmlExport/xmlexport.cpp | 2 +- Plugins/XmlExport/xmlexport.qrc | 3 + SQLiteStudio3/coreSQLiteStudio/ChangeLog.txt | 30 + SQLiteStudio3/coreSQLiteStudio/completionhelper.h | 2 + .../coreSQLiteStudio/coreSQLiteStudio.pro | 8 +- .../coreSQLiteStudio/coresqlitestudio.qrc | 3 + SQLiteStudio3/coreSQLiteStudio/csvserializer.cpp | 5 +- SQLiteStudio3/coreSQLiteStudio/db/abstractdb.cpp | 10 +- SQLiteStudio3/coreSQLiteStudio/db/abstractdb2.h | 9 +- SQLiteStudio3/coreSQLiteStudio/db/abstractdb3.h | 10 +- .../coreSQLiteStudio/db/queryexecutor.cpp | 61 +- SQLiteStudio3/coreSQLiteStudio/db/queryexecutor.h | 46 +- .../queryexecutordetectschemaalter.cpp | 4 + .../db/queryexecutorsteps/queryexecutorexecute.cpp | 8 +- SQLiteStudio3/coreSQLiteStudio/db/sqlquery.h | 1 - .../coreSQLiteStudio/dbversionconverter.cpp | 35 +- SQLiteStudio3/coreSQLiteStudio/exportworker.cpp | 29 +- .../coreSQLiteStudio/parser/ast/sqliteexpr.cpp | 6 +- .../parser/parser_helper_stubs.cpp | 1 + .../coreSQLiteStudio/parser/parsercontext.cpp | 7 +- .../coreSQLiteStudio/parser/sqlite2_parse.cpp | 530 +- .../coreSQLiteStudio/parser/sqlite2_parse.y | 6 + .../coreSQLiteStudio/parser/sqlite3_parse.cpp | 714 +-- .../coreSQLiteStudio/parser/sqlite3_parse.y | 7 +- .../coreSQLiteStudio/plugins/exportplugin.h | 1 + .../coreSQLiteStudio/plugins/genericexportplugin.h | 2 + .../coreSQLiteStudio/plugins/populateconstant.ui | 4 +- .../coreSQLiteStudio/plugins/populatedictionary.ui | 28 +- .../coreSQLiteStudio/plugins/populaterandom.ui | 26 +- .../coreSQLiteStudio/plugins/populaterandomtext.ui | 52 +- .../coreSQLiteStudio/plugins/populatescript.ui | 14 +- .../coreSQLiteStudio/plugins/populatesequence.ui | 14 +- SQLiteStudio3/coreSQLiteStudio/populateworker.cpp | 5 - SQLiteStudio3/coreSQLiteStudio/schemaresolver.cpp | 9 +- SQLiteStudio3/coreSQLiteStudio/schemaresolver.h | 4 +- SQLiteStudio3/coreSQLiteStudio/services/config.h | 1 + .../coreSQLiteStudio/services/exportmanager.cpp | 2 +- .../services/extralicensemanager.cpp | 99 +- .../services/extralicensemanager.h | 28 +- .../coreSQLiteStudio/services/impl/configimpl.cpp | 8 +- .../coreSQLiteStudio/services/impl/configimpl.h | 2 + .../services/impl/pluginmanagerimpl.cpp | 3 + SQLiteStudio3/coreSQLiteStudio/sqlhistorymodel.h | 2 + SQLiteStudio3/coreSQLiteStudio/sqlitestudio.cpp | 25 +- SQLiteStudio3/coreSQLiteStudio/sqlitestudio.h | 7 + SQLiteStudio3/coreSQLiteStudio/tablemodifier.cpp | 58 +- SQLiteStudio3/coreSQLiteStudio/tablemodifier.h | 17 +- SQLiteStudio3/coreSQLiteStudio/translations.cpp | 108 + SQLiteStudio3/coreSQLiteStudio/translations.h | 25 + .../translations/coreSQLiteStudio_pl.qm | Bin 0 -> 41506 bytes .../translations/coreSQLiteStudio_pl.ts | 1298 +++++ SQLiteStudio3/dirs.pri | 1 - SQLiteStudio3/guiSQLiteStudio/common/fontedit.ui | 8 +- .../guiSQLiteStudio/common/numericspinbox.cpp | 2 +- .../completer/completeritemdelegate.cpp | 4 +- .../constraints/columncollatepanel.ui | 24 +- .../constraints/columndefaultpanel.cpp | 245 +- .../constraints/columndefaultpanel.h | 16 +- .../constraints/columndefaultpanel.ui | 2 +- .../constraints/columnforeignkeypanel.cpp | 2 +- .../constraints/columnforeignkeypanel.ui | 8 +- .../constraints/columnprimarykeypanel.ui | 35 +- .../constraints/columnuniqueandnotnullpanel.ui | 24 +- .../constraints/constraintcheckpanel.ui | 6 +- .../constraints/tableforeignkeypanel.cpp | 3 +- .../constraints/tableforeignkeypanel.ui | 8 +- .../constraints/tablepkanduniquepanel.ui | 2 +- .../guiSQLiteStudio/datagrid/sqlqueryitem.cpp | 14 +- .../datagrid/sqlqueryitemdelegate.cpp | 12 +- .../datagrid/sqlqueryitemdelegate.h | 1 + .../guiSQLiteStudio/datagrid/sqlquerymodel.cpp | 32 +- .../guiSQLiteStudio/datagrid/sqlquerymodel.h | 2 + .../datagrid/sqlquerymodelcolumn.cpp | 9 +- .../guiSQLiteStudio/datagrid/sqlqueryview.cpp | 152 +- .../guiSQLiteStudio/datagrid/sqlqueryview.h | 6 +- .../guiSQLiteStudio/datagrid/sqltablemodel.cpp | 16 +- SQLiteStudio3/guiSQLiteStudio/dblistmodel.cpp | 5 + SQLiteStudio3/guiSQLiteStudio/dblistmodel.h | 1 + SQLiteStudio3/guiSQLiteStudio/dbobjectdialogs.h | 2 + SQLiteStudio3/guiSQLiteStudio/dbtree/dbtree.cpp | 49 +- SQLiteStudio3/guiSQLiteStudio/dbtree/dbtree.h | 8 +- .../guiSQLiteStudio/dialogs/aboutdialog.cpp | 56 +- .../guiSQLiteStudio/dialogs/aboutdialog.h | 5 +- .../guiSQLiteStudio/dialogs/aboutdialog.ui | 93 +- .../guiSQLiteStudio/dialogs/bugdialog.cpp | 1 - SQLiteStudio3/guiSQLiteStudio/dialogs/bugdialog.ui | 4 +- .../dialogs/bugreportlogindialog.ui | 2 +- .../guiSQLiteStudio/dialogs/columndialog.ui | 2 +- .../guiSQLiteStudio/dialogs/configdialog.cpp | 22 +- .../guiSQLiteStudio/dialogs/configdialog.h | 1 + .../guiSQLiteStudio/dialogs/configdialog.ui | 180 +- .../guiSQLiteStudio/dialogs/constraintdialog.ui | 2 +- .../guiSQLiteStudio/dialogs/dbconverterdialog.cpp | 1 - .../guiSQLiteStudio/dialogs/dbconverterdialog.ui | 2 +- .../guiSQLiteStudio/dialogs/errorsconfirmdialog.ui | 2 +- .../guiSQLiteStudio/dialogs/exportdialog.ui | 20 +- .../guiSQLiteStudio/dialogs/importdialog.ui | 8 +- .../guiSQLiteStudio/dialogs/indexdialog.ui | 2 +- .../guiSQLiteStudio/dialogs/languagedialog.cpp | 34 + .../guiSQLiteStudio/dialogs/languagedialog.h | 27 + .../guiSQLiteStudio/dialogs/languagedialog.ui | 77 + .../guiSQLiteStudio/dialogs/messagelistdialog.ui | 2 +- .../guiSQLiteStudio/dialogs/searchtextdialog.ui | 4 +- .../dialogs/triggercolumnsdialog.ui | 28 +- .../guiSQLiteStudio/dialogs/triggerdialog.ui | 4 +- SQLiteStudio3/guiSQLiteStudio/formmanager.cpp | 20 +- SQLiteStudio3/guiSQLiteStudio/formmanager.h | 2 + .../guiSQLiteStudio/forms/sqlformatterplugin.ui | 2 +- SQLiteStudio3/guiSQLiteStudio/guiSQLiteStudio.pro | 14 +- SQLiteStudio3/guiSQLiteStudio/guiSQLiteStudio.qrc | 5 + SQLiteStudio3/guiSQLiteStudio/iconmanager.cpp | 5 + SQLiteStudio3/guiSQLiteStudio/iconmanager.h | 2 + SQLiteStudio3/guiSQLiteStudio/icons.qrc | 1 + .../guiSQLiteStudio/img/reset_autoincrement.png | Bin 0 -> 708 bytes SQLiteStudio3/guiSQLiteStudio/mainwindow.cpp | 7 + SQLiteStudio3/guiSQLiteStudio/mainwindow.h | 1 + SQLiteStudio3/guiSQLiteStudio/mainwindow.ui | 7 +- .../guiSQLiteStudio/multieditor/multieditordate.h | 2 + .../multieditor/multieditornumeric.cpp | 3 +- .../multieditor/multieditornumeric.h | 2 + .../guiSQLiteStudio/multieditor/multieditortime.h | 2 + SQLiteStudio3/guiSQLiteStudio/sqlcompareview.cpp | 3 - SQLiteStudio3/guiSQLiteStudio/sqleditor.cpp | 88 +- SQLiteStudio3/guiSQLiteStudio/sqleditor.h | 3 + SQLiteStudio3/guiSQLiteStudio/taskbar.cpp | 2 +- SQLiteStudio3/guiSQLiteStudio/taskbar.h | 1 - .../translations/guiSQLiteStudio_pl.qm | Bin 0 -> 137929 bytes .../translations/guiSQLiteStudio_pl.ts | 5980 ++++++++++++++++++++ SQLiteStudio3/guiSQLiteStudio/uiconfig.h | 1 + .../windows/bugreporthistorywindow.ui | 2 +- .../guiSQLiteStudio/windows/collationseditor.ui | 2 +- .../guiSQLiteStudio/windows/ddlhistorywindow.ui | 2 +- .../guiSQLiteStudio/windows/editorwindow.cpp | 19 +- .../guiSQLiteStudio/windows/editorwindow.h | 2 +- .../guiSQLiteStudio/windows/editorwindow.ui | 45 +- .../guiSQLiteStudio/windows/functionseditor.ui | 2 +- .../guiSQLiteStudio/windows/tablewindow.cpp | 35 +- .../guiSQLiteStudio/windows/tablewindow.h | 2 + .../guiSQLiteStudio/windows/tablewindow.ui | 4 +- .../guiSQLiteStudio/windows/viewwindow.cpp | 6 +- .../guiSQLiteStudio/windows/viewwindow.ui | 34 +- SQLiteStudio3/lang.tcl | 114 + SQLiteStudio3/sqlitestudio/main.cpp | 20 +- SQLiteStudio3/sqlitestudio/sqlitestudio.pro | 107 +- SQLiteStudio3/sqlitestudio/sqlitestudio.qrc | 5 + .../sqlitestudio/translations/sqlitestudio_pl.qm | Bin 0 -> 1942 bytes .../sqlitestudio/translations/sqlitestudio_pl.ts | 51 + .../sqlitestudiocli/commands/clicommandadd.h | 2 + .../sqlitestudiocli/commands/clicommandcd.cpp | 2 +- .../sqlitestudiocli/commands/clicommandcd.h | 2 + .../sqlitestudiocli/commands/clicommandclose.h | 2 + .../sqlitestudiocli/commands/clicommanddblist.cpp | 8 +- .../sqlitestudiocli/commands/clicommanddblist.h | 2 + .../sqlitestudiocli/commands/clicommanddesc.h | 2 + .../sqlitestudiocli/commands/clicommanddir.h | 2 + .../sqlitestudiocli/commands/clicommandexit.h | 2 + .../sqlitestudiocli/commands/clicommandhelp.h | 2 + .../sqlitestudiocli/commands/clicommandhistory.cpp | 2 +- .../sqlitestudiocli/commands/clicommandhistory.h | 2 + .../sqlitestudiocli/commands/clicommandmode.h | 2 + .../sqlitestudiocli/commands/clicommandnullvalue.h | 2 + .../sqlitestudiocli/commands/clicommandopen.h | 2 + .../sqlitestudiocli/commands/clicommandpwd.h | 2 + .../sqlitestudiocli/commands/clicommandremove.h | 2 + .../sqlitestudiocli/commands/clicommandtables.cpp | 2 +- .../sqlitestudiocli/commands/clicommandtables.h | 2 + .../sqlitestudiocli/commands/clicommandtree.h | 2 + .../sqlitestudiocli/commands/clicommanduse.h | 2 + SQLiteStudio3/sqlitestudiocli/main.cpp | 3 +- SQLiteStudio3/sqlitestudiocli/sqlitestudiocli.pro | 207 +- SQLiteStudio3/sqlitestudiocli/sqlitestudiocli.qrc | 5 + .../translations/sqlitestudiocli_pl.qm | Bin 0 -> 39063 bytes .../translations/sqlitestudiocli_pl.ts | 642 +++ 243 files changed, 12291 insertions(+), 1537 deletions(-) create mode 100644 Plugins/ConfigMigration/ConfigMigration_pl.qm create mode 100644 Plugins/ConfigMigration/ConfigMigration_pl.ts create mode 100644 Plugins/CsvExport/CsvExport_pl.qm create mode 100644 Plugins/CsvExport/CsvExport_pl.ts create mode 100644 Plugins/CsvImport/CsvImport_pl.qm create mode 100644 Plugins/CsvImport/CsvImport_pl.ts create mode 100644 Plugins/HtmlExport/HtmlExport_pl.qm create mode 100644 Plugins/HtmlExport/HtmlExport_pl.ts create mode 100644 Plugins/JsonExport/JsonExport_pl.qm create mode 100644 Plugins/JsonExport/JsonExport_pl.ts create mode 100644 Plugins/PdfExport/PdfExport_pl.qm create mode 100644 Plugins/PdfExport/PdfExport_pl.ts create mode 100644 Plugins/Printing/Printing_pl.qm create mode 100644 Plugins/Printing/Printing_pl.ts create mode 100644 Plugins/RegExpImport/RegExpImport_pl.qm create mode 100644 Plugins/RegExpImport/RegExpImport_pl.ts create mode 100644 Plugins/ScriptingTcl/ScriptingTcl_pl.qm create mode 100644 Plugins/ScriptingTcl/ScriptingTcl_pl.ts create mode 100644 Plugins/SqlEnterpriseFormatter/SqlEnterpriseFormatter_pl.qm create mode 100644 Plugins/SqlEnterpriseFormatter/SqlEnterpriseFormatter_pl.ts create mode 100644 Plugins/SqlExport/SqlExport_pl.qm create mode 100644 Plugins/SqlExport/SqlExport_pl.ts create mode 100644 Plugins/SqlFormatterSimple/SqlFormatterSimple_pl.qm create mode 100644 Plugins/SqlFormatterSimple/SqlFormatterSimple_pl.ts create mode 100644 Plugins/XmlExport/XmlExport_pl.qm create mode 100644 Plugins/XmlExport/XmlExport_pl.ts create mode 100644 SQLiteStudio3/coreSQLiteStudio/translations.cpp create mode 100644 SQLiteStudio3/coreSQLiteStudio/translations.h create mode 100644 SQLiteStudio3/coreSQLiteStudio/translations/coreSQLiteStudio_pl.qm create mode 100644 SQLiteStudio3/coreSQLiteStudio/translations/coreSQLiteStudio_pl.ts create mode 100644 SQLiteStudio3/guiSQLiteStudio/dialogs/languagedialog.cpp create mode 100644 SQLiteStudio3/guiSQLiteStudio/dialogs/languagedialog.h create mode 100644 SQLiteStudio3/guiSQLiteStudio/dialogs/languagedialog.ui create mode 100644 SQLiteStudio3/guiSQLiteStudio/guiSQLiteStudio.qrc create mode 100644 SQLiteStudio3/guiSQLiteStudio/img/reset_autoincrement.png create mode 100644 SQLiteStudio3/guiSQLiteStudio/translations/guiSQLiteStudio_pl.qm create mode 100644 SQLiteStudio3/guiSQLiteStudio/translations/guiSQLiteStudio_pl.ts create mode 100755 SQLiteStudio3/lang.tcl create mode 100644 SQLiteStudio3/sqlitestudio/sqlitestudio.qrc create mode 100644 SQLiteStudio3/sqlitestudio/translations/sqlitestudio_pl.qm create mode 100644 SQLiteStudio3/sqlitestudio/translations/sqlitestudio_pl.ts create mode 100644 SQLiteStudio3/sqlitestudiocli/sqlitestudiocli.qrc create mode 100644 SQLiteStudio3/sqlitestudiocli/translations/sqlitestudiocli_pl.qm create mode 100644 SQLiteStudio3/sqlitestudiocli/translations/sqlitestudiocli_pl.ts diff --git a/Plugins/ConfigMigration/ConfigMigration.pro b/Plugins/ConfigMigration/ConfigMigration.pro index 965cfeb..aae8b5b 100644 --- a/Plugins/ConfigMigration/ConfigMigration.pro +++ b/Plugins/ConfigMigration/ConfigMigration.pro @@ -29,3 +29,7 @@ FORMS += \ RESOURCES += \ configmigration.qrc + + +TRANSLATIONS += ConfigMigration_pl.ts + diff --git a/Plugins/ConfigMigration/ConfigMigration_pl.qm b/Plugins/ConfigMigration/ConfigMigration_pl.qm new file mode 100644 index 0000000..b62b803 Binary files /dev/null and b/Plugins/ConfigMigration/ConfigMigration_pl.qm differ diff --git a/Plugins/ConfigMigration/ConfigMigration_pl.ts b/Plugins/ConfigMigration/ConfigMigration_pl.ts new file mode 100644 index 0000000..08919fd --- /dev/null +++ b/Plugins/ConfigMigration/ConfigMigration_pl.ts @@ -0,0 +1,152 @@ + + + + + ConfigMigration + + + A configuration from old SQLiteStudio 2.x.x has been detected. Would you like to migrate old settings into the current version? <a href="%1">Click here to do that</a>. + Wykryto ustawienia ze starej wersji SQLiteStudio 2.x.x. Czy chcesz zmigrować stare ustawienia do aktualnej wersji? <a href="%1">Kliknij, aby to zrobić</a>. + + + + Bug reports history (%1) + Historia zgłoszonych błędów (%1) + + + + Database list (%1) + Lista baz danych (%1) + + + + Custom SQL functions (%1) + Własne funkcje SQL (%1) + + + + SQL queries history (%1) + Historia zapytań SQL (%1) + + + + ConfigMigrationWizard + + + Configuration migration + Migracja ustawień + + + + Items to migrate + Elementy do zmigrowania + + + + This is a list of items found in the old configuration file, which can be migrated into the current configuration. + To jest lista elementów znalezionych w starym pliku konfiguracyjnym, które mogą być zmigrowane do aktualnych ustawień. + + + + Options + Opcje + + + + Put imported databases into separate group + Umieść zaimportowane bazy danych w osobnej grupie + + + + Group name + Nazwa grupy + + + + Enter a non-empty name. + Wprowadź niepustą nazwę. + + + + Top level group named '%1' already exists. Enter a group name that does not exist yet. + Grupa o nazwie '%1' istnieje już na najwyższym poziomie. Wprowadź nazwę grupy, która jeszcze nie istnieje. + + + + Could not open old configuration file in order to migrate settings from it. + Nie udało się otworzyć starego pliku ustawień w celu zmigtowania z niego ustawień. + + + + Could not open current configuration file in order to migrate settings from old configuration file. + Nie udało się otworzyć aktualnego pliku ustawień w celu zmigrowania do niego ustawień ze starego pliku konfiguracyjnego. + + + + Could not commit migrated data into new configuration file: %1 + Nie udało się zatwierdzenie zmigrowanych danych w nowym pliku ustawień: %1 + + + + Could not read bug reports history from old configuration file in order to migrate it: %1 + Nie udał się odczyt historii zgłoszeń błędów ze starego pliku konfiguracyjnego w celu jej zmigrowania: %1 + + + + Could not insert a bug reports history entry into new configuration file: %1 + Nie udało się dodać wpisów historii zgłoszeń błędów do nowego pliku ustawień: %1 + + + + Could not read database list from old configuration file in order to migrate it: %1 + Nie udało się odczytać listy baz danych ze starego pliku ustawień w celu jej zmigtowania: %1 + + + + Could not query for available order for containing group in new configuration file in order to migrate the database list: %1 + Could query for available order for containing group in new configuration file in order to migrate the database list: %1 + Nie udało się odpytać o dostępną kolejność dla grupy zawierającej w nowym pliku ustawień, w celu zmigrowania listy baz danych: %1 + + + + Could not create containing group in new configuration file in order to migrate the database list: %1 + Nie udało się stworzyć grupy w nowym pliku ustawień, w celu zmigrowania listy baz danych: %1 + + + + Could not insert a database entry into new configuration file: %1 + Nie udało się dodać wpisu bazy danych do nowego pliku ustawień: %1 + + + + Could not query for available order for next database in new configuration file in order to migrate the database list: %1 + Could query for available order for next database in new configuration file in order to migrate the database list: %1 + Nie udało się odpytać o dostępną kolejność dla następnej bazy w nowym pliku ustawień, w celu zmigrowania listy baz danych: %1 + + + + Could not create group referencing the database in new configuration file: %1 + Nie udało się utworzyć grupy odwołującej się do bazy danych w nowym pliku ustawień: %1 + + + + Could not read function list from old configuration file in order to migrate it: %1 + Nie udało się odczytać listy funkcji ze starego pliku ustawień w celu jej zmigrowania: %1 + + + + Could not read SQL queries history from old configuration file in order to migrate it: %1 + Nie udało się odczytać historii zapytań SQL ze starego pliku ustawień w celu zmigrowania jej: %1 + + + + Could not read next ID for SQL queries history in new configuration file: %1 + Nie udało się odczytać następnego ID dla historii zapytań SQL w nowym pliku ustawień: %1 + + + + Could not insert SQL history entry into new configuration file: %1 + Nie udało się dodanie wpisu do historii SQL w nowym pliku ustawień: %1 + + + diff --git a/Plugins/ConfigMigration/configmigration.cpp b/Plugins/ConfigMigration/configmigration.cpp index cd49d24..8d75e37 100644 --- a/Plugins/ConfigMigration/configmigration.cpp +++ b/Plugins/ConfigMigration/configmigration.cpp @@ -5,6 +5,7 @@ #include "statusfield.h" #include "configmigrationwizard.h" #include "db/dbsqlite3.h" +#include "translations.h" #include #include #include @@ -17,6 +18,7 @@ ConfigMigration::ConfigMigration() bool ConfigMigration::init() { Q_INIT_RESOURCE(configmigration); + loadTranslation("ConfigMigration"); if (cfg.CfgMigration.Migrated.get()) { diff --git a/Plugins/ConfigMigration/configmigration.json b/Plugins/ConfigMigration/configmigration.json index 14e5d4b..a8c62d3 100644 --- a/Plugins/ConfigMigration/configmigration.json +++ b/Plugins/ConfigMigration/configmigration.json @@ -2,7 +2,7 @@ "type": "GeneralPurposePlugin", "title": "Configuration migration", "description": "Performs migration from SQLiteStudio 2.1.x configuration to version 3.0.0.", - "version": 10001, + "version": 10002, "author": "SalSoft", "gui": true } diff --git a/Plugins/ConfigMigration/configmigration.qrc b/Plugins/ConfigMigration/configmigration.qrc index 9df7d5e..a46382a 100644 --- a/Plugins/ConfigMigration/configmigration.qrc +++ b/Plugins/ConfigMigration/configmigration.qrc @@ -2,4 +2,7 @@ config_migration.png + + ConfigMigration_pl.qm + diff --git a/Plugins/ConfigMigration/configmigrationwizard.cpp b/Plugins/ConfigMigration/configmigrationwizard.cpp index afdf705..7868761 100644 --- a/Plugins/ConfigMigration/configmigrationwizard.cpp +++ b/Plugins/ConfigMigration/configmigrationwizard.cpp @@ -212,7 +212,7 @@ bool ConfigMigrationWizard::migrateDatabases(Db* oldCfgDb, Db* newCfgDb) groupResults = newCfgDb->exec(groupOrderQuery.arg("IS NULL")); if (groupResults->isError()) { - notifyError(tr("Could query for available order for containing group in new configuration file in order to migrate the database list: %1") + notifyError(tr("Could not query for available order for containing group in new configuration file in order to migrate the database list: %1") .arg(groupResults->getErrorText())); return false; } @@ -256,7 +256,7 @@ bool ConfigMigrationWizard::migrateDatabases(Db* oldCfgDb, Db* newCfgDb) if (groupResults->isError()) { - notifyError(tr("Could query for available order for next database in new configuration file in order to migrate the database list: %1") + notifyError(tr("Could not query for available order for next database in new configuration file in order to migrate the database list: %1") .arg(groupResults->getErrorText())); return false; } diff --git a/Plugins/CsvExport/CsvExport.pro b/Plugins/CsvExport/CsvExport.pro index 9ffc8f9..f1fccc6 100644 --- a/Plugins/CsvExport/CsvExport.pro +++ b/Plugins/CsvExport/CsvExport.pro @@ -27,3 +27,7 @@ OTHER_FILES += \ RESOURCES += \ csvexport.qrc + + +TRANSLATIONS += CsvExport_pl.ts + diff --git a/Plugins/CsvExport/CsvExport.ui b/Plugins/CsvExport/CsvExport.ui index ec80b57..8ab93c6 100644 --- a/Plugins/CsvExport/CsvExport.ui +++ b/Plugins/CsvExport/CsvExport.ui @@ -11,7 +11,7 @@ - Form + Form @@ -20,7 +20,7 @@ Column names in first row - CsvExport.ColumnsInFirstRow + CsvExport.ColumnsInFirstRow @@ -34,7 +34,7 @@ - CsvExport.Separator + CsvExport.Separator @@ -72,7 +72,7 @@ - CsvExport.CustomSeparator + CsvExport.CustomSeparator @@ -89,7 +89,7 @@ Empty string - CsvExport.NullValueString + CsvExport.NullValueString diff --git a/Plugins/CsvExport/CsvExport_pl.qm b/Plugins/CsvExport/CsvExport_pl.qm new file mode 100644 index 0000000..4d64a8b Binary files /dev/null and b/Plugins/CsvExport/CsvExport_pl.qm differ diff --git a/Plugins/CsvExport/CsvExport_pl.ts b/Plugins/CsvExport/CsvExport_pl.ts new file mode 100644 index 0000000..a925db2 --- /dev/null +++ b/Plugins/CsvExport/CsvExport_pl.ts @@ -0,0 +1,57 @@ + + + + + CsvExport + + + Column names in first row + Nazwy kolumn w pierwszym wierszu + + + + Column separator: + Separator kolumny: + + + + , (comma) + , (przecinek) + + + + ; (semicolon) + ; (średnik) + + + + \t (tab) + \t (znak tabulacji) + + + + (whitespace) + (spacja) + + + + Custom: + Własny: + + + + Export NULL values as: + Eksportuj wartości NULL jako: + + + + Empty string + Pusty łańcuch + + + + Enter the custom separator character. + Wprowadź własny znak separatora. + + + diff --git a/Plugins/CsvExport/csvexport.qrc b/Plugins/CsvExport/csvexport.qrc index 21d7213..f72a0e4 100644 --- a/Plugins/CsvExport/csvexport.qrc +++ b/Plugins/CsvExport/csvexport.qrc @@ -2,4 +2,7 @@ CsvExport.ui + + CsvExport_pl.qm + diff --git a/Plugins/CsvImport/CsvImport.pro b/Plugins/CsvImport/CsvImport.pro index dfdb15b..fdd85b6 100644 --- a/Plugins/CsvImport/CsvImport.pro +++ b/Plugins/CsvImport/CsvImport.pro @@ -26,3 +26,7 @@ OTHER_FILES += \ RESOURCES += \ csvimport.qrc + + +TRANSLATIONS += CsvImport_pl.ts + diff --git a/Plugins/CsvImport/CsvImportOptions.ui b/Plugins/CsvImport/CsvImportOptions.ui index 5a1c6ab..ff06613 100644 --- a/Plugins/CsvImport/CsvImportOptions.ui +++ b/Plugins/CsvImport/CsvImportOptions.ui @@ -6,18 +6,18 @@ 0 0 - 333 + 365 90 - Form + Form - CsvImport.Separator + CsvImport.Separator @@ -48,11 +48,14 @@ - - CsvImport.FirstRowAsColumns + + <p>Enable this if the first data line in your CSV file represents column names. You don't want column names to be imported into the table as a regular data.</p> - First row represents column names + Skip first row of data + + + CsvImport.FirstRowAsColumns @@ -72,18 +75,18 @@ - CsvImport.CustomSeparator + CsvImport.CustomSeparator - - CsvImport.NullValues - NULL values: + + CsvImport.NullValues + @@ -92,7 +95,7 @@ If your CSV data contains null values, define how are they represented in the CSV. - CsvImport.NullValueString + CsvImport.NullValueString diff --git a/Plugins/CsvImport/CsvImport_pl.qm b/Plugins/CsvImport/CsvImport_pl.qm new file mode 100644 index 0000000..2e0a4e0 Binary files /dev/null and b/Plugins/CsvImport/CsvImport_pl.qm differ diff --git a/Plugins/CsvImport/CsvImport_pl.ts b/Plugins/CsvImport/CsvImport_pl.ts new file mode 100644 index 0000000..ca9a7aa --- /dev/null +++ b/Plugins/CsvImport/CsvImport_pl.ts @@ -0,0 +1,89 @@ + + + + + CsvImport + + + Cannot read file %1 + Nie można odczytać pliku %1 + + + + Could not find any data in the file %1. + Nie znaleziono danych w pliku %1. + + + + Enter the custom separator character. + Wprowadź własny znak separatora. + + + + Enter the value that will be interpreted as a NULL. + Wprowadź wartość, która będzie interpretowana jako NULL. + + + + CSV files (*.csv);;Text files (*.txt);;All files (*) + Pliki CSV (*.csv);;Pliki tekstowe (*.txt);;Wszystkie pliki (*) + + + + csvImportOptions + + + , (comma) + , (przecinek) + + + + ; (semicolon) + ; (średnik) + + + + \t (tab) + \t (znak tabulacji) + + + + (whitespace) + (spacja) + + + + Custom: + Własny: + + + + <p>Enable this if the first data line in your CSV file represents column names. You don't want column names to be imported into the table as a regular data.</p> + <p>Włącz to, jeśli pierwsza linia danych w twoim pliku CSV reprezentuje nazwy kolumn. Nie chcesz, aby nazwy kolumn zostały zaimportowane jako zwykłe dane.</p> + + + + Skip first row of data + Pomiń pierwszy wiersz danych + + + First row represents column names + Pierwszy wiersz reprezentuje nazwy kolumn + + + + Field separator: + Separator pól: + + + + NULL values: + Wartości NULL: + + + + If your CSV data contains null values, define how are they represented in the CSV. + Jeśli twoje dane CSV zawierają wartości null, zdefiniuj jak są one reprezentowane w CSV. + + + diff --git a/Plugins/CsvImport/csvimport.json b/Plugins/CsvImport/csvimport.json index 016c539..a2bf5f8 100644 --- a/Plugins/CsvImport/csvimport.json +++ b/Plugins/CsvImport/csvimport.json @@ -2,6 +2,6 @@ "type": "ImportPlugin", "title": "CSV import", "description": "CSV format support for importing data", - "version": 10000, + "version": 10001, "author": "SalSoft" } diff --git a/Plugins/CsvImport/csvimport.qrc b/Plugins/CsvImport/csvimport.qrc index a071122..727237d 100644 --- a/Plugins/CsvImport/csvimport.qrc +++ b/Plugins/CsvImport/csvimport.qrc @@ -2,4 +2,7 @@ CsvImportOptions.ui + + CsvImport_pl.qm + diff --git a/Plugins/HtmlExport/HtmlExport.pro b/Plugins/HtmlExport/HtmlExport.pro index ff0a68e..c4f7468 100644 --- a/Plugins/HtmlExport/HtmlExport.pro +++ b/Plugins/HtmlExport/HtmlExport.pro @@ -27,3 +27,7 @@ RESOURCES += \ FORMS += \ htmlexport.ui + + +TRANSLATIONS += HtmlExport_pl.ts + diff --git a/Plugins/HtmlExport/HtmlExport_pl.qm b/Plugins/HtmlExport/HtmlExport_pl.qm new file mode 100644 index 0000000..a0cac5e Binary files /dev/null and b/Plugins/HtmlExport/HtmlExport_pl.qm differ diff --git a/Plugins/HtmlExport/HtmlExport_pl.ts b/Plugins/HtmlExport/HtmlExport_pl.ts new file mode 100644 index 0000000..ebe1925 --- /dev/null +++ b/Plugins/HtmlExport/HtmlExport_pl.ts @@ -0,0 +1,173 @@ + + + + + HtmlExport + + + SQL query results + Wyniki zapytania SQL + + + + + no type + brak typu + + + + + Exported table: %1 + Eksportowana tabela: %1 + + + + + Table: %1 + Tabela: %1 + + + + virtual + wirtualna + + + + Exported database: %1 + Eksportowana baza: %1 + + + + Index: %1 + Indeks: %1 + + + + For table: + Dla tabeli: + + + + Unique: + Unikalny: + + + + Yes + Tak + + + + No + Nie + + + + Column + Kolumna + + + + Collating + Zestawienie + + + + Sort order + Sortowanie + + + + Trigger: %1 + Wyzwalacz: %1 + + + + Activated: + Aktywowany: + + + + Action: + Akcja: + + + + On view: + Na widoku: + + + + On table: + Na tabeli: + + + + Activate condition: + Warunek aktywacji: + + + + Code executed: + Wykonywany kod: + + + + View: %1 + Widok: %1 + + + + Document generated by SQLiteStudio v%1 on %2 + Dokument wygenerowany przez SQLiteStudio v%1 dnia %2 + + + + HtmlExportConfig + + + Maximum number of characters per cell: + Maksymalna liczba znaków w komórce: + + + + Include data types in first row + Dodaj typy danych w pierwszym wierszu + + + + Column names as first row + Nazwy kolumn w pierwszym wierszu + + + + Row numbers as first column + Numery wierszy w pierwszej kolumnie + + + + Output format + Format wyjściowy + + + + Format document (new lines, indentation) + Formatuj dokument (nowe linie, wcięcia) + + + + Compress (everything in one line) + Kompresuj (wszystko w jednej linii) + + + + <p>When enabled, HTML characters such as &lt;, &gt; and &amp; are not escaped in exported values. This allows you for example to export hyper-link enabled documents, but it also may result in incorrect HTML document (unmatched pairs of &lt; and &gt; characters). Be warned.</p> + <p>Kiedy włączone, znaki HTML takie jak &lt;, &gt; i &amp; nie będą podmieniane w wyeksportowanych wartościach. Pozwala to przykładowo na eksportowanie odnośników w dokumencie, ale może też spowodować, ze dokument HTML będzie niepoprawny (niedopasowane pary znaków &lt; i &gt;). Miej tego świadomość.</p> + + + + Don't escape HTML characters + Nie podmieniaj znaków HTML. + + + diff --git a/Plugins/HtmlExport/htmlexport.qrc b/Plugins/HtmlExport/htmlexport.qrc index 77f9482..8756c61 100644 --- a/Plugins/HtmlExport/htmlexport.qrc +++ b/Plugins/HtmlExport/htmlexport.qrc @@ -5,4 +5,7 @@ htmlexport.ui + + HtmlExport_pl.qm + diff --git a/Plugins/HtmlExport/htmlexport.ui b/Plugins/HtmlExport/htmlexport.ui index a4727a4..6606b1f 100644 --- a/Plugins/HtmlExport/htmlexport.ui +++ b/Plugins/HtmlExport/htmlexport.ui @@ -11,7 +11,7 @@ - Form + Form @@ -26,7 +26,7 @@ 999999999 - HtmlExport.ByteLengthLimit + HtmlExport.ByteLengthLimit @@ -43,7 +43,7 @@ Include data types in first row - HtmlExport.PrintDataTypes + HtmlExport.PrintDataTypes @@ -53,7 +53,7 @@ Column names as first row - HtmlExport.PrintHeader + HtmlExport.PrintHeader @@ -63,7 +63,7 @@ Row numbers as first column - HtmlExport.PrintRowNum + HtmlExport.PrintRowNum @@ -79,10 +79,10 @@ Format document (new lines, indentation) - HtmlExport.Format + HtmlExport.Format - format + format @@ -92,10 +92,10 @@ Compress (everything in one line) - HtmlExport.Format + HtmlExport.Format - compress + compress @@ -111,7 +111,7 @@ Don't escape HTML characters - HtmlExport.DontEscapeHtml + HtmlExport.DontEscapeHtml diff --git a/Plugins/JsonExport/JsonExport.pro b/Plugins/JsonExport/JsonExport.pro index 8e29fcf..c259664 100644 --- a/Plugins/JsonExport/JsonExport.pro +++ b/Plugins/JsonExport/JsonExport.pro @@ -26,3 +26,7 @@ FORMS += \ RESOURCES += \ jsonexport.qrc + + +TRANSLATIONS += JsonExport_pl.ts + diff --git a/Plugins/JsonExport/JsonExport_pl.qm b/Plugins/JsonExport/JsonExport_pl.qm new file mode 100644 index 0000000..3ed3bcd Binary files /dev/null and b/Plugins/JsonExport/JsonExport_pl.qm differ diff --git a/Plugins/JsonExport/JsonExport_pl.ts b/Plugins/JsonExport/JsonExport_pl.ts new file mode 100644 index 0000000..bdfdf8a --- /dev/null +++ b/Plugins/JsonExport/JsonExport_pl.ts @@ -0,0 +1,22 @@ + + + + + JsonExportConfig + + + Output format + Format wyjściowy + + + + Format document (new lines, indentation) + Formatuj dokument (nowe linie, wcięcia) + + + + Compress (everything in one line) + Kompresuj (wszystko w jednej linii) + + + diff --git a/Plugins/JsonExport/jsonexport.qrc b/Plugins/JsonExport/jsonexport.qrc index 19ea921..c9c8b78 100644 --- a/Plugins/JsonExport/jsonexport.qrc +++ b/Plugins/JsonExport/jsonexport.qrc @@ -2,4 +2,7 @@ jsonexport.ui + + JsonExport_pl.qm + diff --git a/Plugins/JsonExport/jsonexport.ui b/Plugins/JsonExport/jsonexport.ui index ebb0d78..df31f58 100644 --- a/Plugins/JsonExport/jsonexport.ui +++ b/Plugins/JsonExport/jsonexport.ui @@ -11,7 +11,7 @@ - Form + Form @@ -29,10 +29,10 @@ true - format + format - JsonExport.Format + JsonExport.Format @@ -42,10 +42,10 @@ Compress (everything in one line) - compress + compress - JsonExport.Format + JsonExport.Format diff --git a/Plugins/PdfExport/PdfExport.pro b/Plugins/PdfExport/PdfExport.pro index 46dda37..598e23c 100644 --- a/Plugins/PdfExport/PdfExport.pro +++ b/Plugins/PdfExport/PdfExport.pro @@ -24,3 +24,7 @@ FORMS += \ RESOURCES += \ pdfexport.qrc + + +TRANSLATIONS += PdfExport_pl.ts + diff --git a/Plugins/PdfExport/PdfExport_pl.qm b/Plugins/PdfExport/PdfExport_pl.qm new file mode 100644 index 0000000..ff4fc42 Binary files /dev/null and b/Plugins/PdfExport/PdfExport_pl.qm differ diff --git a/Plugins/PdfExport/PdfExport_pl.ts b/Plugins/PdfExport/PdfExport_pl.ts new file mode 100644 index 0000000..5ac637d --- /dev/null +++ b/Plugins/PdfExport/PdfExport_pl.ts @@ -0,0 +1,256 @@ + + + + + PdfExport + + + SQLiteStudio v%1 + SQLiteStudio v%1 + + + + SQL query results + Wyniki zapytania SQL + + + + + Exported table: %1 + Eksportowana tabela: %1 + + + + + Table: %1 + Tabela: %1 + + + + + Column + Kolumna + + + + Data type + Typ danych + + + + Constraints + Ograniczenia + + + + Global table constraints + Globalne ograniczenia tabeli + + + + Exported database: %1 + Eksportowana baza: %1 + + + + Index: %1 + Indeks: %1 + + + + Property + index header + Własność + + + + Value + index header + Wartość + + + + Indexed table + Zaindeksowana tabela + + + + Unique index + Indeks unikalny + + + + Yes + Tak + + + + No + Nie + + + + Collation + Zestawienie + + + + Sort order + Sortowanie + + + + Partial index condition + Warunek indeksu częściowego + + + + Trigger: %1 + Wyzwalacz: %1 + + + + Property + trigger header + Własność + + + + Value + trigger header + Wartość + + + + Activation time + Moment aktywacji + + + + For action + Dla akcji + + + + On view + Na widoku + + + + On table + Na tabeli + + + + Activation condition + Warunek aktywacji + + + + Code executed + Kod do wykonania + + + + View: %1 + Widok: %1 + + + + Query: + Zapytanie: + + + + Document generated with SQLiteStudio v%1 + Dokument wygenerowany przy pomocy SQLiteStudio v%1 + + + + PdfExportConfig + + + Size and layout + Rozmiar i układ + + + + Page size: + Rozmiar strony: + + + + Right margin: + Prawy margines: + + + + Left margin: + Lewy margines: + + + + Cell padding: + Odstęp wewnątrz komórki: + + + + Limit characters in single cell: + Ogranicz liczbę znaków w komórce: + + + + + + + + mm + mm + + + + Bottom margin: + Dolny margines: + + + + Top margin: + Górny margines: + + + + Font + Czcionka + + + + Colors + Kolory + + + + Headers background: + Tło nagłówków: + + + + NULL value color: + Kolor wartości NULL: + + + + Other settings + Inne ustawienia + + + + Print row numbers for data + Drukuj numery wierszy dla danych + + + + Print page numbers + Drukuj numery stron + + + diff --git a/Plugins/PdfExport/pdfexport.cpp b/Plugins/PdfExport/pdfexport.cpp index da15ab7..cd1ceca 100644 --- a/Plugins/PdfExport/pdfexport.cpp +++ b/Plugins/PdfExport/pdfexport.cpp @@ -227,7 +227,7 @@ bool PdfExport::exportIndex(const QString& database, const QString& name, const exportObjectRow({tr("Indexed table"), name}); exportObjectRow({tr("Unique index"), (createIndex->uniqueKw ? tr("Yes") : tr("No"))}); - indexColumns = {tr("Column"), tr("Collation"), tr("Sort order")}; + indexColumns = QStringList({tr("Column"), tr("Collation"), tr("Sort order")}); exportObjectColumnsHeader(indexColumns); QString sort; @@ -243,7 +243,7 @@ bool PdfExport::exportIndex(const QString& database, const QString& name, const if (createIndex->where) { - indexColumns = {tr("Partial index condition")}; + indexColumns = QStringList({tr("Partial index condition")}); exportObjectColumnsHeader(indexColumns); exportObjectRow(createIndex->where->detokenize()); } diff --git a/Plugins/PdfExport/pdfexport.qrc b/Plugins/PdfExport/pdfexport.qrc index fce27e6..5a2e9d8 100644 --- a/Plugins/PdfExport/pdfexport.qrc +++ b/Plugins/PdfExport/pdfexport.qrc @@ -2,4 +2,7 @@ pdfexport.ui + + PdfExport_pl.qm + diff --git a/Plugins/PdfExport/pdfexport.ui b/Plugins/PdfExport/pdfexport.ui index 31dfce5..1d396ef 100644 --- a/Plugins/PdfExport/pdfexport.ui +++ b/Plugins/PdfExport/pdfexport.ui @@ -6,12 +6,12 @@ 0 0 - 332 + 335 492 - Form + Form @@ -26,7 +26,7 @@ 999 - PdfExport.MaxCellBytes + PdfExport.MaxCellBytes @@ -43,7 +43,7 @@ 999999 - PdfExport.BottomMargin + PdfExport.BottomMargin @@ -53,7 +53,7 @@ 999999 - PdfExport.RightMargin + PdfExport.RightMargin @@ -98,7 +98,7 @@ 999999 - PdfExport.Padding + PdfExport.Padding @@ -122,7 +122,7 @@ 999999 - PdfExport.TopMargin + PdfExport.TopMargin @@ -143,10 +143,10 @@ - PdfExport.PageSizes + PdfExport.PageSizes - PdfExport.PageSize + PdfExport.PageSize @@ -170,7 +170,7 @@ 999999 - PdfExport.LeftMargin + PdfExport.LeftMargin @@ -186,14 +186,14 @@ - PdfExport.FontSize + PdfExport.FontSize - PdfExport.Font + PdfExport.Font @@ -222,10 +222,10 @@ - + - PdfExport.HeaderBgColor + PdfExport.HeaderBgColor @@ -245,10 +245,10 @@ - + - PdfExport.NullValueColor + PdfExport.NullValueColor @@ -267,7 +267,7 @@ Print row numbers for data - PdfExport.PrintRowNum + PdfExport.PrintRowNum @@ -277,7 +277,7 @@ Print page numbers - PdfExport.PrintPageNumbers + PdfExport.PrintPageNumbers diff --git a/Plugins/Printing/Printing.pro b/Plugins/Printing/Printing.pro index 49469c2..3f496be 100644 --- a/Plugins/Printing/Printing.pro +++ b/Plugins/Printing/Printing.pro @@ -33,3 +33,7 @@ win32|macx: { RESOURCES += \ printing.qrc + + +TRANSLATIONS += Printing_pl.ts + diff --git a/Plugins/Printing/Printing_pl.qm b/Plugins/Printing/Printing_pl.qm new file mode 100644 index 0000000..0a736b9 Binary files /dev/null and b/Plugins/Printing/Printing_pl.qm differ diff --git a/Plugins/Printing/Printing_pl.ts b/Plugins/Printing/Printing_pl.ts new file mode 100644 index 0000000..b372ef9 --- /dev/null +++ b/Plugins/Printing/Printing_pl.ts @@ -0,0 +1,40 @@ + + + + + Printing + + + Print data + Drukuj dane + + + + Print query + Drukuj zapytanie + + + + No data to print. + Brak danych do wydruku. + + + + Printing data. + Drukuj dane. + + + + Printing query. + Drukuj zapytanie. + + + + PrintingExport + + + Printing + Drukuj + + + diff --git a/Plugins/Printing/printing.cpp b/Plugins/Printing/printing.cpp index ff8443d..3591d4b 100644 --- a/Plugins/Printing/printing.cpp +++ b/Plugins/Printing/printing.cpp @@ -9,6 +9,7 @@ #include "exportworker.h" #include "services/notifymanager.h" #include "sqleditor.h" +#include "translations.h" #include #include #include @@ -23,6 +24,8 @@ bool Printing::init() if (!printingExportInit) return false; + loadTranslation("Printing"); + printingConfig = new ExportManager::StandardExportConfig(); printingConfig->exportData = true; printingConfig->exportTableIndexes = false; diff --git a/Plugins/Printing/printing.json b/Plugins/Printing/printing.json index 1a59fb5..101f07b 100644 --- a/Plugins/Printing/printing.json +++ b/Plugins/Printing/printing.json @@ -2,7 +2,7 @@ "type": "GeneralPurposePlugin", "title": "Printing", "description": "Provides printing support.", - "version": 10000, + "version": 10001, "author": "SalSoft", "gui": true, "dependencies": "PdfExport" diff --git a/Plugins/Printing/printing.qrc b/Plugins/Printing/printing.qrc index faf09c1..54dc86f 100644 --- a/Plugins/Printing/printing.qrc +++ b/Plugins/Printing/printing.qrc @@ -2,4 +2,7 @@ printer.png + + Printing_pl.qm + diff --git a/Plugins/RegExpImport/RegExpImport.pro b/Plugins/RegExpImport/RegExpImport.pro index 99c884e..6b3b955 100644 --- a/Plugins/RegExpImport/RegExpImport.pro +++ b/Plugins/RegExpImport/RegExpImport.pro @@ -26,3 +26,7 @@ FORMS += \ RESOURCES += \ regexpimport.qrc + + +TRANSLATIONS += RegExpImport_pl.ts + diff --git a/Plugins/RegExpImport/RegExpImport_pl.qm b/Plugins/RegExpImport/RegExpImport_pl.qm new file mode 100644 index 0000000..b71fbf8 Binary files /dev/null and b/Plugins/RegExpImport/RegExpImport_pl.qm differ diff --git a/Plugins/RegExpImport/RegExpImport_pl.ts b/Plugins/RegExpImport/RegExpImport_pl.ts new file mode 100644 index 0000000..a5d567c --- /dev/null +++ b/Plugins/RegExpImport/RegExpImport_pl.ts @@ -0,0 +1,86 @@ + + + + + RegExpImport + + + Text files (*.txt);;All files (*) + Pliki tekstowe (*.txt);;Wszystkie pliki (*) + + + + Cannot read file %1 + Nie można odczytać pliku %1 + + + + Enter the regular expression pattern. + Wprowadź wzorzec wyrażenia regularnego. + + + + Invalid pattern: %1 + Niepoprawny wzorzec: %1 + + + + Requested capture index %1 is out of range. + Żądany indeks przechwytywania %1 jest poza zakresem. + + + + <p>Requested capture group name '%1', but it's not defined in the pattern: <pre>%2</pre></p> + <p>Zażądano grupy do przechwycenia o nazwie '%1', ale nie jest ona zdefiniowana we wzorcu: <pre>%2</pre></p> + + + + RegExpImportConfig + + + Capture groups + Grupy przechwytujące + + + + Treat all RegExp capture groups as columns + Traktuj wszystkie grupy przechwytujące jako kolumny + + + + Import only following groups: + Importuj tylko następujące grupy: + + + + <p>Enter comma separated list of capture group indexes. The 0 index refers to the entire matched string.</p> +<p>If you used named groups in the pattern, you can use names instead of indexes. You can mix indexes and names in this list.</p> + <p>Wprowadź listę indeksów grup oddzieloną przecinkami. Indeks 0 odpowiada całemu dopasowanemu łańcuchowi.</p> +<p>Jeśli użyłeś nazwanych grup we wzorcu, to możesz używać nazw, zamiast indeksów. Możesz mieszać inseksy i nazwy na liście.</p> + + + + Example: 1, 3, 4 + Przykład: 1, 3, 4 + + + + Pattern: + Wzorzec: + + + + <p>Use Regular Expression groups to enclose parts of the expression that you want to import. If you want to use a group, that you don't want to import, then use "import only following groups" option below. + +You can use named groups and refer to them in group list below. To name a group use: <pre>(?&lt;myGroupName&gt;\s+\d+\s+)</pre></p> + <p>Użyj grup przechwytujących Wyrażeń Regularnych, aby otoczyć części wyrażenia, które chcesz zaimportować. Jeśli chcesz użyć grupy, której nie chcesz zaimportować, to użyj opcji "importuj tylko następujące grupy" poniżej. + +Możesz użyć grup nazwanych i odwoływać się do nich w liście grup poniżej. Aby nazwać grupę, użyj: <pre>(?&lt;nazwaGrupy&gt;\s+\d+\s+)</pre></p> + + + + Example: (\d+)\s+((\d+)\w+)\s+(\w+) + Przykład: (\d+)\s+((\d+)\w+)\s+(\w+) + + + diff --git a/Plugins/RegExpImport/regexpimport.qrc b/Plugins/RegExpImport/regexpimport.qrc index 9ece86e..0d545ab 100644 --- a/Plugins/RegExpImport/regexpimport.qrc +++ b/Plugins/RegExpImport/regexpimport.qrc @@ -2,4 +2,7 @@ regexpimport.ui + + RegExpImport_pl.qm + diff --git a/Plugins/RegExpImport/regexpimport.ui b/Plugins/RegExpImport/regexpimport.ui index d1287cb..3844a40 100644 --- a/Plugins/RegExpImport/regexpimport.ui +++ b/Plugins/RegExpImport/regexpimport.ui @@ -11,7 +11,7 @@ - Form + Form @@ -26,10 +26,10 @@ Treat all RegExp capture groups as columns - all + all - RegExpImport.GroupsMode + RegExpImport.GroupsMode @@ -39,10 +39,10 @@ Import only following groups: - custom + custom - RegExpImport.GroupsMode + RegExpImport.GroupsMode @@ -56,7 +56,7 @@ Example: 1, 3, 4 - RegExpImport.CustomGroupList + RegExpImport.CustomGroupList @@ -81,7 +81,7 @@ You can use named groups and refer to them in group list below. To name a group Example: (\d+)\s+((\d+)\w+)\s+(\w+) - RegExpImport.Pattern + RegExpImport.Pattern diff --git a/Plugins/ScriptingTcl/ScriptingTcl.pro b/Plugins/ScriptingTcl/ScriptingTcl.pro index 08d8796..7197a11 100644 --- a/Plugins/ScriptingTcl/ScriptingTcl.pro +++ b/Plugins/ScriptingTcl/ScriptingTcl.pro @@ -136,3 +136,7 @@ win32: { RESOURCES += \ scriptingtcl.qrc + + +TRANSLATIONS += ScriptingTcl_pl.ts + diff --git a/Plugins/ScriptingTcl/ScriptingTcl_pl.qm b/Plugins/ScriptingTcl/ScriptingTcl_pl.qm new file mode 100644 index 0000000..1232971 Binary files /dev/null and b/Plugins/ScriptingTcl/ScriptingTcl_pl.qm differ diff --git a/Plugins/ScriptingTcl/ScriptingTcl_pl.ts b/Plugins/ScriptingTcl/ScriptingTcl_pl.ts new file mode 100644 index 0000000..be6a580 --- /dev/null +++ b/Plugins/ScriptingTcl/ScriptingTcl_pl.ts @@ -0,0 +1,25 @@ + + + + + ScriptingTcl + + + No database available in current context, while called Tcl's '%1' command. + No database available in current context, while called Tcl's 'db' command. + Brak dostępnej bazy w bieżącym kontekście, podczas wywołania polecenie Tcl '%1'. + + + + Invalid '%1' command sytax. Should be: %2 + Invalid 'db' command sytax. Should be: db eval sql + Niepoprawna składnia polecenia '%1'. Powinno być: %2 + + + + Error from Tcl's' '%1' command: %2 + Error from Tcl's' 'db' command: %1 + Wystąpił błąd w poleceniu Tcl '%1': %2 + + + diff --git a/Plugins/ScriptingTcl/scriptingtcl.cpp b/Plugins/ScriptingTcl/scriptingtcl.cpp index 5709808..4390317 100644 --- a/Plugins/ScriptingTcl/scriptingtcl.cpp +++ b/Plugins/ScriptingTcl/scriptingtcl.cpp @@ -408,7 +408,7 @@ int ScriptingTcl::dbCommand(ClientData clientData, Tcl_Interp* interp, int objc, Tcl_Obj* result = nullptr; if (!ctx->db) { - result = Tcl_NewStringObj(tr("No database available in current context, while called Tcl's 'db' command.").toUtf8().constData(), -1); + result = Tcl_NewStringObj(tr("No database available in current context, while called Tcl's '%1' command.").arg("db").toUtf8().constData(), -1); Tcl_SetObjResult(interp, result); return TCL_ERROR; } @@ -430,7 +430,7 @@ int ScriptingTcl::dbCommand(ClientData clientData, Tcl_Interp* interp, int objc, return dbEvalOneColumn(ctx, interp, objv); } - result = Tcl_NewStringObj(tr("Invalid 'db' command sytax. Should be: db eval sql").toUtf8().constData(), -1); + result = Tcl_NewStringObj(tr("Invalid '%1' command sytax. Should be: %2").arg("db", "db eval sql").toUtf8().constData(), -1); Tcl_SetObjResult(interp, result); return TCL_ERROR; } @@ -551,7 +551,7 @@ SqlQueryPtr ScriptingTcl::dbCommonEval(ContextTcl* ctx, Tcl_Interp* interp, Tcl_ SqlQueryPtr execResults = ctx->db->exec(sql, queryArgs, flags); if (execResults->isError()) { - result = Tcl_NewStringObj(tr("Error from Tcl's' 'db' command: %1").arg(execResults->getErrorText()).toUtf8().constData(), -1); + result = Tcl_NewStringObj(tr("Error from Tcl's' '%1' command: %2").arg("db", execResults->getErrorText()).toUtf8().constData(), -1); Tcl_SetObjResult(interp, result); } return execResults; diff --git a/Plugins/ScriptingTcl/scriptingtcl.qrc b/Plugins/ScriptingTcl/scriptingtcl.qrc index 8a0d047..0a78160 100644 --- a/Plugins/ScriptingTcl/scriptingtcl.qrc +++ b/Plugins/ScriptingTcl/scriptingtcl.qrc @@ -2,4 +2,7 @@ scriptingtcl.png + + ScriptingTcl_pl.qm + diff --git a/Plugins/SqlEnterpriseFormatter/SqlEnterpriseFormatter.pro b/Plugins/SqlEnterpriseFormatter/SqlEnterpriseFormatter.pro index ae68b60..23efd4c 100644 --- a/Plugins/SqlEnterpriseFormatter/SqlEnterpriseFormatter.pro +++ b/Plugins/SqlEnterpriseFormatter/SqlEnterpriseFormatter.pro @@ -98,3 +98,7 @@ FORMS += \ RESOURCES += \ sqlenterpriseformatter.qrc + + +TRANSLATIONS += SqlEnterpriseFormatter_pl.ts + diff --git a/Plugins/SqlEnterpriseFormatter/SqlEnterpriseFormatter_pl.qm b/Plugins/SqlEnterpriseFormatter/SqlEnterpriseFormatter_pl.qm new file mode 100644 index 0000000..ea184fe Binary files /dev/null and b/Plugins/SqlEnterpriseFormatter/SqlEnterpriseFormatter_pl.qm differ diff --git a/Plugins/SqlEnterpriseFormatter/SqlEnterpriseFormatter_pl.ts b/Plugins/SqlEnterpriseFormatter/SqlEnterpriseFormatter_pl.ts new file mode 100644 index 0000000..b73d4ad --- /dev/null +++ b/Plugins/SqlEnterpriseFormatter/SqlEnterpriseFormatter_pl.ts @@ -0,0 +1,209 @@ + + + + + QObject + + + + name + example name wrapper + nazwa + + + + SqlEnterpriseFormatter + + + Indentation + Wcięcia + + + + Line up keywords in multi-line queries + Wyrównaj słowa kluczowe w wielolinijkowych zapytaniach + + + + Indent contents of parenthesis block + Dodaj wcięcia do zawartości bloków w nawiasach + + + + Tab size: + Rozmiar tabulacji: + + + + New lines + Nowe linie + + + + Before opening parenthesis in column definitions + Przed nawiasem otwierającym w definicjach kolumn + + + + After opening parenthesis in column definitions + Po nawiasie otwierającym w definicjach kolumn + + + + Before closing parenthesis in column definitions + Przed nawiasem zamykającym w definicjach kolumn + + + + After closing parenthesis in column definitions + Po nawiasie zamykającym w definicjach kolumn + + + + Before opening parenthesis in expressions + Przed nawiasem otwierającym w wyrażeniach + + + + After opening parenthesis in expressions + Po nawiasie otwierającym w wyrażeniach + + + + Before closing parenthesis in expressions + Przed nawiasem zamykającym w wyrażeniach + + + + After closing parenthesis in expressions + Po nawiasie zamykającym w wyrażeniach + + + + After JOIN keywords in FROM clause + After *JOIN keywords in FROM clause + Po słowach kluczowych JOIN w klauzuli FROM + + + + Put each column constraint in CREATE TABLE into new line + Ustaw każde ograniczenie kolumny w CREATE TABLE w nowej linii + + + + After comma + Po przecinku + + + + After comma in expressions + Po przecinku w wyrażeniach + + + + After semicolon + Po średniku + + + + + Never before semicolon + Nigdy przed średnikiem + + + + White spaces + Spacje + + + + Before comma in lists + Przed przecinkiem w listach + + + + After comma in lists + Po przecinku w listach + + + + Before opening parenthesis + Przed nawiasem otwierającym + + + + After opening parenthesis + Po nawiasie otwierającym + + + + Before closing parenthesis + Przed nawiasem zamykającym + + + + After closing parenthesis + Po nawiasie zamykającym + + + + No space between SQL function name and opening parenthesis + Bez spacji między nazwą funkcji SQL i nawiasem otwierającym + + + + Before dot operator (in path to database object) + Przed operatorem kropki (w ścieżce do obiektu bazodanowego) + + + + After dot operator (in path to database object) + Po operatorze kropki (w ścieżce do obiektu bazodanowego) + + + + Before mathematical operator + Przed operatorem matematycznym + + + + After mathematical operator + Po operatorze matematycznym + + + + Never before comma + Nigdy przed przecinkiem + + + + Names + Nazwy + + + + Preferred name wrapper + Preferowane opakowanie nazwy + + + + Always use name wrapping + Zawsze opakowuj nazwy + + + + Uppercase data type names + Zmieniaj litery nazw typów danych na duże + + + + Uppercase keywords + Zmieniaj litery słów kluczowych na duże + + + + Preview + Podgląd + + + diff --git a/Plugins/SqlEnterpriseFormatter/sqlenterpriseformatter.qrc b/Plugins/SqlEnterpriseFormatter/sqlenterpriseformatter.qrc index bd23092..79ed2c7 100644 --- a/Plugins/SqlEnterpriseFormatter/sqlenterpriseformatter.qrc +++ b/Plugins/SqlEnterpriseFormatter/sqlenterpriseformatter.qrc @@ -2,4 +2,7 @@ sqlenterpriseformatter.ui + + SqlEnterpriseFormatter_pl.qm + diff --git a/Plugins/SqlEnterpriseFormatter/sqlenterpriseformatter.ui b/Plugins/SqlEnterpriseFormatter/sqlenterpriseformatter.ui index 49e8788..2ebfbdf 100644 --- a/Plugins/SqlEnterpriseFormatter/sqlenterpriseformatter.ui +++ b/Plugins/SqlEnterpriseFormatter/sqlenterpriseformatter.ui @@ -11,7 +11,7 @@ - Form + Form @@ -39,7 +39,7 @@ - 0 + 1 @@ -58,7 +58,7 @@ Line up keywords in multi-line queries - SqlEnterpriseFormatter.LineUpKeywords + SqlEnterpriseFormatter.LineUpKeywords @@ -68,7 +68,7 @@ Indent contents of parenthesis block - SqlEnterpriseFormatter.IndentParenthesisBlock + SqlEnterpriseFormatter.IndentParenthesisBlock @@ -95,7 +95,7 @@ - SqlEnterpriseFormatter.TabSize + SqlEnterpriseFormatter.TabSize @@ -133,7 +133,7 @@ 0 - 0 + -166 578 350 @@ -160,7 +160,7 @@ Before opening parenthesis in column definitions - SqlEnterpriseFormatter.NlBeforeOpenParDef + SqlEnterpriseFormatter.NlBeforeOpenParDef @@ -170,7 +170,7 @@ After opening parenthesis in column definitions - SqlEnterpriseFormatter.NlAfterOpenParDef + SqlEnterpriseFormatter.NlAfterOpenParDef @@ -180,7 +180,7 @@ Before closing parenthesis in column definitions - SqlEnterpriseFormatter.NlBeforeCloseParDef + SqlEnterpriseFormatter.NlBeforeCloseParDef @@ -190,7 +190,7 @@ After closing parenthesis in column definitions - SqlEnterpriseFormatter.NlAfterCloseParDef + SqlEnterpriseFormatter.NlAfterCloseParDef @@ -200,7 +200,7 @@ Before opening parenthesis in expressions - SqlEnterpriseFormatter.NlBeforeOpenParExpr + SqlEnterpriseFormatter.NlBeforeOpenParExpr @@ -210,7 +210,7 @@ After opening parenthesis in expressions - SqlEnterpriseFormatter.NlAfterOpenParExpr + SqlEnterpriseFormatter.NlAfterOpenParExpr @@ -220,7 +220,7 @@ Before closing parenthesis in expressions - SqlEnterpriseFormatter.NlBeforeCloseParExpr + SqlEnterpriseFormatter.NlBeforeCloseParExpr @@ -230,17 +230,17 @@ After closing parenthesis in expressions - SqlEnterpriseFormatter.NlAfterCloseParExpr + SqlEnterpriseFormatter.NlAfterCloseParExpr - After *JOIN keywords in FROM clause + After JOIN keywords in FROM clause - SqlEnterpriseFormatter.NlAfterJoinStmt + SqlEnterpriseFormatter.NlAfterJoinStmt @@ -250,7 +250,7 @@ Put each column constraint in CREATE TABLE into new line - SqlEnterpriseFormatter.NlBetweenConstraints + SqlEnterpriseFormatter.NlBetweenConstraints @@ -260,7 +260,7 @@ After comma - SqlEnterpriseFormatter.NlAfterComma + SqlEnterpriseFormatter.NlAfterComma @@ -270,7 +270,7 @@ After comma in expressions - SqlEnterpriseFormatter.NlAfterCommaInExpr + SqlEnterpriseFormatter.NlAfterCommaInExpr @@ -280,7 +280,7 @@ After semicolon - SqlEnterpriseFormatter.NlAfterSemicolon + SqlEnterpriseFormatter.NlAfterSemicolon @@ -290,7 +290,7 @@ Never before semicolon - SqlEnterpriseFormatter.NlNeverBeforeSemicolon + SqlEnterpriseFormatter.NlNeverBeforeSemicolon @@ -392,7 +392,7 @@ Before comma in lists - SqlEnterpriseFormatter.SpaceBeforeCommaInList + SqlEnterpriseFormatter.SpaceBeforeCommaInList @@ -402,7 +402,7 @@ After comma in lists - SqlEnterpriseFormatter.SpaceAfterCommaInList + SqlEnterpriseFormatter.SpaceAfterCommaInList @@ -412,7 +412,7 @@ Before opening parenthesis - SqlEnterpriseFormatter.SpaceBeforeOpenPar + SqlEnterpriseFormatter.SpaceBeforeOpenPar @@ -422,7 +422,7 @@ After opening parenthesis - SqlEnterpriseFormatter.SpaceAfterOpenPar + SqlEnterpriseFormatter.SpaceAfterOpenPar @@ -432,7 +432,7 @@ Before closing parenthesis - SqlEnterpriseFormatter.SpaceBeforeClosePar + SqlEnterpriseFormatter.SpaceBeforeClosePar @@ -442,7 +442,7 @@ After closing parenthesis - SqlEnterpriseFormatter.SpaceAfterClosePar + SqlEnterpriseFormatter.SpaceAfterClosePar @@ -452,7 +452,7 @@ No space between SQL function name and opening parenthesis - SqlEnterpriseFormatter.NoSpaceAfterFunctionName + SqlEnterpriseFormatter.NoSpaceAfterFunctionName @@ -462,7 +462,7 @@ Before dot operator (in path to database object) - SqlEnterpriseFormatter.SpaceBeforeDot + SqlEnterpriseFormatter.SpaceBeforeDot @@ -472,7 +472,7 @@ After dot operator (in path to database object) - SqlEnterpriseFormatter.SpaceAfterDot + SqlEnterpriseFormatter.SpaceAfterDot @@ -482,7 +482,7 @@ Before mathematical operator - SqlEnterpriseFormatter.SpaceBeforeMathOp + SqlEnterpriseFormatter.SpaceBeforeMathOp @@ -492,7 +492,7 @@ After mathematical operator - SqlEnterpriseFormatter.SpaceAfterMathOp + SqlEnterpriseFormatter.SpaceAfterMathOp @@ -502,7 +502,7 @@ Never before comma - SqlEnterpriseFormatter.SpaceNeverBeforeComma + SqlEnterpriseFormatter.SpaceNeverBeforeComma @@ -512,7 +512,7 @@ Never before semicolon - SqlEnterpriseFormatter.SpaceNeverBeforeSemicolon + SqlEnterpriseFormatter.SpaceNeverBeforeSemicolon @@ -587,10 +587,10 @@ - SqlEnterpriseFormatter.PrefferedWrapper + SqlEnterpriseFormatter.PrefferedWrapper - SqlEnterpriseFormatter.Wrappers + SqlEnterpriseFormatter.Wrappers @@ -600,7 +600,7 @@ Always use name wrapping - SqlEnterpriseFormatter.AlwaysUseNameWrapping + SqlEnterpriseFormatter.AlwaysUseNameWrapping @@ -610,7 +610,7 @@ Uppercase data type names - SqlEnterpriseFormatter.UppercaseDataTypes + SqlEnterpriseFormatter.UppercaseDataTypes @@ -620,7 +620,7 @@ Uppercase keywords - SqlEnterpriseFormatter.UppercaseKeywords + SqlEnterpriseFormatter.UppercaseKeywords @@ -641,7 +641,7 @@ - SqlEnterpriseFormatter.PreviewCode + SqlEnterpriseFormatter.PreviewCode true diff --git a/Plugins/SqlExport/SqlExport.pro b/Plugins/SqlExport/SqlExport.pro index 29a952b..f789222 100644 --- a/Plugins/SqlExport/SqlExport.pro +++ b/Plugins/SqlExport/SqlExport.pro @@ -27,3 +27,7 @@ OTHER_FILES += \ RESOURCES += \ sqlexport.qrc + + +TRANSLATIONS += SqlExport_pl.ts + diff --git a/Plugins/SqlExport/SqlExportCommon.ui b/Plugins/SqlExport/SqlExportCommon.ui index 9b5de21..891c26a 100644 --- a/Plugins/SqlExport/SqlExportCommon.ui +++ b/Plugins/SqlExport/SqlExportCommon.ui @@ -11,7 +11,7 @@ - Form + Form @@ -20,7 +20,7 @@ Generate "DROP IF EXISTS" statement before "CREATE" statement - SqlExport.GenerateDrop + SqlExport.GenerateDrop @@ -30,7 +30,7 @@ Format DDL statements only (excludes "INSERT" statements) - SqlExport.FormatDdlsOnly + SqlExport.FormatDdlsOnly @@ -40,7 +40,7 @@ Use SQL formatter to format exported SQL statements - SqlExport.UseFormatter + SqlExport.UseFormatter diff --git a/Plugins/SqlExport/SqlExportQuery.ui b/Plugins/SqlExport/SqlExportQuery.ui index 4d2a6ae..ff874bd 100644 --- a/Plugins/SqlExport/SqlExportQuery.ui +++ b/Plugins/SqlExport/SqlExportQuery.ui @@ -11,7 +11,7 @@ - Form + Form @@ -20,14 +20,14 @@ Use SQL formatter to format exported SQL statements - SqlExport.UseFormatter + SqlExport.UseFormatter - Table name to use for insert statements: + Table name to use for INSERT statements: @@ -37,7 +37,7 @@ Generate "CREATE TABLE" statement at the begining - SqlExport.GenerateCreateTable + SqlExport.GenerateCreateTable @@ -47,7 +47,7 @@ Include the query in comments - SqlExport.IncludeQueryInComments + SqlExport.IncludeQueryInComments @@ -57,14 +57,14 @@ Generate "DROP IF EXISTS" statement before "CREATE" statement - SqlExport.GenerateDrop + SqlExport.GenerateDrop - SqlExport.QueryTable + SqlExport.QueryTable @@ -74,7 +74,7 @@ Format DDL statements only (excludes "INSERT" statements) - SqlExport.FormatDdlsOnly + SqlExport.FormatDdlsOnly diff --git a/Plugins/SqlExport/SqlExport_pl.qm b/Plugins/SqlExport/SqlExport_pl.qm new file mode 100644 index 0000000..5647c1c Binary files /dev/null and b/Plugins/SqlExport/SqlExport_pl.qm differ diff --git a/Plugins/SqlExport/SqlExport_pl.ts b/Plugins/SqlExport/SqlExport_pl.ts new file mode 100644 index 0000000..5fc187b --- /dev/null +++ b/Plugins/SqlExport/SqlExport_pl.ts @@ -0,0 +1,99 @@ + + + + + SqlExport + + + -- Results of query: + -- Wyniki zapytania: + + + + -- Table: %1 + -- Tabela: %1 + + + + -- Index: %1 + -- Indeks: %1 + + + + -- Trigger: %1 + -- Wyzwalacz: %1 + + + + -- View: %1 + -- Widok: %1 + + + + -- File generated with SQLiteStudio v%1 on %2 + -- Plik wygenerowany przez SQLiteStudio v%1 dnia %2 + + + + -- Text encoding used: %1 + -- Użyte kodowanie tekstu: %1 + + + + Table name for INSERT statements is mandatory. + Nazwa tabeli dla zapytania INSERT jest obowiązkowa. + + + + sqlExportCommonConfig + + + Generate "DROP IF EXISTS" statement before "CREATE" statement + Generuj zapytanie "DROP IF EXISTS" przed zapytaniem "CREATE" + + + + Format DDL statements only (excludes "INSERT" statements) + Formatuj tylko zapytania DDL (wyklucza zapytania "INSERT") + + + + Use SQL formatter to format exported SQL statements + Użyj formatera SQL do formatowania eksportowanych zapytań SQL + + + + sqlExportQueryConfig + + + Use SQL formatter to format exported SQL statements + Użyj formatera SQL do formatowania eksportowanych zapytań SQL + + + + Table name to use for INSERT statements: + Table name to use for insert statements: + Nazwa tabeli dla zapytań INSERT: + + + + Generate "CREATE TABLE" statement at the begining + Generuj zapytanie "CREATE TABLE" na początku + + + + Include the query in comments + Dodaj zapytanie w komentarzach + + + + Generate "DROP IF EXISTS" statement before "CREATE" statement + Generuj zapytanie "DROP IF EXISTS" przed zapytaniem "CREATE" + + + + Format DDL statements only (excludes "INSERT" statements) + Formatuj tylko zapytania DDL (wyklucza zapytania "INSERT") + + + diff --git a/Plugins/SqlExport/sqlexport.qrc b/Plugins/SqlExport/sqlexport.qrc index 447617f..3920490 100644 --- a/Plugins/SqlExport/sqlexport.qrc +++ b/Plugins/SqlExport/sqlexport.qrc @@ -3,4 +3,7 @@ SqlExportQuery.ui SqlExportCommon.ui + + SqlExport_pl.qm + diff --git a/Plugins/SqlFormatterSimple/SqlFormatterSimple.pro b/Plugins/SqlFormatterSimple/SqlFormatterSimple.pro index 2c60801..ecf3355 100644 --- a/Plugins/SqlFormatterSimple/SqlFormatterSimple.pro +++ b/Plugins/SqlFormatterSimple/SqlFormatterSimple.pro @@ -26,3 +26,7 @@ OTHER_FILES += \ RESOURCES += \ sqlformattersimple.qrc + + +TRANSLATIONS += SqlFormatterSimple_pl.ts + diff --git a/Plugins/SqlFormatterSimple/SqlFormatterSimple.ui b/Plugins/SqlFormatterSimple/SqlFormatterSimple.ui index 7e81ee0..7cb76b2 100644 --- a/Plugins/SqlFormatterSimple/SqlFormatterSimple.ui +++ b/Plugins/SqlFormatterSimple/SqlFormatterSimple.ui @@ -10,6 +10,9 @@ 290 + + + @@ -17,7 +20,7 @@ Upper case keywords - SqlFormatterSimple.UpperCaseKeywords + SqlFormatterSimple.UpperCaseKeywords @@ -27,7 +30,7 @@ Reduce multiple whitespaces to single whitespace - SqlFormatterSimple.TrimLongSpaces + SqlFormatterSimple.TrimLongSpaces diff --git a/Plugins/SqlFormatterSimple/SqlFormatterSimple_pl.qm b/Plugins/SqlFormatterSimple/SqlFormatterSimple_pl.qm new file mode 100644 index 0000000..a88fc0f Binary files /dev/null and b/Plugins/SqlFormatterSimple/SqlFormatterSimple_pl.qm differ diff --git a/Plugins/SqlFormatterSimple/SqlFormatterSimple_pl.ts b/Plugins/SqlFormatterSimple/SqlFormatterSimple_pl.ts new file mode 100644 index 0000000..048a876 --- /dev/null +++ b/Plugins/SqlFormatterSimple/SqlFormatterSimple_pl.ts @@ -0,0 +1,17 @@ + + + + + SqlFormatterSimplePlugin + + + Upper case keywords + Zmień litery słów kluczowych na duże + + + + Reduce multiple whitespaces to single whitespace + Zredukuj wiele znaków białych do pojedynczego + + + diff --git a/Plugins/SqlFormatterSimple/sqlformattersimple.qrc b/Plugins/SqlFormatterSimple/sqlformattersimple.qrc index febfbd2..33f00ba 100644 --- a/Plugins/SqlFormatterSimple/sqlformattersimple.qrc +++ b/Plugins/SqlFormatterSimple/sqlformattersimple.qrc @@ -2,4 +2,7 @@ SqlFormatterSimple.ui + + SqlFormatterSimple_pl.qm + diff --git a/Plugins/XmlExport/XmlExport.pro b/Plugins/XmlExport/XmlExport.pro index 87e0c7f..f7dbb7f 100644 --- a/Plugins/XmlExport/XmlExport.pro +++ b/Plugins/XmlExport/XmlExport.pro @@ -25,3 +25,7 @@ OTHER_FILES += \ RESOURCES += \ xmlexport.qrc + + +TRANSLATIONS += XmlExport_pl.ts + diff --git a/Plugins/XmlExport/XmlExport.ui b/Plugins/XmlExport/XmlExport.ui index 2a236c6..6c6f27e 100644 --- a/Plugins/XmlExport/XmlExport.ui +++ b/Plugins/XmlExport/XmlExport.ui @@ -11,7 +11,7 @@ - Form + Form @@ -29,10 +29,10 @@ true - format + format - XmlExport.Format + XmlExport.Format @@ -42,10 +42,10 @@ Compress (everything in one line) - compress + compress - XmlExport.Format + XmlExport.Format @@ -70,10 +70,10 @@ true - mixed + mixed - XmlExport.Escaping + XmlExport.Escaping @@ -86,10 +86,10 @@ Always use CDATA - cdata + cdata - XmlExport.Escaping + XmlExport.Escaping @@ -102,10 +102,10 @@ Always use ampersand - ampersand + ampersand - XmlExport.Escaping + XmlExport.Escaping @@ -124,13 +124,13 @@ false - XmlExport.UseNamespace + XmlExport.UseNamespace - XmlExport.Namespace + XmlExport.Namespace diff --git a/Plugins/XmlExport/XmlExport_pl.qm b/Plugins/XmlExport/XmlExport_pl.qm new file mode 100644 index 0000000..40b5b24 Binary files /dev/null and b/Plugins/XmlExport/XmlExport_pl.qm differ diff --git a/Plugins/XmlExport/XmlExport_pl.ts b/Plugins/XmlExport/XmlExport_pl.ts new file mode 100644 index 0000000..fc0cfaa --- /dev/null +++ b/Plugins/XmlExport/XmlExport_pl.ts @@ -0,0 +1,71 @@ + + + + + XmlExport + + + Enter the namespace to use (for example: http://my.namespace.org) + Enter the namespace to use (for example: http://my.namespace.org + Wprowadź przestrzeń nazw (na przykład: http://moja.przestrzen.nazw.org) + + + + XmlExportConfig + + + Output format + Format wyjściowy + + + + Format document (new lines, indentation) + Formatuj dokument (nowe linie, wcięcia) + + + + Compress (everything in one line) + Kompresuj (wszystko w jednej linii) + + + + Special characters escaping + Podmiana znaków specjalnych + + + + <p>Ampersands will be used for shorter values and CDATA will be used for larger values. This applies only to values that require character escaping. Other values will be exported as they are.</p> + <p>Dla krótszych wartości będzie użyty ampersand, a dla dłuższych CDATA. Dotyczy to tylko wartości, które wymagają podmiany znaków. Inne wartości będą wyeksportowane bez zmian.</p> + + + + Use CDATA and ampersands + Użyj CDATA i ampersandów + + + + <p>Every value requiring character escepe will be enclosed in CDATA block.</p> + <p>Każda wartość wymagająca podmiany znaków będzie zamknięta w bloku CDATA.</p> + + + + Always use CDATA + Zawsze używaj CDATA + + + + <p>Every character that require esceping will be replaced with its ampersand escape sequence. No CDATA blocks will be used.</p> + <p>Każdy znak wymagający podmiany będzie zastąpiony odpowiednią sekwencją z ampersandem. Bloki CDATA nie będą używane.</p> + + + + Always use ampersand + Zawsze używaj ampersanda + + + + Define XML namespace + Zdefiniuj przestrzeń nazw XML + + + diff --git a/Plugins/XmlExport/xmlexport.cpp b/Plugins/XmlExport/xmlexport.cpp index 746d246..e76fe7d 100644 --- a/Plugins/XmlExport/xmlexport.cpp +++ b/Plugins/XmlExport/xmlexport.cpp @@ -35,7 +35,7 @@ void XmlExport::validateOptions() EXPORT_MANAGER->updateVisibilityAndEnabled(cfg.XmlExport.Namespace, true, useNs); bool nsValid = !useNs || !cfg.XmlExport.Namespace.get().isEmpty(); - EXPORT_MANAGER->handleValidationFromPlugin(nsValid, cfg.XmlExport.Namespace, tr("Enter the namespace to use (for example: http://my.namespace.org")); + EXPORT_MANAGER->handleValidationFromPlugin(nsValid, cfg.XmlExport.Namespace, tr("Enter the namespace to use (for example: http://my.namespace.org)")); } QString XmlExport::defaultFileExtension() const diff --git a/Plugins/XmlExport/xmlexport.qrc b/Plugins/XmlExport/xmlexport.qrc index d6a77a6..cfa97ff 100644 --- a/Plugins/XmlExport/xmlexport.qrc +++ b/Plugins/XmlExport/xmlexport.qrc @@ -2,4 +2,7 @@ XmlExport.ui + + XmlExport_pl.qm + diff --git a/SQLiteStudio3/coreSQLiteStudio/ChangeLog.txt b/SQLiteStudio3/coreSQLiteStudio/ChangeLog.txt index 0baf02c..c890b69 100644 --- a/SQLiteStudio3/coreSQLiteStudio/ChangeLog.txt +++ b/SQLiteStudio3/coreSQLiteStudio/ChangeLog.txt @@ -1,3 +1,33 @@ +[3.0.2] + * [ADDED]: Full support for the interface translations. + * [ADDED]: Polish translation. + * [ADDED]: #219, #2711 Reset autoincrement feature to context menu of table and to structure toolbar in table window. + * [ADDED]: #2715 Added "rows affected" to the execution result message for INSERT/DELETE/UPDATE queries. + * [BUGFIX]: Fixed deleting column from table that is the only column covered by an index or an "UPDATE OF" trigger. + * [BUGFIX]: #2703 Fixed compilation errors on GCC 4.9. + * [BUGFIX]: #2707 Fixed crash when importing CSV file with empty value for last column. + * [BUGFIX]: Valid objects in SQL editor are now highlighted and are Ctrl+clickable (the feature was there, but was broken and it didn't work). + * [BUGFIX]: Fixed invalid 'modified' status when focusing out NumberMultiEditor in FormView, resulting in uncommited change on FormView, even there was no change. + * [BUGFIX]: #2698 Fixed double precision numbers displaying in the Grid View. + * [BUGFIX]: #2696 Fixed handling foreign keys when the main table was not renamed, just columns changed. + * [BUGFIX]: #2713 Fixed foreign key actions in Foreign Key dialog, so they are no longer the same for ON UPDATE and ON DELETE, even they were configured differently. + * [BUGFIX]: #2715 Fixed storing rows affected/selected in SQL Editor history (bug since version 3.0.0 caused "rows" column in SQL history to be always 0). + * [BUGFIX]: Main window toolbar is updated after creating/deleting database objects (it was not). + * [BUGFIX]: #2722 Fixed crash when exporting database without data. + * [BUGFIX]: #2727 Fixed error message when calling SELECT with table from (transparently) attached database and selecting invalid column - message was misleading. + * [BUGFIX]: #2728, #2729 Fixed DEFAULT constraint dialog, so 1) it works when creating first column for new table, 2) it allows a single word as a default value, even the word is not an explicit string. + * [BUGFIX]: #2697 Fixed data populate dialog. + * [BUGFIX]: #2731 Fixed problem with attached databases not detaching after transparent attach in cross-database queries. + * [BUGFIX]: #2734 Fixed code assistant crash in Trigger Dialog. + * [BUGFIX]: #2721 Fixed initial selection of database in SQL Editor window, so it's set to the database currently selected in databases list on the left. + * [BUGFIX]: #2721 Added database name to error message when the SQL query execution failed. + * [BUGFIX]: #2718 Checkbox in CSV import plugin renamed to "Skip first row of data". + * [BUGFIX]: Fixed staring edition of data in grid by pressing Enter key. + * [BUGFIX]: #2745 Fixed crash when ctrl+right_clicking in SQL editor. + * [BUGFIX]: #2733 Fixed handling of foreign keys when changing table structure. + * [BUGFIX]: #2749 Fixed handling of function(distinct arg), resulting in incorrect results when executed. + * [BUGFIX]: Fixed logging SQL queries when --debug-sql is enabled. Queries from query executor were not logged. + [3.0.1] * [ADDED]: When the data is being read into the Gird View, columns width gets automatically adjusted, so for small values they are shrinked and for bigger values they're enlarged, but never above the configured limit (a new option in config dialog). * [ADDED]: Implemented support for immediate editing of rows just added to the WITHOUT ROWID tables (previously the manual refresh of data view was required). diff --git a/SQLiteStudio3/coreSQLiteStudio/completionhelper.h b/SQLiteStudio3/coreSQLiteStudio/completionhelper.h index 63b7225..2cb3c01 100644 --- a/SQLiteStudio3/coreSQLiteStudio/completionhelper.h +++ b/SQLiteStudio3/coreSQLiteStudio/completionhelper.h @@ -18,6 +18,8 @@ class DbAttacher; class API_EXPORT CompletionHelper : public QObject { + Q_OBJECT + friend class CompletionComparer; public: diff --git a/SQLiteStudio3/coreSQLiteStudio/coreSQLiteStudio.pro b/SQLiteStudio3/coreSQLiteStudio/coreSQLiteStudio.pro index 1ce7520..e58e2a8 100644 --- a/SQLiteStudio3/coreSQLiteStudio/coreSQLiteStudio.pro +++ b/SQLiteStudio3/coreSQLiteStudio/coreSQLiteStudio.pro @@ -45,6 +45,8 @@ portable { CONFIG += c++11 QMAKE_CXXFLAGS += -pedantic +TRANSLATIONS += translations/coreSQLiteStudio_pl.ts + SOURCES += sqlitestudio.cpp \ returncode.cpp \ services/config.cpp \ @@ -200,7 +202,8 @@ SOURCES += sqlitestudio.cpp \ rsa/Key.cpp \ rsa/KeyPair.cpp \ rsa/PrimeGenerator.cpp \ - rsa/RSA.cpp + rsa/RSA.cpp \ + translations.cpp HEADERS += sqlitestudio.h\ coreSQLiteStudio_global.h \ @@ -386,7 +389,8 @@ HEADERS += sqlitestudio.h\ rsa/Key.h \ rsa/KeyPair.h \ rsa/PrimeGenerator.h \ - rsa/RSA.h + rsa/RSA.h \ + translations.h unix: { target.path = $$LIBDIR diff --git a/SQLiteStudio3/coreSQLiteStudio/coresqlitestudio.qrc b/SQLiteStudio3/coreSQLiteStudio/coresqlitestudio.qrc index 2b58106..6f2f925 100644 --- a/SQLiteStudio3/coreSQLiteStudio/coresqlitestudio.qrc +++ b/SQLiteStudio3/coreSQLiteStudio/coresqlitestudio.qrc @@ -18,4 +18,7 @@ licenses/diff_match.txt licenses/gpl.txt + + translations/coreSQLiteStudio_pl.qm + diff --git a/SQLiteStudio3/coreSQLiteStudio/csvserializer.cpp b/SQLiteStudio3/coreSQLiteStudio/csvserializer.cpp index 97cc739..3672527 100644 --- a/SQLiteStudio3/coreSQLiteStudio/csvserializer.cpp +++ b/SQLiteStudio3/coreSQLiteStudio/csvserializer.cpp @@ -43,12 +43,14 @@ QList CsvSerializer::deserialize(const QString& data, const CsvForm int pos = 0; int lgt = data.length(); bool quotes = false; + bool sepAsLast = false; QString field = ""; QChar c; while (pos < lgt) { c = data[pos]; + sepAsLast = false; if (!quotes && c == '"' ) { quotes = true; @@ -69,6 +71,7 @@ QList CsvSerializer::deserialize(const QString& data, const CsvForm { cells << field; field.clear(); + sepAsLast = true; } else if (!quotes && format.rowSeparator.contains(c)) { @@ -84,7 +87,7 @@ QList CsvSerializer::deserialize(const QString& data, const CsvForm pos++; } - if (field.size() > 0) + if (field.size() > 0 || sepAsLast) cells << field; if (cells.size() > 0) diff --git a/SQLiteStudio3/coreSQLiteStudio/db/abstractdb.cpp b/SQLiteStudio3/coreSQLiteStudio/db/abstractdb.cpp index 56275aa..4b3165b 100644 --- a/SQLiteStudio3/coreSQLiteStudio/db/abstractdb.cpp +++ b/SQLiteStudio3/coreSQLiteStudio/db/abstractdb.cpp @@ -305,7 +305,6 @@ SqlQueryPtr AbstractDb::execHashArg(const QString& query, const QHashsetArgs(args); @@ -323,7 +322,6 @@ SqlQueryPtr AbstractDb::execListArg(const QString& query, const QList& if (!isOpenInternal()) return SqlQueryPtr(new SqlErrorResults(SqlErrorCode::DB_NOT_OPEN, tr("Cannot execute query on closed database."))); - logSql(this, query, args, flags); QString newQuery = query; SqlQueryPtr queryStmt = prepare(newQuery); queryStmt->setArgs(args); @@ -636,7 +634,13 @@ void AbstractDb::detachInternal(Db* otherDb) return; } - exec(QString("DETACH %1;").arg(attachedDbMap.valueByRight(otherDb)), Flag::NO_LOCK); + QString dbName = attachedDbMap.valueByRight(otherDb); + SqlQueryPtr res = exec(QString("DETACH %1;").arg(dbName), Flag::NO_LOCK); + if (res->isError()) + { + qCritical() << "Cannot detach" << dbName << " / " << otherDb->getName() << ":" << res->getErrorText(); + return; + } attachedDbMap.removeRight(otherDb); emit detached(otherDb); } diff --git a/SQLiteStudio3/coreSQLiteStudio/db/abstractdb2.h b/SQLiteStudio3/coreSQLiteStudio/db/abstractdb2.h index e35e038..c521bfa 100644 --- a/SQLiteStudio3/coreSQLiteStudio/db/abstractdb2.h +++ b/SQLiteStudio3/coreSQLiteStudio/db/abstractdb2.h @@ -7,6 +7,7 @@ #include "common/unused.h" #include "db/sqlerrorcodes.h" #include "db/sqlerrorresults.h" +#include "log.h" #include #include #include @@ -195,7 +196,7 @@ bool AbstractDb2::openInternal() if (errMsg) { - dbErrorMessage = tr("Could not open database: %1").arg(QString::fromUtf8(errMsg)); + dbErrorMessage = QObject::tr("Could not open database: %1").arg(QString::fromUtf8(errMsg)); sqlite_freemem(errMsg); } return false; @@ -570,6 +571,8 @@ bool AbstractDb2::Query::execInternal(const QList& args) ReadWriteLocker locker(&(db->dbOperLock), query, Dialect::Sqlite2, flags.testFlag(Db::Flag::NO_LOCK)); + logSql(db.data(), query, args, flags); + QueryWithParamCount queryWithParams = getQueryWithParamCount(query, Dialect::Sqlite2); QString singleStr = replaceNamedParams(queryWithParams.first); @@ -604,6 +607,8 @@ bool AbstractDb2::Query::execInternal(const QHash& args) ReadWriteLocker locker(&(db->dbOperLock), query, Dialect::Sqlite2, flags.testFlag(Db::Flag::NO_LOCK)); + logSql(db.data(), query, args, flags); + QueryWithParamNames queryWithParams = getQueryWithParamNames(query, Dialect::Sqlite2); QString singleStr = replaceNamedParams(queryWithParams.first); @@ -788,7 +793,7 @@ int AbstractDb2::Query::fetchNext() if (!rowAvailable || !stmt) { - setError(SQLITE_MISUSE, tr("Result set expired or no row available.")); + setError(SQLITE_MISUSE, QObject::tr("Result set expired or no row available.")); return SQLITE_MISUSE; } diff --git a/SQLiteStudio3/coreSQLiteStudio/db/abstractdb3.h b/SQLiteStudio3/coreSQLiteStudio/db/abstractdb3.h index 89c3d96..7a84ec2 100644 --- a/SQLiteStudio3/coreSQLiteStudio/db/abstractdb3.h +++ b/SQLiteStudio3/coreSQLiteStudio/db/abstractdb3.h @@ -8,6 +8,7 @@ #include "services/collationmanager.h" #include "sqlitestudio.h" #include "db/sqlerrorcodes.h" +#include "log.h" #include #include #include @@ -352,7 +353,7 @@ bool AbstractDb3::openInternal() if (handle) T::close(handle); - dbErrorMessage = tr("Could not open database: %1").arg(extractLastError()); + dbErrorMessage = QObject::tr("Could not open database: %1").arg(extractLastError()); dbErrorCode = res; return false; } @@ -372,7 +373,7 @@ bool AbstractDb3::closeInternal() int res = T::close(dbHandle); if (res != T::OK) { - dbErrorMessage = tr("Could not close database: %1").arg(extractLastError()); + dbErrorMessage = QObject::tr("Could not close database: %1").arg(extractLastError()); dbErrorCode = res; qWarning() << "Error closing database. That's weird:" << dbErrorMessage; return false; @@ -854,6 +855,8 @@ bool AbstractDb3::Query::execInternal(const QList& args) return false; ReadWriteLocker locker(&(db->dbOperLock), query, Dialect::Sqlite3, flags.testFlag(Db::Flag::NO_LOCK)); + logSql(db.data(), query, args, flags); + QueryWithParamCount queryWithParams = getQueryWithParamCount(query, Dialect::Sqlite3); int res; @@ -890,6 +893,7 @@ bool AbstractDb3::Query::execInternal(const QHash& args) return false; ReadWriteLocker locker(&(db->dbOperLock), query, Dialect::Sqlite3, flags.testFlag(Db::Flag::NO_LOCK)); + logSql(db.data(), query, args, flags); QueryWithParamNames queryWithParams = getQueryWithParamNames(query, Dialect::Sqlite3); @@ -1075,7 +1079,7 @@ int AbstractDb3::Query::fetchNext() if (!rowAvailable || !stmt) { - setError(T::MISUSE, tr("Result set expired or no row available.")); + setError(T::MISUSE, QObject::tr("Result set expired or no row available.")); return T::MISUSE; } diff --git a/SQLiteStudio3/coreSQLiteStudio/db/queryexecutor.cpp b/SQLiteStudio3/coreSQLiteStudio/db/queryexecutor.cpp index c840947..97b3f1d 100644 --- a/SQLiteStudio3/coreSQLiteStudio/db/queryexecutor.cpp +++ b/SQLiteStudio3/coreSQLiteStudio/db/queryexecutor.cpp @@ -39,7 +39,6 @@ QueryExecutor::QueryExecutor(Db* db, const QString& query, QObject *parent) : setDb(db); setAutoDelete(false); - connect(this, SIGNAL(executionFinished(SqlQueryPtr)), this, SLOT(cleanupAfterExecFinished(SqlQueryPtr))); connect(this, SIGNAL(executionFailed(int,QString)), this, SLOT(cleanupAfterExecFailed(int,QString))); connect(DBLIST, SIGNAL(dbAboutToBeUnloaded(Db*, DbPlugin*)), this, SLOT(cleanupBeforeDbDestroy(Db*, DbPlugin*))); } @@ -138,12 +137,6 @@ void QueryExecutor::stepFailed(QueryExecutorStep* currentStep) executeSimpleMethod(); } -void QueryExecutor::cleanupAfterExecFinished(SqlQueryPtr results) -{ - UNUSED(results); - cleanup(); -} - void QueryExecutor::cleanupAfterExecFailed(int code, QString errorMessage) { UNUSED(code); @@ -213,6 +206,7 @@ void QueryExecutor::execInternal() { resultsCountingAsyncId = 0; db->interrupt(); + releaseResultsAndCleanup(); } // Reset context @@ -242,13 +236,13 @@ void QueryExecutor::interrupt() db->asyncInterrupt(); } -void QueryExecutor::countResults() +bool QueryExecutor::countResults() { if (context->skipRowCounting) - return; + return false; if (context->countingQuery.isEmpty()) // simple method doesn't provide that - return; + return false; if (asyncMode) { @@ -267,8 +261,10 @@ void QueryExecutor::countResults() { notifyError(tr("An error occured while executing the count(*) query, thus data paging will be disabled. Error details from the database: %1") .arg(results->getErrorText())); + return false; } } + return true; } qint64 QueryExecutor::getLastExecutionTime() const @@ -416,7 +412,7 @@ void QueryExecutor::simpleExecutionFinished(SqlQueryPtr results) executionMutex.lock(); executionInProgress = false; executionMutex.unlock(); - error(results->getErrorCode(), results->getErrorText()); + handleErrorsFromSmartAndSimpleMethods(results); return; } @@ -552,6 +548,44 @@ void QueryExecutor::setNoMetaColumns(bool value) noMetaColumns = value; } +void QueryExecutor::handleErrorsFromSmartAndSimpleMethods(SqlQueryPtr results) +{ + QString simpleText = results->getErrorText(); + + // Smart text may contain messages from steps before the actual execution, but they will have negative error code. + // Positive error code means that the error came directly from SQLite. + QString smartText = context->errorCodeFromSmartExecution > 0 ? context->errorMessageFromSmartExecution : QString(); + + if (simpleText.contains("no such") && smartText.contains("no such")) + { + // This happens if user refers to invalid column in attached database. + // Smart execution will tell "no such column: xxx", while simple method will tell: + // "no such table: attach.table". In that case we're more interested in smart method message. + // This also applies to views. + error(context->errorCodeFromSmartExecution, smartText); + return; + } + + if (simpleText.contains("no such") && smartText.contains("ambiguous")) + { + // This happens when smart execution raised "amigous column name" or something like that, + // but simple method failed to work because of transparent database attaching. We prefer smart method error. + error(context->errorCodeFromSmartExecution, smartText); + return; + } + + // No special case, use simple method error + error(results->getErrorCode(), simpleText); +} + +void QueryExecutor::releaseResultsAndCleanup() +{ + // The results have to be releases, otherwise attached databases cannot be detached. + // Results handle cannot be kept elsewhere, otherwise detach will fail. + context->executionResults.clear(); + cleanup(); +} + SqlQueryPtr QueryExecutor::getResults() const { return context->executionResults; @@ -562,6 +596,11 @@ bool QueryExecutor::wasSchemaModified() const return context->schemaModified; } +bool QueryExecutor::wasDataModifyingQuery() const +{ + return context->dataModifyingQuery; +} + QList QueryExecutor::resolveColumnTypes(Db* db, QList& columns, bool noDbLocking) { QSet tables; diff --git a/SQLiteStudio3/coreSQLiteStudio/db/queryexecutor.h b/SQLiteStudio3/coreSQLiteStudio/db/queryexecutor.h index c4a3e4d..72c7fed 100644 --- a/SQLiteStudio3/coreSQLiteStudio/db/queryexecutor.h +++ b/SQLiteStudio3/coreSQLiteStudio/db/queryexecutor.h @@ -603,12 +603,37 @@ class API_EXPORT QueryExecutor : public QObject, public QRunnable */ bool schemaModified = false; + /** + * @brief Tells if executed query was one of DELETE, UPDATE or INSERT. + */ + bool dataModifyingQuery = false; + /** * @brief Forbids QueryExecutor to return meta columns. * * See QueryExecutor::noMetaColumns for details. */ bool noMetaColumns = false; + + /** + * @brief Contains error code from smart execution. + * + * This is always set by the smart execution method. It's useful if the smart execution + * failed and the simple execution method is being performed. In that case the query + * result will contain error code from simple execution, hiding the original error code + * from smart execution. + */ + int errorCodeFromSmartExecution = 0; + + /** + * @brief Contains error message from smart execution. + * + * This is always set by the smart execution method. It's useful if the smart execution + * failed and the simple execution method is being performed. In that case the query + * result will contain error message from simple execution, hiding the original error + * message from smart execution. + */ + QString errorMessageFromSmartExecution; }; /** @@ -654,6 +679,7 @@ class API_EXPORT QueryExecutor : public QObject, public QRunnable /** * @brief Executes counting query. + * @return true if counting query is executed (in async mode) or was executed correctly (in sync mode), false on error. * * Executes (asynchronously) counting query for currently defined query. After execution is done, the resultsCountingFinished() * signal is emitted. @@ -661,8 +687,10 @@ class API_EXPORT QueryExecutor : public QObject, public QRunnable * Counting query is made of original query wrapped with "SELECT count(*) FROM (original_query)". * * It is executed after the main query execution has finished. + * + * If query is being executed in async mode, the true result (sucess/fail) will be known from later, not from this method. */ - void countResults(); + bool countResults(); /** * @brief Gets time of how long it took to execute query. @@ -976,12 +1004,20 @@ class API_EXPORT QueryExecutor : public QObject, public QRunnable SqlQueryPtr getResults() const; bool wasSchemaModified() const; + bool wasDataModifyingQuery() const; static QList resolveColumnTypes(Db* db, QList& columns, bool noDbLocking = false); bool getNoMetaColumns() const; void setNoMetaColumns(bool value); + void handleErrorsFromSmartAndSimpleMethods(SqlQueryPtr results); + + /** + * @brief Clears results handle and detaches any attached databases. + */ + void releaseResultsAndCleanup(); + private: /** * @brief Executes query. @@ -1334,14 +1370,6 @@ class API_EXPORT QueryExecutor : public QObject, public QRunnable */ void stepFailed(QueryExecutorStep *currentStep); - /** - * @brief Cleanup routines after successful query execution. - * @param results Query results. - * - * Releases resources that are no longer used. Currently simply calls cleanup(). - */ - void cleanupAfterExecFinished(SqlQueryPtr results); - /** * @brief Cleanup routines after failed query execution. * @param code Error code. diff --git a/SQLiteStudio3/coreSQLiteStudio/db/queryexecutorsteps/queryexecutordetectschemaalter.cpp b/SQLiteStudio3/coreSQLiteStudio/db/queryexecutorsteps/queryexecutordetectschemaalter.cpp index c3c8a5c..02a73d2 100644 --- a/SQLiteStudio3/coreSQLiteStudio/db/queryexecutorsteps/queryexecutordetectschemaalter.cpp +++ b/SQLiteStudio3/coreSQLiteStudio/db/queryexecutorsteps/queryexecutordetectschemaalter.cpp @@ -18,6 +18,10 @@ bool QueryExecutorDetectSchemaAlter::exec() case SqliteQueryType::CreateVirtualTable: context->schemaModified = true; break; + case SqliteQueryType::Insert: + case SqliteQueryType::Delete: + case SqliteQueryType::Update: + context->dataModifyingQuery = true; default: break; } diff --git a/SQLiteStudio3/coreSQLiteStudio/db/queryexecutorsteps/queryexecutorexecute.cpp b/SQLiteStudio3/coreSQLiteStudio/db/queryexecutorsteps/queryexecutorexecute.cpp index 7e0abe5..f42f647 100644 --- a/SQLiteStudio3/coreSQLiteStudio/db/queryexecutorsteps/queryexecutorexecute.cpp +++ b/SQLiteStudio3/coreSQLiteStudio/db/queryexecutorsteps/queryexecutorexecute.cpp @@ -11,7 +11,7 @@ bool QueryExecutorExecute::exec() { - qDebug() << "q:" << context->processedQuery; +// qDebug() << "q:" << context->processedQuery; startTime = QDateTime::currentMSecsSinceEpoch(); return executeQueries(); @@ -32,6 +32,7 @@ bool QueryExecutorExecute::executeQueries() { QHash bindParamsForQuery; SqlQueryPtr results; + context->rowsAffected = 0; Db::Flags flags; if (context->preloadResults) @@ -56,6 +57,8 @@ bool QueryExecutorExecute::executeQueries() handleFailResult(results); return false; } + + context->rowsAffected += results->rowsAffected(); } handleSuccessfulResult(results); return true; @@ -72,7 +75,6 @@ void QueryExecutorExecute::handleSuccessfulResult(SqlQueryPtr results) } context->executionTime = QDateTime::currentMSecsSinceEpoch() - startTime; - context->rowsAffected = results->rowsAffected(); // For PRAGMA and EXPLAIN we simply count results for rows returned SqliteQueryPtr lastQuery = context->parsedQueries.last(); @@ -92,6 +94,8 @@ void QueryExecutorExecute::handleFailResult(SqlQueryPtr results) { if (!results->isInterrupted()) { + context->errorCodeFromSmartExecution = results->getErrorCode(); + context->errorMessageFromSmartExecution = results->getErrorText(); qWarning() << "Could not execute query with smart method:" << queryExecutor->getOriginalQuery() << "\nError message:" << results->getErrorText() << "\nSkipping smart execution."; diff --git a/SQLiteStudio3/coreSQLiteStudio/db/sqlquery.h b/SQLiteStudio3/coreSQLiteStudio/db/sqlquery.h index a7610fa..4e0d9cf 100644 --- a/SQLiteStudio3/coreSQLiteStudio/db/sqlquery.h +++ b/SQLiteStudio3/coreSQLiteStudio/db/sqlquery.h @@ -133,7 +133,6 @@ class API_EXPORT SqlQuery * @brief Gets number of rows that were affected by the query. * @return Number of rows affected. * - * For SELECT statements this is number of returned rows. * For UPDATE this is number of rows updated. * For DELETE this is number of rows deleted. * FOR INSERT this is number of rows inserted (starting with SQLite 3.7.11 you can insert multiple rows with single INSERT statement). diff --git a/SQLiteStudio3/coreSQLiteStudio/dbversionconverter.cpp b/SQLiteStudio3/coreSQLiteStudio/dbversionconverter.cpp index bf13eac..d31d536 100644 --- a/SQLiteStudio3/coreSQLiteStudio/dbversionconverter.cpp +++ b/SQLiteStudio3/coreSQLiteStudio/dbversionconverter.cpp @@ -134,12 +134,12 @@ SqliteQueryPtr DbVersionConverter::convert3To2(SqliteQueryPtr query) switch (query->queryType) { case SqliteQueryType::AlterTable: - errors << QObject::tr("SQLite 2 does not support 'ALTER TABLE' statement."); + errors << QObject::tr("SQLite %1 does not support '%2' statement.").arg("2", "ALTER TABLE"); newQuery = SqliteEmptyQueryPtr::create(); storeErrorDiff(query.data()); break; case SqliteQueryType::Analyze: - errors << QObject::tr("SQLite 2 does not support 'ANAYLZE' statement."); + errors << QObject::tr("SQLite %1 does not support '%2' statement.").arg("2", "ANAYLZE"); newQuery = SqliteEmptyQueryPtr::create(); storeErrorDiff(query.data()); break; @@ -192,13 +192,14 @@ SqliteQueryPtr DbVersionConverter::convert3To2(SqliteQueryPtr query) newQuery = copyQuery(query); if (!modifyVirtualTableForVesion2(newQuery, newQuery.dynamicCast().data())) { - errors << QObject::tr("SQLite 2 does not support 'CREATE VIRTUAL TABLE' statement."); + errors << QObject::tr("SQLite %1 does not support '%2' statement.").arg("2", "CREATE VIRTUAL TABLE"); newQuery = SqliteEmptyQueryPtr::create(); storeErrorDiff(query.data()); } else { - errors << QObject::tr("SQLite 2 does not support 'CREATE VIRTUAL TABLE' statement. The regular table can be created instead if you proceed."); + errors << QObject::tr("SQLite %1 does not support '%2' statement, but the regular table can be created instead if you proceed.") + .arg("2", "CREATE VIRTUAL TABLE"); } break; case SqliteQueryType::Delete: @@ -236,12 +237,12 @@ SqliteQueryPtr DbVersionConverter::convert3To2(SqliteQueryPtr query) newQuery = copyQuery(query); break; case SqliteQueryType::Reindex: - errors << QObject::tr("SQLite 2 does not support 'REINDEX' statement."); + errors << QObject::tr("SQLite %1 does not support '%2' statement.").arg("2", "REINDEX"); newQuery = SqliteEmptyQueryPtr::create(); storeErrorDiff(query.data()); break; case SqliteQueryType::Release: - errors << QObject::tr("SQLite 2 does not support 'RELEASE' statement."); + errors << QObject::tr("SQLite %1 does not support '%2' statement.").arg("2", "RELEASE"); newQuery = SqliteEmptyQueryPtr::create(); storeErrorDiff(query.data()); break; @@ -249,7 +250,7 @@ SqliteQueryPtr DbVersionConverter::convert3To2(SqliteQueryPtr query) newQuery = copyQuery(query); break; case SqliteQueryType::Savepoint: - errors << QObject::tr("SQLite 2 does not support 'SAVEPOINT' statement."); + errors << QObject::tr("SQLite %1 does not support '%2' statement.").arg("2", "SAVEPOINT"); newQuery = SqliteEmptyQueryPtr::create(); storeErrorDiff(query.data()); break; @@ -327,7 +328,7 @@ SqliteQueryPtr DbVersionConverter::convert2To3(SqliteQueryPtr query) newQuery = copyQuery(query); break; case SqliteQueryType::Copy: - errors << QObject::tr("SQLite 3 does not support 'COPY' statement."); + errors << QObject::tr("SQLite %1 does not support '%2' statement.").arg("3", "COPY"); newQuery = SqliteEmptyQueryPtr::create(); storeErrorDiff(query.data()); break; @@ -431,7 +432,7 @@ bool DbVersionConverter::modifySelectForVersion2(SqliteSelect* select) { if (select->with) { - errors << QObject::tr("SQLite 2 does not support the 'WITH' clause. Cannot convert '%1' statement with that clause.").arg("SELECT"); + errors << QObject::tr("SQLite %1 does not support the '%2' clause. Cannot convert '%3' statement with that clause.").arg("2", "WITH", "SELECT"); return false; } @@ -457,7 +458,7 @@ bool DbVersionConverter::modifyDeleteForVersion2(SqliteDelete* del) { if (del->with) { - errors << QObject::tr("SQLite 2 does not support the 'WITH' clause. Cannot convert '%1' statement with that clause.").arg("DELETE"); + errors << QObject::tr("SQLite %1 does not support the '%2' clause. Cannot convert '%3' statement with that clause.").arg("2", "WITH", "DELETE"); return false; } @@ -478,13 +479,13 @@ bool DbVersionConverter::modifyInsertForVersion2(SqliteInsert* insert) { if (insert->with) { - errors << QObject::tr("SQLite 2 does not support the 'WITH' clause. Cannot convert '%1' statement with that clause.").arg("INSERT"); + errors << QObject::tr("SQLite %1 does not support the '%2' clause. Cannot convert '%3' statement with that clause.").arg("2", "WITH", "INSERT"); return false; } if (insert->defaultValuesKw) { - errors << QObject::tr("SQLite 2 does not support the 'DEFAULT VALUES' clause in the 'INSERT' clause."); + errors << QObject::tr("SQLite %1 does not support the '%2' clause in the '%3' statement.").arg("2", "DEFAULT VALUES", "INSERT"); return false; } @@ -511,7 +512,7 @@ bool DbVersionConverter::modifyUpdateForVersion2(SqliteUpdate* update) { if (update->with) { - errors << QObject::tr("SQLite 2 does not support the 'WITH' clause. Cannot convert '%1' statement with that clause.").arg("UPDATE"); + errors << QObject::tr("SQLite %1 does not support the '%2' clause. Cannot convert '%3' statement with that clause.").arg("2", "WITH", "UPDATE"); return false; } @@ -752,7 +753,7 @@ bool DbVersionConverter::modifySingleExprForVersion2(SqliteExpr* expr) case SqliteExpr::Mode::RAISE: break; case SqliteExpr::Mode::CTIME: - errors << QObject::tr("SQLite 2 does not support current date or time clauses in expressions."); + errors << QObject::tr("SQLite %1 does not support current date or time clauses in expressions.").arg("2"); return false; case SqliteExpr::Mode::IN: case SqliteExpr::Mode::SUB_SELECT: @@ -763,10 +764,10 @@ bool DbVersionConverter::modifySingleExprForVersion2(SqliteExpr* expr) break; } case SqliteExpr::Mode::CAST: - errors << QObject::tr("SQLite 2 does not support 'CAST' clause in expressions."); + errors << QObject::tr("SQLite %1 does not support '%2' clause in expressions.").arg("2", "CAST"); return false; case SqliteExpr::Mode::EXISTS: - errors << QObject::tr("SQLite 2 does not support 'EXISTS' clause in expressions."); + errors << QObject::tr("SQLite %1 does not support '%2' clause in expressions.").arg("2", "EXISTS"); return false; case SqliteExpr::Mode::COLLATE: { @@ -777,7 +778,7 @@ bool DbVersionConverter::modifySingleExprForVersion2(SqliteExpr* expr) } else { - errors << QObject::tr("SQLite 2 does not support 'COLLATE' clause in expressions."); + errors << QObject::tr("SQLite %1 does not support '%2' clause in expressions.").arg("2", "COLLATE"); return false; } } diff --git a/SQLiteStudio3/coreSQLiteStudio/exportworker.cpp b/SQLiteStudio3/coreSQLiteStudio/exportworker.cpp index 9d227de..b14bbf1 100644 --- a/SQLiteStudio3/coreSQLiteStudio/exportworker.cpp +++ b/SQLiteStudio3/coreSQLiteStudio/exportworker.cpp @@ -172,7 +172,7 @@ QHash ExportWorker::getProviderData } else if (results->isError()) { - notifyError(tr("Error while counting data column width to export from query results: %2").arg(results->getErrorText())); + notifyError(tr("Error while counting data column width to export from query results: %1").arg(results->getErrorText())); } else { @@ -378,14 +378,21 @@ bool ExportWorker::exportTableInternal(const QString& database, const QString& t SqliteCreateTablePtr createTable = parsedDdl.dynamicCast(); SqliteCreateVirtualTablePtr createVirtualTable = parsedDdl.dynamicCast(); + QStringList colNames; + if (results) + colNames = results->getColumnNames(); + if (createTable) { - if (!plugin->exportTable(database, table, results->getColumnNames(), ddl, createTable, providerData)) + if (!results) + colNames = createTable->getColumnNames(); + + if (!plugin->exportTable(database, table, colNames, ddl, createTable, providerData)) return false; } else { - if (!plugin->exportVirtualTable(database, table, results->getColumnNames(), ddl, createVirtualTable, providerData)) + if (!plugin->exportVirtualTable(database, table, colNames, ddl, createVirtualTable, providerData)) return false; } @@ -393,14 +400,17 @@ bool ExportWorker::exportTableInternal(const QString& database, const QString& t return false; SqlResultsRowPtr row; - while (results->hasNext()) + if (results) { - row = results->next(); - if (!plugin->exportTableRow(row)) - return false; + while (results->hasNext()) + { + row = results->next(); + if (!plugin->exportTableRow(row)) + return false; - if (isInterrupted()) - return false; + if (isInterrupted()) + return false; + } } if (!plugin->afterExportTable()) @@ -467,7 +477,6 @@ void ExportWorker::queryTableDataToExport(Db* db, const QString& table, SqlQuery if (config->exportData) { QString wrappedTable = wrapObjIfNeeded(table, db->getDialect()); - dataPtr = db->exec(sql.arg(wrappedTable)); if (dataPtr->isError()) *errorMessage = tr("Error while reading data to export from table %1: %2").arg(table, dataPtr->getErrorText()); diff --git a/SQLiteStudio3/coreSQLiteStudio/parser/ast/sqliteexpr.cpp b/SQLiteStudio3/coreSQLiteStudio/parser/ast/sqliteexpr.cpp index 969f029..1429cef 100644 --- a/SQLiteStudio3/coreSQLiteStudio/parser/ast/sqliteexpr.cpp +++ b/SQLiteStudio3/coreSQLiteStudio/parser/ast/sqliteexpr.cpp @@ -457,7 +457,11 @@ TokenList SqliteExpr::rebuildTokensFromContents() builder.withStatement(expr1).withSpace().withOperator(binaryOp).withSpace().withStatement(expr2); break; case SqliteExpr::Mode::FUNCTION: - builder.withOther(function).withParLeft().withStatementList(exprList).withParRight(); + builder.withOther(function).withParLeft(); + if (distinctKw) + builder.withKeyword("DISTINCT"); + + builder.withStatementList(exprList).withParRight(); break; case SqliteExpr::Mode::SUB_EXPR: builder.withParLeft().withStatement(expr1).withParRight(); diff --git a/SQLiteStudio3/coreSQLiteStudio/parser/parser_helper_stubs.cpp b/SQLiteStudio3/coreSQLiteStudio/parser/parser_helper_stubs.cpp index 039c9a5..9299c52 100644 --- a/SQLiteStudio3/coreSQLiteStudio/parser/parser_helper_stubs.cpp +++ b/SQLiteStudio3/coreSQLiteStudio/parser/parser_helper_stubs.cpp @@ -21,6 +21,7 @@ ParserIndexedBy::ParserIndexedBy(bool notIndexed) ParserStubInsertOrReplace::ParserStubInsertOrReplace(bool replace) { this->replace = replace; + this->orConflict = SqliteConflictAlgo::null; } ParserStubInsertOrReplace::ParserStubInsertOrReplace(bool replace, SqliteConflictAlgo orConflict) diff --git a/SQLiteStudio3/coreSQLiteStudio/parser/parsercontext.cpp b/SQLiteStudio3/coreSQLiteStudio/parser/parsercontext.cpp index 7394e75..e9444e5 100644 --- a/SQLiteStudio3/coreSQLiteStudio/parser/parsercontext.cpp +++ b/SQLiteStudio3/coreSQLiteStudio/parser/parsercontext.cpp @@ -27,7 +27,12 @@ void ParserContext::error(TokenPtr token, const QString &text) void ParserContext::error(Token* token, const QString& text) { - error(getTokenPtr(token), text); + if (token->type != Token::INVALID) + error(getTokenPtr(token), text); + else if (managedTokens.size() > 0) + error(managedTokens.last(), text); + else + error(text); } void ParserContext::error(const QString &text) diff --git a/SQLiteStudio3/coreSQLiteStudio/parser/sqlite2_parse.cpp b/SQLiteStudio3/coreSQLiteStudio/parser/sqlite2_parse.cpp index fa61c21..656444a 100644 --- a/SQLiteStudio3/coreSQLiteStudio/parser/sqlite2_parse.cpp +++ b/SQLiteStudio3/coreSQLiteStudio/parser/sqlite2_parse.cpp @@ -165,7 +165,7 @@ typedef union { #define sqlite2_parseARG_FETCH ParserContext* parserContext = yypParser->parserContext #define sqlite2_parseARG_STORE yypParser->parserContext = parserContext #define YYNSTATE 584 -#define YYNRULE 352 +#define YYNRULE 353 #define YYFALLBACK 1 #define YY_NO_ACTION (YYNSTATE+YYNRULE+2) #define YY_ACCEPT_ACTION (YYNSTATE+YYNRULE+1) @@ -241,16 +241,16 @@ static const YYMINORTYPE yyzerominor = { 0 }; static const YYACTIONTYPE yy_action[] = { /* 0 */ 338, 191, 186, 242, 476, 511, 576, 193, 332, 16, /* 10 */ 511, 384, 189, 322, 239, 519, 518, 570, 337, 450, - /* 20 */ 15, 851, 125, 58, 575, 179, 851, 574, 63, 143, + /* 20 */ 15, 852, 125, 58, 575, 179, 852, 574, 63, 143, /* 30 */ 401, 581, 328, 26, 84, 569, 114, 322, 573, 519, - /* 40 */ 518, 851, 851, 35, 851, 851, 851, 851, 851, 851, - /* 50 */ 851, 851, 851, 851, 851, 851, 851, 851, 851, 32, - /* 60 */ 33, 851, 851, 851, 851, 320, 379, 34, 240, 238, + /* 40 */ 518, 852, 852, 35, 852, 852, 852, 852, 852, 852, + /* 50 */ 852, 852, 852, 852, 852, 852, 852, 852, 852, 32, + /* 60 */ 33, 852, 852, 852, 852, 320, 379, 34, 240, 238, /* 70 */ 121, 556, 291, 251, 57, 7, 217, 577, 265, 264, /* 80 */ 523, 179, 555, 336, 335, 338, 569, 549, 548, 550, /* 90 */ 271, 569, 10, 724, 199, 297, 203, 489, 459, 332, /* 100 */ 568, 567, 451, 253, 158, 523, 449, 444, 443, 337, - /* 110 */ 187, 870, 266, 187, 580, 517, 168, 328, 505, 343, + /* 110 */ 187, 871, 266, 187, 580, 517, 168, 328, 505, 343, /* 120 */ 143, 235, 490, 108, 101, 489, 523, 164, 35, 531, /* 130 */ 187, 13, 523, 252, 234, 547, 236, 119, 340, 232, /* 140 */ 339, 120, 216, 155, 32, 33, 481, 547, 322, 215, @@ -258,23 +258,23 @@ static const YYACTIONTYPE yy_action[] = { /* 160 */ 7, 714, 400, 321, 251, 523, 714, 563, 336, 335, /* 170 */ 500, 553, 549, 548, 550, 188, 465, 500, 401, 466, /* 180 */ 366, 365, 552, 364, 293, 435, 39, 39, 39, 38, - /* 190 */ 523, 562, 60, 255, 714, 569, 714, 714, 852, 570, - /* 200 */ 271, 714, 502, 852, 500, 714, 570, 714, 714, 714, + /* 190 */ 523, 562, 60, 255, 714, 569, 714, 714, 853, 570, + /* 200 */ 271, 714, 502, 853, 500, 714, 570, 714, 714, 714, /* 210 */ 714, 523, 569, 178, 531, 422, 13, 523, 44, 45, - /* 220 */ 330, 42, 42, 530, 530, 223, 852, 852, 43, 43, + /* 220 */ 330, 42, 42, 530, 530, 223, 853, 853, 43, 43, /* 230 */ 43, 43, 41, 41, 41, 41, 40, 40, 39, 39, /* 240 */ 39, 38, 199, 297, 203, 55, 236, 92, 340, 232, /* 250 */ 339, 120, 216, 500, 106, 570, 268, 19, 187, 215, /* 260 */ 500, 105, 553, 41, 41, 41, 41, 40, 40, 39, /* 270 */ 39, 39, 38, 552, 40, 40, 39, 39, 39, 38, - /* 280 */ 852, 3, 568, 567, 187, 852, 512, 500, 219, 568, + /* 280 */ 853, 3, 568, 567, 187, 853, 512, 500, 219, 568, /* 290 */ 567, 17, 496, 156, 322, 345, 519, 518, 569, 292, - /* 300 */ 44, 45, 330, 42, 42, 530, 530, 223, 852, 852, + /* 300 */ 44, 45, 330, 42, 42, 530, 530, 223, 853, 853, /* 310 */ 43, 43, 43, 43, 41, 41, 41, 41, 40, 40, - /* 320 */ 39, 39, 39, 38, 547, 533, 852, 100, 308, 306, - /* 330 */ 305, 852, 448, 447, 418, 418, 316, 245, 568, 567, - /* 340 */ 304, 937, 122, 344, 1, 582, 44, 45, 330, 42, - /* 350 */ 42, 530, 530, 223, 852, 852, 43, 43, 43, 43, + /* 320 */ 39, 39, 39, 38, 547, 533, 853, 100, 308, 306, + /* 330 */ 305, 853, 448, 447, 418, 418, 316, 245, 568, 567, + /* 340 */ 304, 938, 122, 344, 1, 582, 44, 45, 330, 42, + /* 350 */ 42, 530, 530, 223, 853, 853, 43, 43, 43, 43, /* 360 */ 41, 41, 41, 41, 40, 40, 39, 39, 39, 38, /* 370 */ 338, 442, 44, 45, 330, 42, 42, 530, 530, 223, /* 380 */ 524, 569, 43, 43, 43, 43, 41, 41, 41, 41, @@ -287,14 +287,14 @@ static const YYACTIONTYPE yy_action[] = { /* 450 */ 523, 524, 569, 336, 335, 285, 781, 549, 548, 550, /* 460 */ 43, 43, 43, 43, 41, 41, 41, 41, 40, 40, /* 470 */ 39, 39, 39, 38, 332, 523, 332, 425, 470, 774, - /* 480 */ 560, 774, 774, 850, 337, 426, 337, 455, 850, 613, + /* 480 */ 560, 774, 774, 851, 337, 426, 337, 455, 851, 613, /* 490 */ 774, 181, 774, 774, 774, 143, 523, 143, 30, 531, - /* 500 */ 614, 13, 523, 850, 850, 850, 850, 850, 850, 850, - /* 510 */ 850, 850, 850, 850, 850, 850, 850, 850, 850, 850, - /* 520 */ 850, 850, 850, 850, 850, 850, 850, 852, 500, 460, - /* 530 */ 357, 320, 852, 318, 75, 570, 401, 570, 311, 251, + /* 500 */ 614, 13, 523, 851, 851, 851, 851, 851, 851, 851, + /* 510 */ 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, + /* 520 */ 851, 851, 851, 851, 851, 851, 851, 853, 500, 460, + /* 530 */ 357, 320, 853, 318, 75, 570, 401, 570, 311, 251, /* 540 */ 569, 251, 446, 445, 570, 358, 359, 44, 45, 330, - /* 550 */ 42, 42, 530, 530, 223, 852, 852, 43, 43, 43, + /* 550 */ 42, 42, 530, 530, 223, 853, 853, 43, 43, 43, /* 560 */ 43, 41, 41, 41, 41, 40, 40, 39, 39, 39, /* 570 */ 38, 338, 44, 45, 330, 42, 42, 530, 530, 223, /* 580 */ 615, 570, 43, 43, 43, 43, 41, 41, 41, 41, @@ -305,14 +305,14 @@ static const YYACTIONTYPE yy_action[] = { /* 630 */ 32, 33, 337, 356, 482, 355, 569, 85, 34, 759, /* 640 */ 532, 111, 70, 78, 487, 483, 7, 759, 90, 494, /* 650 */ 508, 523, 493, 160, 336, 335, 782, 528, 549, 548, - /* 660 */ 550, 532, 440, 434, 568, 567, 118, 54, 332, 919, + /* 660 */ 550, 532, 440, 434, 568, 567, 118, 54, 332, 920, /* 670 */ 214, 100, 308, 306, 305, 75, 523, 333, 337, 571, /* 680 */ 759, 529, 759, 759, 304, 48, 177, 522, 31, 143, /* 690 */ 29, 759, 568, 567, 759, 759, 159, 523, 568, 567, /* 700 */ 531, 464, 13, 523, 44, 45, 330, 42, 42, 530, /* 710 */ 530, 223, 568, 567, 43, 43, 43, 43, 41, 41, /* 720 */ 41, 41, 40, 40, 39, 39, 39, 38, 463, 570, - /* 730 */ 498, 919, 570, 323, 514, 570, 222, 44, 45, 330, + /* 730 */ 498, 920, 570, 323, 514, 570, 222, 44, 45, 330, /* 740 */ 42, 42, 530, 530, 223, 393, 392, 43, 43, 43, /* 750 */ 43, 41, 41, 41, 41, 40, 40, 39, 39, 39, /* 760 */ 38, 44, 45, 330, 42, 42, 530, 530, 223, 540, @@ -324,7 +324,7 @@ static const YYACTIONTYPE yy_action[] = { /* 820 */ 110, 570, 218, 44, 45, 330, 42, 42, 530, 530, /* 830 */ 223, 27, 468, 43, 43, 43, 43, 41, 41, 41, /* 840 */ 41, 40, 40, 39, 39, 39, 38, 486, 547, 44, - /* 850 */ 45, 330, 42, 42, 530, 530, 223, 859, 212, 43, + /* 850 */ 45, 330, 42, 42, 530, 530, 223, 860, 212, 43, /* 860 */ 43, 43, 43, 41, 41, 41, 41, 40, 40, 39, /* 870 */ 39, 39, 38, 44, 47, 330, 42, 42, 530, 530, /* 880 */ 223, 535, 284, 43, 43, 43, 43, 41, 41, 41, @@ -339,7 +339,7 @@ static const YYACTIONTYPE yy_action[] = { /* 970 */ 520, 569, 395, 547, 569, 569, 23, 328, 213, 254, /* 980 */ 358, 275, 547, 75, 182, 32, 33, 310, 35, 569, /* 990 */ 361, 66, 164, 34, 160, 396, 398, 317, 397, 293, - /* 1000 */ 570, 7, 862, 516, 32, 33, 523, 570, 538, 336, + /* 1000 */ 570, 7, 863, 516, 32, 33, 523, 570, 538, 336, /* 1010 */ 335, 522, 34, 549, 548, 550, 25, 4, 289, 338, /* 1020 */ 7, 471, 395, 547, 12, 523, 568, 567, 336, 335, /* 1030 */ 302, 523, 549, 548, 550, 75, 570, 404, 338, 276, @@ -356,7 +356,7 @@ static const YYACTIONTYPE yy_action[] = { /* 1140 */ 312, 391, 202, 523, 296, 523, 568, 567, 531, 198, /* 1150 */ 13, 523, 569, 413, 345, 328, 568, 567, 532, 569, /* 1160 */ 474, 570, 307, 570, 523, 495, 35, 531, 53, 13, - /* 1170 */ 523, 496, 860, 456, 473, 568, 567, 570, 413, 532, + /* 1170 */ 523, 496, 861, 456, 473, 568, 567, 570, 413, 532, /* 1180 */ 570, 485, 32, 33, 407, 439, 10, 568, 567, 500, /* 1190 */ 34, 489, 730, 570, 568, 567, 431, 403, 7, 52, /* 1200 */ 568, 567, 570, 523, 582, 234, 336, 335, 338, 407, @@ -367,7 +367,7 @@ static const YYACTIONTYPE yy_action[] = { /* 1250 */ 99, 35, 531, 124, 13, 523, 492, 368, 497, 148, /* 1260 */ 568, 567, 570, 568, 567, 82, 376, 32, 33, 350, /* 1270 */ 2, 570, 568, 567, 570, 34, 568, 567, 570, 73, - /* 1280 */ 179, 259, 570, 7, 862, 568, 567, 417, 523, 338, + /* 1280 */ 179, 259, 570, 7, 863, 568, 567, 417, 523, 338, /* 1290 */ 569, 336, 335, 22, 491, 549, 548, 550, 416, 69, /* 1300 */ 568, 567, 371, 522, 568, 567, 570, 415, 405, 568, /* 1310 */ 567, 261, 21, 523, 568, 567, 568, 567, 196, 368, @@ -411,8 +411,8 @@ static const YYACTIONTYPE yy_action[] = { /* 1690 */ 283, 402, 382, 117, 89, 87, 86, 116, 175, 280, /* 1700 */ 347, 349, 173, 233, 113, 126, 230, 509, 541, 470, /* 1710 */ 506, 537, 458, 282, 154, 410, 273, 190, 348, 438, - /* 1720 */ 467, 462, 329, 461, 578, 231, 62, 938, 37, 412, - /* 1730 */ 165, 433, 938, 938, 938, 327, 299, + /* 1720 */ 467, 462, 329, 461, 578, 231, 62, 939, 37, 412, + /* 1730 */ 165, 433, 939, 939, 939, 327, 299, }; static const YYCODETYPE yy_lookahead[] = { /* 0 */ 4, 8, 195, 10, 80, 25, 5, 14, 156, 202, @@ -664,61 +664,61 @@ static const short yy_reduce_ofst[] = { /* 250 */ 1242, }; static const YYACTIONTYPE yy_default[] = { - /* 0 */ 589, 936, 936, 862, 903, 851, 851, 851, 936, 936, - /* 10 */ 730, 936, 851, 851, 851, 936, 851, 851, 851, 851, - /* 20 */ 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, - /* 30 */ 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, - /* 40 */ 851, 851, 851, 851, 851, 851, 851, 841, 724, 608, - /* 50 */ 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, - /* 60 */ 616, 720, 730, 936, 936, 936, 936, 790, 777, 768, - /* 70 */ 936, 800, 800, 783, 679, 936, 800, 756, 752, 936, - /* 80 */ 839, 936, 936, 731, 936, 839, 936, 936, 936, 936, - /* 90 */ 936, 791, 784, 778, 769, 936, 936, 936, 936, 936, - /* 100 */ 936, 936, 936, 936, 720, 720, 936, 720, 936, 936, - /* 110 */ 936, 840, 594, 936, 882, 936, 936, 936, 936, 936, - /* 120 */ 936, 605, 589, 936, 936, 936, 710, 736, 773, 761, - /* 130 */ 863, 856, 857, 855, 852, 852, 852, 852, 852, 852, - /* 140 */ 852, 852, 852, 852, 823, 816, 827, 815, 831, 826, - /* 150 */ 818, 817, 819, 936, 936, 936, 936, 723, 936, 936, - /* 160 */ 936, 820, 936, 789, 698, 936, 910, 693, 601, 618, - /* 170 */ 936, 936, 936, 936, 936, 936, 936, 772, 670, 756, - /* 180 */ 645, 738, 756, 858, 936, 936, 721, 708, 756, 934, - /* 190 */ 931, 934, 739, 683, 739, 739, 739, 681, 739, 683, - /* 200 */ 796, 739, 739, 683, 772, 739, 918, 915, 739, 739, - /* 210 */ 871, 681, 681, 681, 681, 662, 936, 871, 681, 739, - /* 220 */ 936, 739, 936, 852, 821, 752, 762, 748, 760, 757, - /* 230 */ 772, 936, 681, 681, 662, 681, 681, 665, 593, 593, + /* 0 */ 589, 937, 937, 863, 904, 852, 852, 852, 937, 937, + /* 10 */ 730, 937, 852, 852, 852, 937, 852, 852, 852, 852, + /* 20 */ 852, 852, 852, 852, 852, 852, 852, 852, 852, 852, + /* 30 */ 852, 852, 852, 852, 852, 852, 852, 852, 852, 852, + /* 40 */ 852, 852, 852, 852, 852, 852, 852, 841, 724, 608, + /* 50 */ 937, 937, 937, 937, 937, 937, 937, 937, 937, 937, + /* 60 */ 616, 720, 730, 937, 937, 937, 937, 790, 777, 768, + /* 70 */ 937, 800, 800, 783, 679, 937, 800, 756, 752, 937, + /* 80 */ 839, 937, 937, 731, 937, 839, 937, 937, 937, 937, + /* 90 */ 937, 791, 784, 778, 769, 937, 937, 937, 937, 937, + /* 100 */ 937, 937, 937, 937, 720, 720, 937, 720, 937, 937, + /* 110 */ 937, 840, 594, 937, 883, 937, 937, 937, 937, 937, + /* 120 */ 937, 605, 589, 937, 937, 937, 710, 736, 773, 761, + /* 130 */ 864, 857, 858, 856, 853, 853, 853, 853, 853, 844, + /* 140 */ 853, 853, 853, 853, 823, 816, 827, 815, 831, 826, + /* 150 */ 818, 817, 819, 937, 937, 937, 937, 723, 937, 937, + /* 160 */ 937, 820, 937, 789, 698, 937, 911, 693, 601, 618, + /* 170 */ 937, 937, 937, 937, 937, 937, 937, 772, 670, 756, + /* 180 */ 645, 738, 756, 859, 937, 937, 721, 708, 756, 935, + /* 190 */ 932, 935, 739, 683, 739, 739, 739, 681, 739, 683, + /* 200 */ 796, 739, 739, 683, 772, 739, 919, 916, 739, 739, + /* 210 */ 872, 681, 681, 681, 681, 662, 937, 872, 681, 739, + /* 220 */ 937, 739, 937, 853, 821, 752, 762, 748, 760, 757, + /* 230 */ 772, 937, 681, 681, 662, 681, 681, 665, 593, 593, /* 240 */ 593, 681, 593, 649, 649, 726, 830, 829, 828, 822, - /* 250 */ 629, 864, 936, 936, 936, 936, 936, 936, 936, 936, - /* 260 */ 936, 936, 936, 936, 936, 936, 936, 936, 936, 763, - /* 270 */ 936, 936, 936, 936, 936, 936, 936, 936, 936, 881, - /* 280 */ 936, 936, 936, 936, 936, 936, 914, 913, 936, 936, - /* 290 */ 936, 936, 936, 936, 936, 936, 936, 936, 902, 936, - /* 300 */ 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, - /* 310 */ 936, 936, 936, 936, 936, 936, 936, 936, 758, 936, - /* 320 */ 861, 843, 701, 850, 936, 936, 936, 936, 936, 842, - /* 330 */ 853, 810, 936, 749, 936, 809, 806, 808, 611, 936, - /* 340 */ 936, 936, 936, 936, 586, 590, 935, 933, 932, 930, - /* 350 */ 890, 889, 888, 886, 895, 894, 893, 892, 891, 887, - /* 360 */ 885, 884, 883, 880, 787, 775, 766, 697, 929, 927, - /* 370 */ 928, 879, 877, 878, 696, 695, 692, 691, 690, 869, - /* 380 */ 868, 866, 865, 867, 604, 906, 909, 908, 907, 912, - /* 390 */ 911, 904, 917, 916, 921, 925, 924, 923, 922, 920, - /* 400 */ 901, 795, 794, 792, 797, 788, 793, 780, 786, 785, - /* 410 */ 776, 779, 684, 771, 767, 770, 905, 694, 603, 741, + /* 250 */ 629, 865, 937, 937, 937, 937, 937, 937, 937, 937, + /* 260 */ 937, 937, 937, 937, 937, 937, 937, 937, 937, 763, + /* 270 */ 937, 937, 937, 937, 937, 937, 937, 937, 937, 882, + /* 280 */ 937, 937, 937, 937, 937, 937, 915, 914, 937, 937, + /* 290 */ 937, 937, 937, 937, 937, 937, 937, 937, 903, 937, + /* 300 */ 937, 937, 937, 937, 937, 937, 937, 937, 937, 937, + /* 310 */ 937, 937, 937, 937, 937, 937, 937, 937, 758, 937, + /* 320 */ 862, 843, 701, 851, 937, 937, 937, 937, 937, 842, + /* 330 */ 854, 810, 937, 749, 937, 809, 806, 808, 611, 937, + /* 340 */ 937, 937, 937, 937, 586, 590, 936, 934, 933, 931, + /* 350 */ 891, 890, 889, 887, 896, 895, 894, 893, 892, 888, + /* 360 */ 886, 885, 884, 881, 787, 775, 766, 697, 930, 928, + /* 370 */ 929, 880, 878, 879, 696, 695, 692, 691, 690, 870, + /* 380 */ 869, 867, 866, 868, 604, 907, 910, 909, 908, 913, + /* 390 */ 912, 905, 918, 917, 922, 926, 925, 924, 923, 921, + /* 400 */ 902, 795, 794, 792, 797, 788, 793, 780, 786, 785, + /* 410 */ 776, 779, 684, 771, 767, 770, 906, 694, 603, 741, /* 420 */ 602, 607, 668, 669, 677, 680, 675, 678, 674, 673, /* 430 */ 672, 676, 671, 667, 610, 609, 623, 621, 622, 620, /* 440 */ 619, 617, 639, 638, 635, 637, 634, 636, 633, 632, - /* 450 */ 631, 630, 628, 661, 647, 646, 874, 876, 875, 873, - /* 460 */ 872, 654, 653, 659, 658, 657, 656, 652, 655, 651, + /* 450 */ 631, 630, 628, 661, 647, 646, 875, 877, 876, 874, + /* 460 */ 873, 654, 653, 659, 658, 657, 656, 652, 655, 651, /* 470 */ 650, 648, 644, 814, 813, 807, 835, 707, 706, 715, /* 480 */ 713, 712, 711, 747, 746, 745, 744, 743, 742, 735, /* 490 */ 733, 729, 728, 734, 732, 727, 719, 717, 718, 716, /* 500 */ 612, 802, 799, 801, 798, 737, 725, 722, 709, 751, - /* 510 */ 753, 854, 844, 834, 845, 740, 832, 833, 704, 703, - /* 520 */ 702, 853, 850, 846, 926, 838, 849, 837, 836, 825, - /* 530 */ 824, 812, 847, 848, 811, 750, 765, 898, 897, 900, - /* 540 */ 899, 896, 764, 625, 624, 705, 700, 699, 805, 804, + /* 510 */ 753, 855, 845, 834, 846, 740, 832, 833, 704, 703, + /* 520 */ 702, 854, 851, 847, 927, 838, 850, 837, 836, 825, + /* 530 */ 824, 812, 848, 849, 811, 750, 765, 899, 898, 901, + /* 540 */ 900, 897, 764, 625, 624, 705, 700, 699, 805, 804, /* 550 */ 803, 643, 755, 754, 642, 664, 663, 660, 641, 640, /* 560 */ 627, 626, 606, 600, 599, 598, 597, 615, 614, 613, /* 570 */ 611, 596, 595, 689, 688, 687, 686, 685, 682, 592, @@ -1258,98 +1258,99 @@ static const char *const yyRuleName[] = { /* 257 */ "exprx ::= expr not_opt BETWEEN expr AND", /* 258 */ "exprx ::= CASE case_operand case_exprlist case_else", /* 259 */ "exprx ::= expr not_opt IN LP exprlist", - /* 260 */ "exprx ::= expr not_opt IN ID_DB", - /* 261 */ "exprx ::= expr not_opt IN nm DOT ID_TAB", - /* 262 */ "exprx ::= ID_DB|ID_TAB|ID_COL|ID_FN", - /* 263 */ "exprx ::= nm DOT ID_TAB|ID_COL", - /* 264 */ "exprx ::= nm DOT nm DOT ID_COL", - /* 265 */ "exprx ::= RAISE LP raisetype COMMA ID_ERR_MSG RP", - /* 266 */ "expr ::= exprx", - /* 267 */ "expr ::=", - /* 268 */ "not_opt ::=", - /* 269 */ "not_opt ::= NOT", - /* 270 */ "likeop ::= LIKE|GLOB", - /* 271 */ "case_exprlist ::= case_exprlist WHEN expr THEN expr", - /* 272 */ "case_exprlist ::= WHEN expr THEN expr", - /* 273 */ "case_else ::= ELSE expr", - /* 274 */ "case_else ::=", - /* 275 */ "case_operand ::= exprx", - /* 276 */ "case_operand ::=", - /* 277 */ "exprlist ::= nexprlist", - /* 278 */ "exprlist ::=", - /* 279 */ "nexprlist ::= nexprlist COMMA expr", - /* 280 */ "nexprlist ::= exprx", - /* 281 */ "cmd ::= CREATE uniqueflag INDEX nm ON nm dbnm LP idxlist RP onconf", - /* 282 */ "cmd ::= CREATE uniqueflag INDEX nm dbnm ON ID_TAB", - /* 283 */ "cmd ::= CREATE uniqueflag INDEX nm DOT ID_IDX_NEW", - /* 284 */ "cmd ::= CREATE uniqueflag INDEX ID_DB|ID_IDX_NEW", - /* 285 */ "uniqueflag ::= UNIQUE", - /* 286 */ "uniqueflag ::=", - /* 287 */ "idxlist_opt ::=", - /* 288 */ "idxlist_opt ::= LP idxlist RP", - /* 289 */ "idxlist ::= idxlist COMMA idxlist_single", - /* 290 */ "idxlist ::= idxlist_single", - /* 291 */ "idxlist_single ::= nm sortorder", - /* 292 */ "idxlist_single ::= ID_COL", - /* 293 */ "cmd ::= DROP INDEX fullname", - /* 294 */ "cmd ::= DROP INDEX nm DOT ID_IDX", - /* 295 */ "cmd ::= DROP INDEX ID_DB|ID_IDX", - /* 296 */ "cmd ::= COPY orconf nm dbnm FROM nm USING DELIMITERS STRING", - /* 297 */ "cmd ::= COPY orconf nm dbnm FROM nm", - /* 298 */ "cmd ::= VACUUM", - /* 299 */ "cmd ::= VACUUM nm", - /* 300 */ "cmd ::= PRAGMA ids", - /* 301 */ "cmd ::= PRAGMA nm EQ nmnum", - /* 302 */ "cmd ::= PRAGMA nm LP nmnum RP", - /* 303 */ "cmd ::= PRAGMA nm EQ minus_num", - /* 304 */ "cmd ::= PRAGMA nm LP minus_num RP", - /* 305 */ "cmd ::= PRAGMA nm DOT ID_PRAGMA", - /* 306 */ "cmd ::= PRAGMA ID_DB|ID_PRAGMA", - /* 307 */ "nmnum ::= plus_num", - /* 308 */ "nmnum ::= nm", - /* 309 */ "nmnum ::= ON", - /* 310 */ "nmnum ::= DELETE", - /* 311 */ "nmnum ::= DEFAULT", - /* 312 */ "plus_num ::= PLUS number", - /* 313 */ "plus_num ::= number", - /* 314 */ "minus_num ::= MINUS number", - /* 315 */ "number ::= INTEGER", - /* 316 */ "number ::= FLOAT", - /* 317 */ "cmd ::= CREATE temp TRIGGER nm trigger_time trigger_event ON nm dbnm foreach_clause when_clause BEGIN trigger_cmd_list END", - /* 318 */ "cmd ::= CREATE temp TRIGGER nm trigger_time trigger_event ON nm dbnm foreach_clause when_clause", - /* 319 */ "cmd ::= CREATE temp TRIGGER nm trigger_time trigger_event ON nm dbnm foreach_clause when_clause BEGIN trigger_cmd_list", - /* 320 */ "cmd ::= CREATE temp TRIGGER nm trigger_time trigger_event ON ID_TAB|ID_DB", - /* 321 */ "cmd ::= CREATE temp TRIGGER nm trigger_time trigger_event ON nm DOT ID_TAB", - /* 322 */ "cmd ::= CREATE temp TRIGGER ID_TRIG_NEW", - /* 323 */ "trigger_time ::= BEFORE", - /* 324 */ "trigger_time ::= AFTER", - /* 325 */ "trigger_time ::= INSTEAD OF", - /* 326 */ "trigger_time ::=", - /* 327 */ "trigger_event ::= DELETE", - /* 328 */ "trigger_event ::= INSERT", - /* 329 */ "trigger_event ::= UPDATE", - /* 330 */ "trigger_event ::= UPDATE OF inscollist", - /* 331 */ "foreach_clause ::=", - /* 332 */ "foreach_clause ::= FOR EACH ROW", - /* 333 */ "foreach_clause ::= FOR EACH STATEMENT", - /* 334 */ "when_clause ::=", - /* 335 */ "when_clause ::= WHEN expr", - /* 336 */ "trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI", - /* 337 */ "trigger_cmd_list ::= trigger_cmd SEMI", - /* 338 */ "trigger_cmd ::= update_stmt", - /* 339 */ "trigger_cmd ::= insert_stmt", - /* 340 */ "trigger_cmd ::= delete_stmt", - /* 341 */ "trigger_cmd ::= select_stmt", - /* 342 */ "raisetype ::= ROLLBACK|ABORT|FAIL", - /* 343 */ "cmd ::= DROP TRIGGER fullname", - /* 344 */ "cmd ::= DROP TRIGGER nm DOT ID_TRIG", - /* 345 */ "cmd ::= DROP TRIGGER ID_DB|ID_TRIG", - /* 346 */ "cmd ::= ATTACH database_kw_opt ids AS ids key_opt", - /* 347 */ "key_opt ::=", - /* 348 */ "key_opt ::= USING ids", - /* 349 */ "database_kw_opt ::= DATABASE", - /* 350 */ "database_kw_opt ::=", - /* 351 */ "cmd ::= DETACH database_kw_opt nm", + /* 260 */ "exprx ::= LP expr", + /* 261 */ "exprx ::= expr not_opt IN ID_DB", + /* 262 */ "exprx ::= expr not_opt IN nm DOT ID_TAB", + /* 263 */ "exprx ::= ID_DB|ID_TAB|ID_COL|ID_FN", + /* 264 */ "exprx ::= nm DOT ID_TAB|ID_COL", + /* 265 */ "exprx ::= nm DOT nm DOT ID_COL", + /* 266 */ "exprx ::= RAISE LP raisetype COMMA ID_ERR_MSG RP", + /* 267 */ "expr ::= exprx", + /* 268 */ "expr ::=", + /* 269 */ "not_opt ::=", + /* 270 */ "not_opt ::= NOT", + /* 271 */ "likeop ::= LIKE|GLOB", + /* 272 */ "case_exprlist ::= case_exprlist WHEN expr THEN expr", + /* 273 */ "case_exprlist ::= WHEN expr THEN expr", + /* 274 */ "case_else ::= ELSE expr", + /* 275 */ "case_else ::=", + /* 276 */ "case_operand ::= exprx", + /* 277 */ "case_operand ::=", + /* 278 */ "exprlist ::= nexprlist", + /* 279 */ "exprlist ::=", + /* 280 */ "nexprlist ::= nexprlist COMMA expr", + /* 281 */ "nexprlist ::= exprx", + /* 282 */ "cmd ::= CREATE uniqueflag INDEX nm ON nm dbnm LP idxlist RP onconf", + /* 283 */ "cmd ::= CREATE uniqueflag INDEX nm dbnm ON ID_TAB", + /* 284 */ "cmd ::= CREATE uniqueflag INDEX nm DOT ID_IDX_NEW", + /* 285 */ "cmd ::= CREATE uniqueflag INDEX ID_DB|ID_IDX_NEW", + /* 286 */ "uniqueflag ::= UNIQUE", + /* 287 */ "uniqueflag ::=", + /* 288 */ "idxlist_opt ::=", + /* 289 */ "idxlist_opt ::= LP idxlist RP", + /* 290 */ "idxlist ::= idxlist COMMA idxlist_single", + /* 291 */ "idxlist ::= idxlist_single", + /* 292 */ "idxlist_single ::= nm sortorder", + /* 293 */ "idxlist_single ::= ID_COL", + /* 294 */ "cmd ::= DROP INDEX fullname", + /* 295 */ "cmd ::= DROP INDEX nm DOT ID_IDX", + /* 296 */ "cmd ::= DROP INDEX ID_DB|ID_IDX", + /* 297 */ "cmd ::= COPY orconf nm dbnm FROM nm USING DELIMITERS STRING", + /* 298 */ "cmd ::= COPY orconf nm dbnm FROM nm", + /* 299 */ "cmd ::= VACUUM", + /* 300 */ "cmd ::= VACUUM nm", + /* 301 */ "cmd ::= PRAGMA ids", + /* 302 */ "cmd ::= PRAGMA nm EQ nmnum", + /* 303 */ "cmd ::= PRAGMA nm LP nmnum RP", + /* 304 */ "cmd ::= PRAGMA nm EQ minus_num", + /* 305 */ "cmd ::= PRAGMA nm LP minus_num RP", + /* 306 */ "cmd ::= PRAGMA nm DOT ID_PRAGMA", + /* 307 */ "cmd ::= PRAGMA ID_DB|ID_PRAGMA", + /* 308 */ "nmnum ::= plus_num", + /* 309 */ "nmnum ::= nm", + /* 310 */ "nmnum ::= ON", + /* 311 */ "nmnum ::= DELETE", + /* 312 */ "nmnum ::= DEFAULT", + /* 313 */ "plus_num ::= PLUS number", + /* 314 */ "plus_num ::= number", + /* 315 */ "minus_num ::= MINUS number", + /* 316 */ "number ::= INTEGER", + /* 317 */ "number ::= FLOAT", + /* 318 */ "cmd ::= CREATE temp TRIGGER nm trigger_time trigger_event ON nm dbnm foreach_clause when_clause BEGIN trigger_cmd_list END", + /* 319 */ "cmd ::= CREATE temp TRIGGER nm trigger_time trigger_event ON nm dbnm foreach_clause when_clause", + /* 320 */ "cmd ::= CREATE temp TRIGGER nm trigger_time trigger_event ON nm dbnm foreach_clause when_clause BEGIN trigger_cmd_list", + /* 321 */ "cmd ::= CREATE temp TRIGGER nm trigger_time trigger_event ON ID_TAB|ID_DB", + /* 322 */ "cmd ::= CREATE temp TRIGGER nm trigger_time trigger_event ON nm DOT ID_TAB", + /* 323 */ "cmd ::= CREATE temp TRIGGER ID_TRIG_NEW", + /* 324 */ "trigger_time ::= BEFORE", + /* 325 */ "trigger_time ::= AFTER", + /* 326 */ "trigger_time ::= INSTEAD OF", + /* 327 */ "trigger_time ::=", + /* 328 */ "trigger_event ::= DELETE", + /* 329 */ "trigger_event ::= INSERT", + /* 330 */ "trigger_event ::= UPDATE", + /* 331 */ "trigger_event ::= UPDATE OF inscollist", + /* 332 */ "foreach_clause ::=", + /* 333 */ "foreach_clause ::= FOR EACH ROW", + /* 334 */ "foreach_clause ::= FOR EACH STATEMENT", + /* 335 */ "when_clause ::=", + /* 336 */ "when_clause ::= WHEN expr", + /* 337 */ "trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI", + /* 338 */ "trigger_cmd_list ::= trigger_cmd SEMI", + /* 339 */ "trigger_cmd ::= update_stmt", + /* 340 */ "trigger_cmd ::= insert_stmt", + /* 341 */ "trigger_cmd ::= delete_stmt", + /* 342 */ "trigger_cmd ::= select_stmt", + /* 343 */ "raisetype ::= ROLLBACK|ABORT|FAIL", + /* 344 */ "cmd ::= DROP TRIGGER fullname", + /* 345 */ "cmd ::= DROP TRIGGER nm DOT ID_TRIG", + /* 346 */ "cmd ::= DROP TRIGGER ID_DB|ID_TRIG", + /* 347 */ "cmd ::= ATTACH database_kw_opt ids AS ids key_opt", + /* 348 */ "key_opt ::=", + /* 349 */ "key_opt ::= USING ids", + /* 350 */ "database_kw_opt ::= DATABASE", + /* 351 */ "database_kw_opt ::=", + /* 352 */ "cmd ::= DETACH database_kw_opt nm", }; #endif /* NDEBUG */ @@ -2219,6 +2220,7 @@ static const struct { { 221, 5 }, { 221, 4 }, { 221, 5 }, + { 221, 2 }, { 221, 4 }, { 221, 6 }, { 221, 1 }, @@ -2394,10 +2396,10 @@ static void yy_reduce( {yygotominor.yy91 = new ParserStubExplain(true, false);} break; case 7: /* cmdx ::= cmd */ - case 338: /* trigger_cmd ::= update_stmt */ yytestcase(yyruleno==338); - case 339: /* trigger_cmd ::= insert_stmt */ yytestcase(yyruleno==339); - case 340: /* trigger_cmd ::= delete_stmt */ yytestcase(yyruleno==340); - case 341: /* trigger_cmd ::= select_stmt */ yytestcase(yyruleno==341); + case 339: /* trigger_cmd ::= update_stmt */ yytestcase(yyruleno==339); + case 340: /* trigger_cmd ::= insert_stmt */ yytestcase(yyruleno==340); + case 341: /* trigger_cmd ::= delete_stmt */ yytestcase(yyruleno==341); + case 342: /* trigger_cmd ::= select_stmt */ yytestcase(yyruleno==342); {yygotominor.yy203 = yymsp[0].minor.yy203;} break; case 8: /* cmd ::= BEGIN trans_opt onconf */ @@ -2500,7 +2502,7 @@ static void yy_reduce( break; case 19: /* cmd ::= CREATE temp TABLE ID_DB|ID_TAB_NEW */ case 110: /* cmd ::= CREATE temp VIEW ID_VIEW_NEW */ yytestcase(yyruleno==110); - case 322: /* cmd ::= CREATE temp TRIGGER ID_TRIG_NEW */ yytestcase(yyruleno==322); + case 323: /* cmd ::= CREATE temp TRIGGER ID_TRIG_NEW */ yytestcase(yyruleno==323); { yy_destructor(yypParser,157,&yymsp[-2].minor); } break; @@ -2597,9 +2599,9 @@ static void yy_reduce( break; case 40: /* signed ::= plus_num */ case 41: /* signed ::= minus_num */ yytestcase(yyruleno==41); - case 307: /* nmnum ::= plus_num */ yytestcase(yyruleno==307); - case 312: /* plus_num ::= PLUS number */ yytestcase(yyruleno==312); - case 313: /* plus_num ::= number */ yytestcase(yyruleno==313); + case 308: /* nmnum ::= plus_num */ yytestcase(yyruleno==308); + case 313: /* plus_num ::= PLUS number */ yytestcase(yyruleno==313); + case 314: /* plus_num ::= number */ yytestcase(yyruleno==314); {yygotominor.yy69 = yymsp[0].minor.yy69;} break; case 42: /* carglist ::= carglist ccons */ @@ -2847,15 +2849,15 @@ static void yy_reduce( } break; case 85: /* tconscomma ::= COMMA */ - case 269: /* not_opt ::= NOT */ yytestcase(yyruleno==269); - case 285: /* uniqueflag ::= UNIQUE */ yytestcase(yyruleno==285); - case 349: /* database_kw_opt ::= DATABASE */ yytestcase(yyruleno==349); + case 270: /* not_opt ::= NOT */ yytestcase(yyruleno==270); + case 286: /* uniqueflag ::= UNIQUE */ yytestcase(yyruleno==286); + case 350: /* database_kw_opt ::= DATABASE */ yytestcase(yyruleno==350); {yygotominor.yy291 = new bool(true);} break; case 86: /* tconscomma ::= */ - case 268: /* not_opt ::= */ yytestcase(yyruleno==268); - case 286: /* uniqueflag ::= */ yytestcase(yyruleno==286); - case 350: /* database_kw_opt ::= */ yytestcase(yyruleno==350); + case 269: /* not_opt ::= */ yytestcase(yyruleno==269); + case 287: /* uniqueflag ::= */ yytestcase(yyruleno==287); + case 351: /* database_kw_opt ::= */ yytestcase(yyruleno==351); {yygotominor.yy291 = new bool(false);} break; case 87: /* tcons ::= CONSTRAINT nm */ @@ -2959,15 +2961,15 @@ static void yy_reduce( case 187: /* delete_stmt ::= DELETE FROM ID_DB|ID_TAB */ yytestcase(yyruleno==187); case 195: /* update_stmt ::= UPDATE orconf nm DOT ID_TAB */ yytestcase(yyruleno==195); case 196: /* update_stmt ::= UPDATE orconf ID_DB|ID_TAB */ yytestcase(yyruleno==196); - case 263: /* exprx ::= nm DOT ID_TAB|ID_COL */ yytestcase(yyruleno==263); - case 283: /* cmd ::= CREATE uniqueflag INDEX nm DOT ID_IDX_NEW */ yytestcase(yyruleno==283); - case 284: /* cmd ::= CREATE uniqueflag INDEX ID_DB|ID_IDX_NEW */ yytestcase(yyruleno==284); - case 294: /* cmd ::= DROP INDEX nm DOT ID_IDX */ yytestcase(yyruleno==294); - case 295: /* cmd ::= DROP INDEX ID_DB|ID_IDX */ yytestcase(yyruleno==295); - case 305: /* cmd ::= PRAGMA nm DOT ID_PRAGMA */ yytestcase(yyruleno==305); - case 306: /* cmd ::= PRAGMA ID_DB|ID_PRAGMA */ yytestcase(yyruleno==306); - case 344: /* cmd ::= DROP TRIGGER nm DOT ID_TRIG */ yytestcase(yyruleno==344); - case 345: /* cmd ::= DROP TRIGGER ID_DB|ID_TRIG */ yytestcase(yyruleno==345); + case 264: /* exprx ::= nm DOT ID_TAB|ID_COL */ yytestcase(yyruleno==264); + case 284: /* cmd ::= CREATE uniqueflag INDEX nm DOT ID_IDX_NEW */ yytestcase(yyruleno==284); + case 285: /* cmd ::= CREATE uniqueflag INDEX ID_DB|ID_IDX_NEW */ yytestcase(yyruleno==285); + case 295: /* cmd ::= DROP INDEX nm DOT ID_IDX */ yytestcase(yyruleno==295); + case 296: /* cmd ::= DROP INDEX ID_DB|ID_IDX */ yytestcase(yyruleno==296); + case 306: /* cmd ::= PRAGMA nm DOT ID_PRAGMA */ yytestcase(yyruleno==306); + case 307: /* cmd ::= PRAGMA ID_DB|ID_PRAGMA */ yytestcase(yyruleno==307); + case 345: /* cmd ::= DROP TRIGGER nm DOT ID_TRIG */ yytestcase(yyruleno==345); + case 346: /* cmd ::= DROP TRIGGER ID_DB|ID_TRIG */ yytestcase(yyruleno==346); { yy_destructor(yypParser,156,&yymsp[-2].minor); } break; @@ -3339,11 +3341,11 @@ static void yy_reduce( {yygotominor.yy389 = new SqliteSortOrder(SqliteSortOrder::null);} break; case 173: /* groupby_opt ::= */ - case 278: /* exprlist ::= */ yytestcase(yyruleno==278); + case 279: /* exprlist ::= */ yytestcase(yyruleno==279); {yygotominor.yy231 = new ParserExprList();} break; case 174: /* groupby_opt ::= GROUP BY nexprlist */ - case 277: /* exprlist ::= nexprlist */ yytestcase(yyruleno==277); + case 278: /* exprlist ::= nexprlist */ yytestcase(yyruleno==278); {yygotominor.yy231 = yymsp[0].minor.yy231;} break; case 175: /* groupby_opt ::= GROUP BY */ @@ -3354,18 +3356,18 @@ static void yy_reduce( break; case 176: /* having_opt ::= */ case 188: /* where_opt ::= */ yytestcase(yyruleno==188); - case 274: /* case_else ::= */ yytestcase(yyruleno==274); - case 276: /* case_operand ::= */ yytestcase(yyruleno==276); - case 334: /* when_clause ::= */ yytestcase(yyruleno==334); - case 347: /* key_opt ::= */ yytestcase(yyruleno==347); + case 275: /* case_else ::= */ yytestcase(yyruleno==275); + case 277: /* case_operand ::= */ yytestcase(yyruleno==277); + case 335: /* when_clause ::= */ yytestcase(yyruleno==335); + case 348: /* key_opt ::= */ yytestcase(yyruleno==348); {yygotominor.yy192 = nullptr;} break; case 177: /* having_opt ::= HAVING expr */ case 189: /* where_opt ::= WHERE expr */ yytestcase(yyruleno==189); - case 266: /* expr ::= exprx */ yytestcase(yyruleno==266); - case 273: /* case_else ::= ELSE expr */ yytestcase(yyruleno==273); - case 275: /* case_operand ::= exprx */ yytestcase(yyruleno==275); - case 335: /* when_clause ::= WHEN expr */ yytestcase(yyruleno==335); + case 267: /* expr ::= exprx */ yytestcase(yyruleno==267); + case 274: /* case_else ::= ELSE expr */ yytestcase(yyruleno==274); + case 276: /* case_operand ::= exprx */ yytestcase(yyruleno==276); + case 336: /* when_clause ::= WHEN expr */ yytestcase(yyruleno==336); {yygotominor.yy192 = yymsp[0].minor.yy192;} break; case 178: /* limit_opt ::= */ @@ -3917,60 +3919,68 @@ static void yy_reduce( parserContext->minorErrorBeforeNextToken("Syntax error"); } break; - case 260: /* exprx ::= expr not_opt IN ID_DB */ + case 260: /* exprx ::= LP expr */ +{ + yygotominor.yy192 = new SqliteExpr(); + yygotominor.yy192->initSubExpr(yymsp[0].minor.yy192); + objectForTokens = yygotominor.yy192; + parserContext->minorErrorBeforeNextToken("Syntax error"); + } + break; + case 261: /* exprx ::= expr not_opt IN ID_DB */ { yy_destructor(yypParser,177,&yymsp[-3].minor); } break; - case 261: /* exprx ::= expr not_opt IN nm DOT ID_TAB */ - case 262: /* exprx ::= ID_DB|ID_TAB|ID_COL|ID_FN */ yytestcase(yyruleno==262); + case 262: /* exprx ::= expr not_opt IN nm DOT ID_TAB */ + case 263: /* exprx ::= ID_DB|ID_TAB|ID_COL|ID_FN */ yytestcase(yyruleno==263); { yy_destructor(yypParser,177,&yymsp[-5].minor); yy_destructor(yypParser,156,&yymsp[-2].minor); } break; - case 264: /* exprx ::= nm DOT nm DOT ID_COL */ - case 265: /* exprx ::= RAISE LP raisetype COMMA ID_ERR_MSG RP */ yytestcase(yyruleno==265); + case 265: /* exprx ::= nm DOT nm DOT ID_COL */ + case 266: /* exprx ::= RAISE LP raisetype COMMA ID_ERR_MSG RP */ yytestcase(yyruleno==266); { yy_destructor(yypParser,156,&yymsp[-4].minor); yy_destructor(yypParser,156,&yymsp[-2].minor); } break; - case 267: /* expr ::= */ + case 268: /* expr ::= */ { yygotominor.yy192 = new SqliteExpr(); objectForTokens = yygotominor.yy192; parserContext->minorErrorAfterLastToken("Syntax error"); } break; - case 270: /* likeop ::= LIKE|GLOB */ + case 271: /* likeop ::= LIKE|GLOB */ {yygotominor.yy41 = new SqliteExpr::LikeOp(SqliteExpr::likeOp(yymsp[0].minor.yy0->value));} break; - case 271: /* case_exprlist ::= case_exprlist WHEN expr THEN expr */ + case 272: /* case_exprlist ::= case_exprlist WHEN expr THEN expr */ { yymsp[-4].minor.yy231->append(yymsp[-2].minor.yy192); yymsp[-4].minor.yy231->append(yymsp[0].minor.yy192); yygotominor.yy231 = yymsp[-4].minor.yy231; } break; - case 272: /* case_exprlist ::= WHEN expr THEN expr */ + case 273: /* case_exprlist ::= WHEN expr THEN expr */ { yygotominor.yy231 = new ParserExprList(); yygotominor.yy231->append(yymsp[-2].minor.yy192); yygotominor.yy231->append(yymsp[0].minor.yy192); } break; - case 279: /* nexprlist ::= nexprlist COMMA expr */ + case 280: /* nexprlist ::= nexprlist COMMA expr */ { yymsp[-2].minor.yy231->append(yymsp[0].minor.yy192); yygotominor.yy231 = yymsp[-2].minor.yy231; DONT_INHERIT_TOKENS("nexprlist"); } break; - case 280: /* nexprlist ::= exprx */ + case 281: /* nexprlist ::= exprx */ { yygotominor.yy231 = new ParserExprList(); yygotominor.yy231->append(yymsp[0].minor.yy192); } break; - case 281: /* cmd ::= CREATE uniqueflag INDEX nm ON nm dbnm LP idxlist RP onconf */ + case 282: /* cmd ::= CREATE uniqueflag INDEX nm ON nm dbnm LP idxlist RP onconf */ { yygotominor.yy203 = new SqliteCreateIndex( *(yymsp[-9].minor.yy291), @@ -3990,31 +4000,31 @@ static void yy_reduce( objectForTokens = yygotominor.yy203; } break; - case 282: /* cmd ::= CREATE uniqueflag INDEX nm dbnm ON ID_TAB */ + case 283: /* cmd ::= CREATE uniqueflag INDEX nm dbnm ON ID_TAB */ { yy_destructor(yypParser,156,&yymsp[-3].minor); } break; - case 287: /* idxlist_opt ::= */ + case 288: /* idxlist_opt ::= */ {yygotominor.yy63 = new ParserIndexedColumnList();} break; - case 288: /* idxlist_opt ::= LP idxlist RP */ + case 289: /* idxlist_opt ::= LP idxlist RP */ {yygotominor.yy63 = yymsp[-1].minor.yy63;} break; - case 289: /* idxlist ::= idxlist COMMA idxlist_single */ + case 290: /* idxlist ::= idxlist COMMA idxlist_single */ { yymsp[-2].minor.yy63->append(yymsp[0].minor.yy428); yygotominor.yy63 = yymsp[-2].minor.yy63; DONT_INHERIT_TOKENS("idxlist"); } break; - case 290: /* idxlist ::= idxlist_single */ + case 291: /* idxlist ::= idxlist_single */ { yygotominor.yy63 = new ParserIndexedColumnList(); yygotominor.yy63->append(yymsp[0].minor.yy428); } break; - case 291: /* idxlist_single ::= nm sortorder */ - case 292: /* idxlist_single ::= ID_COL */ yytestcase(yyruleno==292); + case 292: /* idxlist_single ::= nm sortorder */ + case 293: /* idxlist_single ::= ID_COL */ yytestcase(yyruleno==293); { SqliteIndexedColumn* obj = new SqliteIndexedColumn( @@ -4028,14 +4038,14 @@ static void yy_reduce( objectForTokens = yygotominor.yy428; } break; - case 293: /* cmd ::= DROP INDEX fullname */ + case 294: /* cmd ::= DROP INDEX fullname */ { yygotominor.yy203 = new SqliteDropIndex(false, yymsp[0].minor.yy120->name1, yymsp[0].minor.yy120->name2); delete yymsp[0].minor.yy120; objectForTokens = yygotominor.yy203; } break; - case 296: /* cmd ::= COPY orconf nm dbnm FROM nm USING DELIMITERS STRING */ + case 297: /* cmd ::= COPY orconf nm dbnm FROM nm USING DELIMITERS STRING */ { yygotominor.yy203 = new SqliteCopy( *(yymsp[-7].minor.yy418), @@ -4051,7 +4061,7 @@ static void yy_reduce( objectForTokens = yygotominor.yy203; } break; - case 297: /* cmd ::= COPY orconf nm dbnm FROM nm */ + case 298: /* cmd ::= COPY orconf nm dbnm FROM nm */ { yygotominor.yy203 = new SqliteCopy( *(yymsp[-4].minor.yy418), @@ -4066,28 +4076,28 @@ static void yy_reduce( objectForTokens = yygotominor.yy203; } break; - case 298: /* cmd ::= VACUUM */ + case 299: /* cmd ::= VACUUM */ { yygotominor.yy203 = new SqliteVacuum(); objectForTokens = yygotominor.yy203; } break; - case 299: /* cmd ::= VACUUM nm */ + case 300: /* cmd ::= VACUUM nm */ { yygotominor.yy203 = new SqliteVacuum(*(yymsp[0].minor.yy319)); delete yymsp[0].minor.yy319; objectForTokens = yygotominor.yy203; } break; - case 300: /* cmd ::= PRAGMA ids */ + case 301: /* cmd ::= PRAGMA ids */ { yygotominor.yy203 = new SqlitePragma(*(yymsp[0].minor.yy319), QString::null); delete yymsp[0].minor.yy319; objectForTokens = yygotominor.yy203; } break; - case 301: /* cmd ::= PRAGMA nm EQ nmnum */ - case 303: /* cmd ::= PRAGMA nm EQ minus_num */ yytestcase(yyruleno==303); + case 302: /* cmd ::= PRAGMA nm EQ nmnum */ + case 304: /* cmd ::= PRAGMA nm EQ minus_num */ yytestcase(yyruleno==304); { yygotominor.yy203 = new SqlitePragma(*(yymsp[-2].minor.yy319), QString::null, *(yymsp[0].minor.yy69), true); delete yymsp[-2].minor.yy319; @@ -4095,8 +4105,8 @@ static void yy_reduce( objectForTokens = yygotominor.yy203; } break; - case 302: /* cmd ::= PRAGMA nm LP nmnum RP */ - case 304: /* cmd ::= PRAGMA nm LP minus_num RP */ yytestcase(yyruleno==304); + case 303: /* cmd ::= PRAGMA nm LP nmnum RP */ + case 305: /* cmd ::= PRAGMA nm LP minus_num RP */ yytestcase(yyruleno==305); { yygotominor.yy203 = new SqlitePragma(*(yymsp[-3].minor.yy319), QString::null, *(yymsp[-1].minor.yy69), false); delete yymsp[-3].minor.yy319; @@ -4104,18 +4114,18 @@ static void yy_reduce( objectForTokens = yygotominor.yy203; } break; - case 308: /* nmnum ::= nm */ + case 309: /* nmnum ::= nm */ { yygotominor.yy69 = new QVariant(*(yymsp[0].minor.yy319)); delete yymsp[0].minor.yy319; } break; - case 309: /* nmnum ::= ON */ - case 310: /* nmnum ::= DELETE */ yytestcase(yyruleno==310); - case 311: /* nmnum ::= DEFAULT */ yytestcase(yyruleno==311); + case 310: /* nmnum ::= ON */ + case 311: /* nmnum ::= DELETE */ yytestcase(yyruleno==311); + case 312: /* nmnum ::= DEFAULT */ yytestcase(yyruleno==312); {yygotominor.yy69 = new QVariant(yymsp[0].minor.yy0->value);} break; - case 314: /* minus_num ::= MINUS number */ + case 315: /* minus_num ::= MINUS number */ { if (yymsp[0].minor.yy69->type() == QVariant::Double) *(yymsp[0].minor.yy69) = -(yymsp[0].minor.yy69->toDouble()); @@ -4127,13 +4137,13 @@ static void yy_reduce( yygotominor.yy69 = yymsp[0].minor.yy69; } break; - case 315: /* number ::= INTEGER */ + case 316: /* number ::= INTEGER */ {yygotominor.yy69 = new QVariant(QVariant(yymsp[0].minor.yy0->value).toLongLong());} break; - case 316: /* number ::= FLOAT */ + case 317: /* number ::= FLOAT */ {yygotominor.yy69 = new QVariant(QVariant(yymsp[0].minor.yy0->value).toDouble());} break; - case 317: /* cmd ::= CREATE temp TRIGGER nm trigger_time trigger_event ON nm dbnm foreach_clause when_clause BEGIN trigger_cmd_list END */ + case 318: /* cmd ::= CREATE temp TRIGGER nm trigger_time trigger_event ON nm dbnm foreach_clause when_clause BEGIN trigger_cmd_list END */ { yygotominor.yy203 = new SqliteCreateTrigger( *(yymsp[-12].minor.yy226), @@ -4158,7 +4168,7 @@ static void yy_reduce( objectForTokens = yygotominor.yy203; } break; - case 318: /* cmd ::= CREATE temp TRIGGER nm trigger_time trigger_event ON nm dbnm foreach_clause when_clause */ + case 319: /* cmd ::= CREATE temp TRIGGER nm trigger_time trigger_event ON nm dbnm foreach_clause when_clause */ { QList CL; @@ -4185,7 +4195,7 @@ static void yy_reduce( parserContext->minorErrorAfterLastToken("Syntax error"); } break; - case 319: /* cmd ::= CREATE temp TRIGGER nm trigger_time trigger_event ON nm dbnm foreach_clause when_clause BEGIN trigger_cmd_list */ + case 320: /* cmd ::= CREATE temp TRIGGER nm trigger_time trigger_event ON nm dbnm foreach_clause when_clause BEGIN trigger_cmd_list */ { yygotominor.yy203 = new SqliteCreateTrigger( *(yymsp[-11].minor.yy226), @@ -4211,14 +4221,14 @@ static void yy_reduce( parserContext->minorErrorAfterLastToken("Syntax error"); } break; - case 320: /* cmd ::= CREATE temp TRIGGER nm trigger_time trigger_event ON ID_TAB|ID_DB */ + case 321: /* cmd ::= CREATE temp TRIGGER nm trigger_time trigger_event ON ID_TAB|ID_DB */ { yy_destructor(yypParser,157,&yymsp[-6].minor); yy_destructor(yypParser,156,&yymsp[-4].minor); yy_destructor(yypParser,232,&yymsp[-3].minor); yy_destructor(yypParser,233,&yymsp[-2].minor); } break; - case 321: /* cmd ::= CREATE temp TRIGGER nm trigger_time trigger_event ON nm DOT ID_TAB */ + case 322: /* cmd ::= CREATE temp TRIGGER nm trigger_time trigger_event ON nm DOT ID_TAB */ { yy_destructor(yypParser,157,&yymsp[-8].minor); yy_destructor(yypParser,156,&yymsp[-6].minor); yy_destructor(yypParser,232,&yymsp[-5].minor); @@ -4226,76 +4236,76 @@ static void yy_reduce( yy_destructor(yypParser,156,&yymsp[-2].minor); } break; - case 323: /* trigger_time ::= BEFORE */ + case 324: /* trigger_time ::= BEFORE */ {yygotominor.yy372 = new SqliteCreateTrigger::Time(SqliteCreateTrigger::Time::BEFORE);} break; - case 324: /* trigger_time ::= AFTER */ + case 325: /* trigger_time ::= AFTER */ {yygotominor.yy372 = new SqliteCreateTrigger::Time(SqliteCreateTrigger::Time::AFTER);} break; - case 325: /* trigger_time ::= INSTEAD OF */ + case 326: /* trigger_time ::= INSTEAD OF */ {yygotominor.yy372 = new SqliteCreateTrigger::Time(SqliteCreateTrigger::Time::INSTEAD_OF);} break; - case 326: /* trigger_time ::= */ + case 327: /* trigger_time ::= */ {yygotominor.yy372 = new SqliteCreateTrigger::Time(SqliteCreateTrigger::Time::null);} break; - case 327: /* trigger_event ::= DELETE */ + case 328: /* trigger_event ::= DELETE */ { yygotominor.yy151 = new SqliteCreateTrigger::Event(SqliteCreateTrigger::Event::DELETE); objectForTokens = yygotominor.yy151; } break; - case 328: /* trigger_event ::= INSERT */ + case 329: /* trigger_event ::= INSERT */ { yygotominor.yy151 = new SqliteCreateTrigger::Event(SqliteCreateTrigger::Event::INSERT); objectForTokens = yygotominor.yy151; } break; - case 329: /* trigger_event ::= UPDATE */ + case 330: /* trigger_event ::= UPDATE */ { yygotominor.yy151 = new SqliteCreateTrigger::Event(SqliteCreateTrigger::Event::UPDATE); objectForTokens = yygotominor.yy151; } break; - case 330: /* trigger_event ::= UPDATE OF inscollist */ + case 331: /* trigger_event ::= UPDATE OF inscollist */ { yygotominor.yy151 = new SqliteCreateTrigger::Event(*(yymsp[0].minor.yy207)); delete yymsp[0].minor.yy207; objectForTokens = yygotominor.yy151; } break; - case 331: /* foreach_clause ::= */ + case 332: /* foreach_clause ::= */ {yygotominor.yy83 = new SqliteCreateTrigger::Scope(SqliteCreateTrigger::Scope::null);} break; - case 332: /* foreach_clause ::= FOR EACH ROW */ + case 333: /* foreach_clause ::= FOR EACH ROW */ {yygotominor.yy83 = new SqliteCreateTrigger::Scope(SqliteCreateTrigger::Scope::FOR_EACH_ROW);} break; - case 333: /* foreach_clause ::= FOR EACH STATEMENT */ + case 334: /* foreach_clause ::= FOR EACH STATEMENT */ {yygotominor.yy83 = new SqliteCreateTrigger::Scope(SqliteCreateTrigger::Scope::FOR_EACH_STATEMENT);} break; - case 336: /* trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI */ + case 337: /* trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI */ { yymsp[-2].minor.yy270->append(yymsp[-1].minor.yy203); yygotominor.yy270 = yymsp[-2].minor.yy270; DONT_INHERIT_TOKENS("trigger_cmd_list"); } break; - case 337: /* trigger_cmd_list ::= trigger_cmd SEMI */ + case 338: /* trigger_cmd_list ::= trigger_cmd SEMI */ { yygotominor.yy270 = new ParserQueryList(); yygotominor.yy270->append(yymsp[-1].minor.yy203); } break; - case 342: /* raisetype ::= ROLLBACK|ABORT|FAIL */ + case 343: /* raisetype ::= ROLLBACK|ABORT|FAIL */ {yygotominor.yy0 = yymsp[0].minor.yy0;} break; - case 343: /* cmd ::= DROP TRIGGER fullname */ + case 344: /* cmd ::= DROP TRIGGER fullname */ { yygotominor.yy203 = new SqliteDropTrigger(false, yymsp[0].minor.yy120->name1, yymsp[0].minor.yy120->name2); delete yymsp[0].minor.yy120; objectForTokens = yygotominor.yy203; } break; - case 346: /* cmd ::= ATTACH database_kw_opt ids AS ids key_opt */ + case 347: /* cmd ::= ATTACH database_kw_opt ids AS ids key_opt */ { SqliteExpr* e1 = new SqliteExpr(); SqliteExpr* e2 = new SqliteExpr(); @@ -4308,7 +4318,7 @@ static void yy_reduce( objectForTokens = yygotominor.yy203; } break; - case 348: /* key_opt ::= USING ids */ + case 349: /* key_opt ::= USING ids */ { SqliteExpr* e = new SqliteExpr(); e->initLiteral(*(yymsp[0].minor.yy319)); @@ -4316,7 +4326,7 @@ static void yy_reduce( yygotominor.yy192 = e; } break; - case 351: /* cmd ::= DETACH database_kw_opt nm */ + case 352: /* cmd ::= DETACH database_kw_opt nm */ { SqliteExpr* e = new SqliteExpr(); e->initLiteral(*(yymsp[0].minor.yy319)); diff --git a/SQLiteStudio3/coreSQLiteStudio/parser/sqlite2_parse.y b/SQLiteStudio3/coreSQLiteStudio/parser/sqlite2_parse.y index 04da6cb..2fd9c0d 100644 --- a/SQLiteStudio3/coreSQLiteStudio/parser/sqlite2_parse.y +++ b/SQLiteStudio3/coreSQLiteStudio/parser/sqlite2_parse.y @@ -1586,6 +1586,12 @@ exprx(X) ::= expr(E) not_opt(N) IN LP objectForTokens = X; parserContext->minorErrorBeforeNextToken("Syntax error"); } +exprx(X) ::= LP expr(E). { + X = new SqliteExpr(); + X->initSubExpr(E); + objectForTokens = X; + parserContext->minorErrorBeforeNextToken("Syntax error"); + } exprx ::= expr not_opt IN ID_DB. [IN] {} exprx ::= expr not_opt IN nm DOT diff --git a/SQLiteStudio3/coreSQLiteStudio/parser/sqlite3_parse.cpp b/SQLiteStudio3/coreSQLiteStudio/parser/sqlite3_parse.cpp index 8786832..7e4f3c0 100644 --- a/SQLiteStudio3/coreSQLiteStudio/parser/sqlite3_parse.cpp +++ b/SQLiteStudio3/coreSQLiteStudio/parser/sqlite3_parse.cpp @@ -170,7 +170,7 @@ typedef union { #define sqlite3_parseARG_FETCH ParserContext* parserContext = yypParser->parserContext #define sqlite3_parseARG_STORE yypParser->parserContext = parserContext #define YYNSTATE 724 -#define YYNRULE 424 +#define YYNRULE 425 #define YYFALLBACK 1 #define YY_NO_ACTION (YYNSTATE+YYNRULE+2) #define YY_ACCEPT_ACTION (YYNSTATE+YYNRULE+1) @@ -246,22 +246,22 @@ static const YYMINORTYPE yyzerominor = { 0 }; static const YYACTIONTYPE yy_action[] = { /* 0 */ 431, 48, 48, 47, 47, 47, 46, 216, 716, 339, /* 10 */ 643, 425, 51, 51, 51, 51, 44, 49, 49, 49, - /* 20 */ 49, 48, 48, 47, 47, 47, 46, 216, 721, 1026, - /* 30 */ 1026, 643, 131, 580, 51, 51, 51, 51, 411, 49, + /* 20 */ 49, 48, 48, 47, 47, 47, 46, 216, 721, 1027, + /* 30 */ 1027, 643, 131, 580, 51, 51, 51, 51, 411, 49, /* 40 */ 49, 49, 49, 48, 48, 47, 47, 47, 46, 216, - /* 50 */ 579, 81, 58, 643, 157, 685, 301, 282, 1026, 1026, - /* 60 */ 41, 1026, 1026, 1026, 1026, 1026, 1026, 1026, 1026, 1026, - /* 70 */ 1026, 1026, 563, 1026, 1026, 1026, 1026, 38, 39, 1026, - /* 80 */ 1026, 1026, 1026, 1026, 40, 431, 528, 385, 716, 595, + /* 50 */ 579, 81, 58, 643, 157, 685, 301, 282, 1027, 1027, + /* 60 */ 41, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, + /* 70 */ 1027, 1027, 563, 1027, 1027, 1027, 1027, 38, 39, 1027, + /* 80 */ 1027, 1027, 1027, 1027, 40, 431, 528, 385, 716, 595, /* 90 */ 594, 280, 4, 377, 716, 630, 425, 642, 608, 422, /* 100 */ 12, 134, 687, 429, 562, 609, 483, 690, 331, 279, /* 110 */ 714, 713, 564, 565, 642, 689, 688, 687, 235, 506, /* 120 */ 60, 320, 610, 411, 47, 47, 47, 46, 216, 122, - /* 130 */ 243, 213, 247, 59, 1142, 1142, 486, 609, 607, 603, + /* 130 */ 243, 213, 247, 59, 1143, 1143, 486, 609, 607, 603, /* 140 */ 685, 306, 485, 584, 716, 41, 507, 509, 642, 508, /* 150 */ 676, 9, 642, 144, 95, 281, 379, 276, 378, 132, /* 160 */ 297, 716, 38, 39, 601, 200, 199, 7, 355, 40, - /* 170 */ 884, 307, 1134, 274, 249, 716, 17, 4, 884, 1134, + /* 170 */ 884, 307, 1135, 274, 249, 716, 17, 4, 884, 1135, /* 180 */ 56, 717, 642, 431, 422, 884, 329, 687, 429, 716, /* 190 */ 687, 643, 690, 687, 425, 690, 714, 713, 690, 642, /* 200 */ 689, 688, 687, 689, 688, 687, 689, 688, 687, 98, @@ -269,16 +269,16 @@ static const YYACTIONTYPE yy_action[] = { /* 220 */ 716, 411, 239, 884, 303, 582, 512, 581, 884, 884, /* 230 */ 884, 884, 884, 642, 643, 676, 9, 642, 685, 217, /* 240 */ 245, 673, 102, 41, 287, 300, 714, 713, 67, 302, - /* 250 */ 148, 307, 1133, 151, 306, 484, 81, 715, 97, 1133, + /* 250 */ 148, 307, 1134, 151, 306, 484, 81, 715, 97, 1134, /* 260 */ 38, 39, 551, 714, 713, 771, 130, 40, 946, 376, /* 270 */ 373, 372, 447, 46, 216, 4, 946, 714, 713, 334, /* 280 */ 642, 682, 422, 946, 606, 687, 429, 371, 448, 447, /* 290 */ 690, 714, 713, 304, 265, 146, 267, 642, 689, 688, /* 300 */ 687, 287, 68, 677, 691, 255, 362, 259, 359, 692, - /* 310 */ 1027, 1027, 682, 946, 715, 946, 946, 447, 698, 234, + /* 310 */ 1028, 1028, 682, 946, 715, 946, 946, 447, 698, 234, /* 320 */ 386, 715, 714, 713, 773, 651, 946, 946, 946, 946, /* 330 */ 110, 642, 317, 676, 9, 642, 222, 677, 299, 52, - /* 340 */ 53, 426, 289, 1027, 1027, 675, 675, 50, 50, 51, + /* 340 */ 53, 426, 289, 1028, 1028, 675, 675, 50, 50, 51, /* 350 */ 51, 51, 51, 716, 49, 49, 49, 49, 48, 48, /* 360 */ 47, 47, 47, 46, 216, 431, 428, 340, 716, 335, /* 370 */ 671, 670, 287, 283, 716, 138, 425, 209, 219, 430, @@ -293,27 +293,27 @@ static const YYACTIONTYPE yy_action[] = { /* 460 */ 92, 143, 642, 358, 422, 931, 674, 687, 429, 14, /* 470 */ 714, 713, 690, 131, 456, 551, 714, 713, 953, 642, /* 480 */ 689, 688, 687, 668, 667, 210, 593, 458, 384, 457, - /* 490 */ 576, 88, 1027, 1027, 13, 931, 672, 931, 931, 54, + /* 490 */ 576, 88, 1028, 1028, 13, 931, 672, 931, 931, 54, /* 500 */ 575, 678, 42, 368, 37, 401, 35, 381, 931, 1, /* 510 */ 931, 931, 641, 642, 634, 676, 9, 642, 661, 714, - /* 520 */ 713, 52, 53, 426, 289, 1027, 1027, 675, 675, 50, + /* 520 */ 713, 52, 53, 426, 289, 1028, 1028, 675, 675, 50, /* 530 */ 50, 51, 51, 51, 51, 660, 49, 49, 49, 49, /* 540 */ 48, 48, 47, 47, 47, 46, 216, 657, 648, 714, /* 550 */ 713, 496, 542, 569, 714, 713, 714, 713, 656, 691, /* 560 */ 543, 614, 320, 30, 692, 27, 716, 585, 274, 682, - /* 570 */ 160, 1027, 1027, 426, 289, 693, 613, 675, 675, 50, + /* 570 */ 160, 1028, 1028, 426, 289, 693, 613, 675, 675, 50, /* 580 */ 50, 51, 51, 51, 51, 398, 49, 49, 49, 49, - /* 590 */ 48, 48, 47, 47, 47, 46, 216, 1025, 1025, 81, - /* 600 */ 52, 53, 426, 289, 1027, 1027, 675, 675, 50, 50, + /* 590 */ 48, 48, 47, 47, 47, 46, 216, 1026, 1026, 81, + /* 600 */ 52, 53, 426, 289, 1028, 1028, 675, 675, 50, 50, /* 610 */ 51, 51, 51, 51, 496, 49, 49, 49, 49, 48, - /* 620 */ 48, 47, 47, 47, 46, 216, 1025, 1025, 1025, 1025, - /* 630 */ 1025, 1025, 1025, 1025, 1025, 1025, 1025, 1025, 1025, 1025, - /* 640 */ 716, 1025, 1025, 1025, 1025, 1025, 1025, 1025, 1025, 1025, - /* 650 */ 1025, 1025, 1027, 1027, 357, 49, 49, 49, 49, 48, + /* 620 */ 48, 47, 47, 47, 46, 216, 1026, 1026, 1026, 1026, + /* 630 */ 1026, 1026, 1026, 1026, 1026, 1026, 1026, 1026, 1026, 1026, + /* 640 */ 716, 1026, 1026, 1026, 1026, 1026, 1026, 1026, 1026, 1026, + /* 650 */ 1026, 1026, 1028, 1028, 357, 49, 49, 49, 49, 48, /* 660 */ 48, 47, 47, 47, 46, 216, 288, 552, 714, 713, /* 670 */ 495, 682, 298, 662, 346, 153, 538, 69, 694, 715, - /* 680 */ 715, 52, 53, 426, 289, 1027, 1027, 675, 675, 50, - /* 690 */ 50, 51, 51, 51, 51, 1094, 49, 49, 49, 49, + /* 680 */ 715, 52, 53, 426, 289, 1028, 1028, 675, 675, 50, + /* 690 */ 50, 51, 51, 51, 51, 1095, 49, 49, 49, 49, /* 700 */ 48, 48, 47, 47, 47, 46, 216, 52, 53, 426, /* 710 */ 289, 418, 511, 675, 675, 50, 50, 51, 51, 51, /* 720 */ 51, 159, 49, 49, 49, 49, 48, 48, 47, 47, @@ -321,12 +321,12 @@ static const YYACTIONTYPE yy_action[] = { /* 740 */ 215, 650, 714, 713, 81, 52, 53, 426, 289, 954, /* 750 */ 414, 675, 675, 50, 50, 51, 51, 51, 51, 397, /* 760 */ 49, 49, 49, 49, 48, 48, 47, 47, 47, 46, - /* 770 */ 216, 158, 1094, 21, 716, 627, 459, 716, 1079, 716, - /* 780 */ 647, 1045, 140, 89, 716, 1149, 154, 435, 2, 715, + /* 770 */ 216, 158, 1095, 21, 716, 627, 459, 716, 1080, 716, + /* 780 */ 647, 1046, 140, 89, 716, 1150, 154, 435, 2, 715, /* 790 */ 424, 671, 670, 396, 460, 461, 954, 52, 53, 426, /* 800 */ 289, 573, 716, 675, 675, 50, 50, 51, 51, 51, /* 810 */ 51, 321, 49, 49, 49, 49, 48, 48, 47, 47, - /* 820 */ 47, 46, 216, 431, 1108, 81, 206, 205, 204, 52, + /* 820 */ 47, 46, 216, 431, 1109, 81, 206, 205, 204, 52, /* 830 */ 53, 426, 289, 716, 425, 675, 675, 50, 50, 51, /* 840 */ 51, 51, 51, 344, 49, 49, 49, 49, 48, 48, /* 850 */ 47, 47, 47, 46, 216, 597, 715, 666, 600, 462, @@ -334,17 +334,17 @@ static const YYACTIONTYPE yy_action[] = { /* 870 */ 667, 609, 724, 434, 81, 656, 714, 713, 685, 714, /* 880 */ 713, 714, 713, 41, 528, 272, 714, 713, 610, 349, /* 890 */ 528, 450, 89, 677, 12, 633, 633, 338, 636, 609, - /* 900 */ 38, 39, 649, 609, 714, 713, 716, 40, 1142, 1142, + /* 900 */ 38, 39, 649, 609, 714, 713, 716, 40, 1143, 1143, /* 910 */ 716, 524, 682, 581, 716, 4, 610, 468, 60, 450, /* 920 */ 642, 208, 422, 506, 60, 687, 429, 677, 32, 109, /* 930 */ 690, 609, 500, 501, 352, 714, 713, 642, 689, 688, /* 940 */ 687, 428, 900, 900, 467, 466, 552, 465, 421, 383, - /* 950 */ 507, 509, 142, 508, 430, 440, 69, 1142, 1142, 715, + /* 950 */ 507, 509, 142, 508, 430, 440, 69, 1143, 1143, 715, /* 960 */ 444, 722, 686, 182, 646, 714, 713, 645, 231, 230, /* 970 */ 437, 642, 356, 676, 9, 642, 417, 444, 52, 53, /* 980 */ 426, 289, 91, 91, 675, 675, 50, 50, 51, 51, /* 990 */ 51, 51, 644, 49, 49, 49, 49, 48, 48, 47, - /* 1000 */ 47, 47, 46, 216, 1034, 444, 668, 667, 714, 713, + /* 1000 */ 47, 47, 46, 216, 1035, 444, 668, 667, 714, 713, /* 1010 */ 91, 453, 714, 713, 682, 641, 714, 713, 324, 202, /* 1020 */ 52, 53, 426, 289, 446, 680, 675, 675, 50, 50, /* 1030 */ 51, 51, 51, 51, 639, 49, 49, 49, 49, 48, @@ -367,10 +367,10 @@ static const YYACTIONTYPE yy_action[] = { /* 1200 */ 47, 47, 47, 46, 216, 532, 8, 517, 696, 87, /* 1210 */ 137, 52, 53, 426, 289, 22, 557, 675, 675, 50, /* 1220 */ 50, 51, 51, 51, 51, 135, 49, 49, 49, 49, - /* 1230 */ 48, 48, 47, 47, 47, 46, 216, 81, 1109, 91, + /* 1230 */ 48, 48, 47, 47, 47, 46, 216, 81, 1110, 91, /* 1240 */ 716, 91, 52, 53, 426, 289, 615, 722, 675, 675, /* 1250 */ 50, 50, 51, 51, 51, 51, 620, 49, 49, 49, - /* 1260 */ 49, 48, 48, 47, 47, 47, 46, 216, 604, 1107, + /* 1260 */ 49, 48, 48, 47, 47, 47, 46, 216, 604, 1108, /* 1270 */ 99, 504, 390, 491, 52, 53, 426, 289, 714, 713, /* 1280 */ 675, 675, 50, 50, 51, 51, 51, 51, 682, 49, /* 1290 */ 49, 49, 49, 48, 48, 47, 47, 47, 46, 216, @@ -395,7 +395,7 @@ static const YYACTIONTYPE yy_action[] = { /* 1480 */ 530, 714, 713, 651, 715, 714, 713, 38, 39, 64, /* 1490 */ 18, 399, 370, 431, 40, 129, 716, 366, 326, 534, /* 1500 */ 534, 63, 4, 270, 425, 714, 713, 642, 475, 422, - /* 1510 */ 316, 530, 687, 429, 716, 714, 713, 690, 279, 716, + /* 1510 */ 316, 530, 714, 429, 716, 714, 713, 690, 279, 716, /* 1520 */ 533, 716, 156, 624, 642, 689, 688, 687, 525, 716, /* 1530 */ 125, 411, 519, 714, 713, 514, 715, 714, 713, 3, /* 1540 */ 714, 713, 714, 713, 79, 525, 682, 85, 685, 519, @@ -408,9 +408,9 @@ static const YYACTIONTYPE yy_action[] = { /* 1610 */ 687, 438, 428, 411, 497, 62, 714, 713, 430, 119, /* 1620 */ 254, 714, 713, 714, 713, 430, 686, 181, 438, 704, /* 1630 */ 685, 714, 713, 686, 163, 41, 251, 629, 311, 161, - /* 1640 */ 138, 642, 715, 676, 9, 642, 455, 1035, 682, 531, + /* 1640 */ 138, 642, 715, 676, 9, 642, 455, 1036, 682, 531, /* 1650 */ 701, 702, 38, 39, 152, 641, 498, 469, 431, 40, - /* 1660 */ 499, 478, 699, 428, 715, 714, 713, 4, 1037, 425, + /* 1660 */ 499, 478, 699, 428, 715, 714, 713, 4, 1038, 425, /* 1670 */ 714, 713, 642, 416, 422, 715, 430, 687, 429, 641, /* 1680 */ 428, 350, 690, 619, 686, 172, 641, 494, 454, 642, /* 1690 */ 689, 688, 687, 430, 111, 428, 411, 286, 337, 714, @@ -794,59 +794,59 @@ static const short yy_reduce_ofst[] = { /* 310 */ 1573, 1506, 1462, 1462, 1462, 1540, }; static const YYACTIONTYPE yy_default[] = { - /* 0 */ 729, 1037, 1142, 1142, 1026, 1026, 1026, 1142, 1026, 1026, - /* 10 */ 1026, 1026, 900, 1148, 1148, 1148, 1026, 1026, 1026, 1026, - /* 20 */ 1026, 1026, 1026, 1026, 1026, 1026, 1026, 1026, 1026, 1026, - /* 30 */ 1026, 1026, 1026, 1026, 1026, 1026, 1026, 1026, 1026, 1026, - /* 40 */ 1026, 1026, 1026, 1026, 1026, 1026, 1026, 1026, 1026, 1026, - /* 50 */ 1026, 1026, 1026, 1026, 1026, 1026, 1026, 1015, 1148, 894, - /* 60 */ 1148, 1148, 1148, 1148, 1148, 1148, 1148, 1148, 1148, 774, - /* 70 */ 890, 900, 1148, 1148, 1148, 1148, 1148, 962, 949, 940, - /* 80 */ 1148, 1148, 1148, 972, 972, 955, 842, 972, 1148, 1148, - /* 90 */ 1148, 1148, 928, 928, 1027, 1148, 766, 1112, 1117, 1013, - /* 100 */ 1148, 1148, 1148, 1148, 1148, 1148, 1148, 1148, 901, 1148, - /* 110 */ 1013, 1148, 1148, 1148, 1148, 1148, 1148, 1148, 1148, 1148, - /* 120 */ 1148, 963, 956, 950, 941, 1148, 1148, 1148, 1148, 1148, - /* 130 */ 1148, 1148, 1148, 1148, 1148, 890, 890, 1148, 1148, 890, - /* 140 */ 1148, 1148, 1148, 1014, 1148, 1148, 763, 1148, 1148, 1148, - /* 150 */ 735, 1058, 1148, 1148, 729, 1142, 1142, 1142, 1142, 1142, - /* 160 */ 1142, 1135, 880, 935, 906, 945, 933, 937, 1038, 1031, - /* 170 */ 1032, 1030, 936, 1027, 1027, 1027, 1027, 1027, 1027, 1027, - /* 180 */ 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 988, 1000, - /* 190 */ 987, 995, 1004, 999, 996, 990, 989, 991, 1148, 1148, - /* 200 */ 1148, 992, 1148, 1148, 1148, 1148, 1148, 893, 1148, 1148, - /* 210 */ 864, 1148, 1086, 1148, 1148, 776, 1148, 878, 738, 944, - /* 220 */ 918, 918, 809, 833, 798, 928, 918, 908, 1033, 928, - /* 230 */ 1148, 1148, 993, 891, 878, 1126, 909, 909, 909, 1111, - /* 240 */ 1111, 909, 909, 855, 909, 855, 909, 855, 909, 855, + /* 0 */ 729, 1038, 1143, 1143, 1027, 1027, 1027, 1143, 1027, 1027, + /* 10 */ 1027, 1027, 900, 1149, 1149, 1149, 1027, 1027, 1027, 1027, + /* 20 */ 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, + /* 30 */ 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, + /* 40 */ 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, + /* 50 */ 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1015, 1149, 894, + /* 60 */ 1149, 1149, 1149, 1149, 1149, 1149, 1149, 1149, 1149, 774, + /* 70 */ 890, 900, 1149, 1149, 1149, 1149, 1149, 962, 949, 940, + /* 80 */ 1149, 1149, 1149, 972, 972, 955, 842, 972, 1149, 1149, + /* 90 */ 1149, 1149, 928, 928, 1028, 1149, 766, 1113, 1118, 1013, + /* 100 */ 1149, 1149, 1149, 1149, 1149, 1149, 1149, 1149, 901, 1149, + /* 110 */ 1013, 1149, 1149, 1149, 1149, 1149, 1149, 1149, 1149, 1149, + /* 120 */ 1149, 963, 956, 950, 941, 1149, 1149, 1149, 1149, 1149, + /* 130 */ 1149, 1149, 1149, 1149, 1149, 890, 890, 1149, 1149, 890, + /* 140 */ 1149, 1149, 1149, 1014, 1149, 1149, 763, 1149, 1149, 1149, + /* 150 */ 735, 1059, 1149, 1149, 729, 1143, 1143, 1143, 1143, 1143, + /* 160 */ 1143, 1136, 880, 935, 906, 945, 933, 937, 1039, 1032, + /* 170 */ 1033, 1031, 936, 1028, 1028, 1028, 1028, 1028, 1028, 1028, + /* 180 */ 1028, 1028, 1018, 1028, 1028, 1028, 1028, 1028, 988, 1000, + /* 190 */ 987, 995, 1004, 999, 996, 990, 989, 991, 1149, 1149, + /* 200 */ 1149, 992, 1149, 1149, 1149, 1149, 1149, 893, 1149, 1149, + /* 210 */ 864, 1149, 1087, 1149, 1149, 776, 1149, 878, 738, 944, + /* 220 */ 918, 918, 809, 833, 798, 928, 918, 908, 1034, 928, + /* 230 */ 1149, 1149, 993, 891, 878, 1127, 909, 909, 909, 1112, + /* 240 */ 1112, 909, 909, 855, 909, 855, 909, 855, 909, 855, /* 250 */ 909, 760, 944, 909, 760, 846, 968, 909, 909, 846, - /* 260 */ 944, 909, 1093, 1091, 909, 760, 909, 760, 909, 1046, - /* 270 */ 844, 844, 844, 844, 825, 1046, 844, 809, 844, 825, - /* 280 */ 844, 844, 1148, 909, 909, 1148, 1046, 1052, 1046, 1027, - /* 290 */ 994, 934, 922, 932, 929, 944, 1148, 757, 828, 760, - /* 300 */ 746, 746, 734, 734, 734, 734, 1139, 1139, 1135, 811, - /* 310 */ 811, 896, 1003, 1002, 1001, 785, 1039, 1148, 1148, 1148, - /* 320 */ 1148, 1148, 1148, 1060, 1148, 1148, 1148, 1148, 1148, 1148, - /* 330 */ 1148, 1148, 1148, 1148, 1148, 1148, 1148, 1148, 730, 1148, - /* 340 */ 1148, 1148, 1148, 1148, 1129, 1148, 1148, 1148, 1148, 1148, - /* 350 */ 1148, 1090, 1089, 1148, 1148, 1148, 1148, 1148, 1148, 1148, - /* 360 */ 1148, 1148, 1148, 1078, 1148, 1148, 1148, 1148, 1148, 1148, - /* 370 */ 1148, 1148, 1148, 1148, 1148, 1148, 1148, 1148, 1148, 1148, - /* 380 */ 1148, 1148, 1148, 1148, 867, 869, 1148, 1148, 1148, 868, - /* 390 */ 1148, 1148, 1148, 1148, 1148, 1148, 1148, 1148, 1148, 930, - /* 400 */ 1148, 923, 1148, 1036, 1148, 1017, 1025, 1148, 1148, 1148, - /* 410 */ 1148, 1148, 1016, 1148, 1148, 1148, 1144, 1148, 1148, 1148, - /* 420 */ 1143, 1148, 1148, 1148, 1148, 1148, 1028, 980, 1148, 979, - /* 430 */ 978, 769, 1148, 744, 1148, 726, 731, 1128, 1125, 1127, - /* 440 */ 1122, 1123, 1121, 1124, 1120, 1118, 1119, 1116, 1114, 1113, - /* 450 */ 1115, 1110, 1106, 1066, 1064, 1062, 1071, 1070, 1069, 1068, - /* 460 */ 1067, 1063, 1061, 1065, 1059, 959, 947, 938, 862, 1105, - /* 470 */ 1103, 1104, 1057, 1055, 1056, 861, 860, 859, 854, 853, - /* 480 */ 852, 851, 1132, 1141, 1140, 1138, 1137, 1136, 1130, 1131, - /* 490 */ 1044, 1043, 1041, 1040, 1042, 762, 1082, 1085, 1084, 1083, - /* 500 */ 1088, 1087, 1080, 1092, 1097, 1096, 1101, 1100, 1099, 1098, - /* 510 */ 1095, 1077, 967, 966, 964, 969, 961, 960, 965, 952, - /* 520 */ 958, 957, 948, 951, 847, 943, 939, 942, 863, 1081, + /* 260 */ 944, 909, 1094, 1092, 909, 760, 909, 760, 909, 1047, + /* 270 */ 844, 844, 844, 844, 825, 1047, 844, 809, 844, 825, + /* 280 */ 844, 844, 1149, 909, 909, 1149, 1047, 1053, 1047, 1028, + /* 290 */ 994, 934, 922, 932, 929, 944, 1149, 757, 828, 760, + /* 300 */ 746, 746, 734, 734, 734, 734, 1140, 1140, 1136, 811, + /* 310 */ 811, 896, 1003, 1002, 1001, 785, 1040, 1149, 1149, 1149, + /* 320 */ 1149, 1149, 1149, 1061, 1149, 1149, 1149, 1149, 1149, 1149, + /* 330 */ 1149, 1149, 1149, 1149, 1149, 1149, 1149, 1149, 730, 1149, + /* 340 */ 1149, 1149, 1149, 1149, 1130, 1149, 1149, 1149, 1149, 1149, + /* 350 */ 1149, 1091, 1090, 1149, 1149, 1149, 1149, 1149, 1149, 1149, + /* 360 */ 1149, 1149, 1149, 1079, 1149, 1149, 1149, 1149, 1149, 1149, + /* 370 */ 1149, 1149, 1149, 1149, 1149, 1149, 1149, 1149, 1149, 1149, + /* 380 */ 1149, 1149, 1149, 1149, 867, 869, 1149, 1149, 1149, 868, + /* 390 */ 1149, 1149, 1149, 1149, 1149, 1149, 1149, 1149, 1149, 930, + /* 400 */ 1149, 923, 1149, 1037, 1149, 1017, 1026, 1149, 1149, 1149, + /* 410 */ 1149, 1149, 1016, 1149, 1149, 1149, 1145, 1149, 1149, 1149, + /* 420 */ 1144, 1149, 1149, 1149, 1149, 1149, 1029, 980, 1149, 979, + /* 430 */ 978, 769, 1149, 744, 1149, 726, 731, 1129, 1126, 1128, + /* 440 */ 1123, 1124, 1122, 1125, 1121, 1119, 1120, 1117, 1115, 1114, + /* 450 */ 1116, 1111, 1107, 1067, 1065, 1063, 1072, 1071, 1070, 1069, + /* 460 */ 1068, 1064, 1062, 1066, 1060, 959, 947, 938, 862, 1106, + /* 470 */ 1104, 1105, 1058, 1056, 1057, 861, 860, 859, 854, 853, + /* 480 */ 852, 851, 1133, 1142, 1141, 1139, 1138, 1137, 1131, 1132, + /* 490 */ 1045, 1044, 1042, 1041, 1043, 762, 1083, 1086, 1085, 1084, + /* 500 */ 1089, 1088, 1081, 1093, 1098, 1097, 1102, 1101, 1100, 1099, + /* 510 */ 1096, 1078, 967, 966, 964, 969, 961, 960, 965, 952, + /* 520 */ 958, 957, 948, 951, 847, 943, 939, 942, 863, 1082, /* 530 */ 858, 857, 856, 761, 756, 911, 755, 754, 765, 831, /* 540 */ 832, 840, 843, 838, 841, 837, 836, 835, 839, 834, /* 550 */ 830, 768, 767, 775, 824, 802, 800, 799, 803, 816, @@ -857,12 +857,12 @@ static const YYACTIONTYPE yy_default[] = { /* 600 */ 883, 882, 881, 917, 916, 915, 914, 913, 912, 905, /* 610 */ 903, 899, 898, 904, 902, 920, 921, 919, 897, 889, /* 620 */ 887, 888, 886, 974, 971, 973, 970, 907, 895, 892, - /* 630 */ 879, 925, 924, 1029, 1018, 1008, 1019, 910, 1007, 1005, - /* 640 */ 1028, 1025, 1020, 1102, 1024, 1012, 1011, 1010, 1147, 1145, - /* 650 */ 1146, 1049, 1051, 1054, 1053, 1050, 927, 926, 1048, 1047, - /* 660 */ 1009, 984, 781, 779, 780, 1074, 1073, 1076, 1075, 1072, - /* 670 */ 783, 782, 778, 777, 998, 997, 982, 1021, 1022, 981, - /* 680 */ 1023, 983, 770, 873, 866, 976, 975, 808, 807, 806, + /* 630 */ 879, 925, 924, 1030, 1019, 1008, 1020, 910, 1007, 1005, + /* 640 */ 1029, 1026, 1021, 1103, 1025, 1012, 1011, 1010, 1148, 1146, + /* 650 */ 1147, 1050, 1052, 1055, 1054, 1051, 927, 926, 1049, 1048, + /* 660 */ 1009, 984, 781, 779, 780, 1075, 1074, 1077, 1076, 1073, + /* 670 */ 783, 782, 778, 777, 998, 997, 982, 1022, 1023, 981, + /* 680 */ 1024, 983, 770, 873, 866, 976, 975, 808, 807, 806, /* 690 */ 805, 877, 876, 787, 801, 786, 784, 764, 759, 758, /* 700 */ 753, 751, 748, 750, 747, 752, 749, 745, 743, 742, /* 710 */ 741, 740, 739, 773, 772, 771, 769, 737, 736, 733, @@ -1462,136 +1462,137 @@ static const char *const yyRuleName[] = { /* 291 */ "exprx ::= expr not_opt BETWEEN expr AND", /* 292 */ "exprx ::= CASE case_operand case_exprlist case_else", /* 293 */ "exprx ::= expr not_opt IN LP exprlist", - /* 294 */ "exprx ::= expr not_opt IN ID_DB", - /* 295 */ "exprx ::= expr not_opt IN nm DOT ID_TAB", - /* 296 */ "exprx ::= ID_DB|ID_TAB|ID_COL|ID_FN", - /* 297 */ "exprx ::= nm DOT ID_TAB|ID_COL", - /* 298 */ "exprx ::= nm DOT nm DOT ID_COL", - /* 299 */ "exprx ::= expr COLLATE ID_COLLATE", - /* 300 */ "exprx ::= RAISE LP raisetype COMMA ID_ERR_MSG RP", - /* 301 */ "expr ::= exprx", - /* 302 */ "expr ::=", - /* 303 */ "not_opt ::=", - /* 304 */ "not_opt ::= NOT", - /* 305 */ "likeop ::= LIKE_KW|MATCH", - /* 306 */ "case_exprlist ::= case_exprlist WHEN expr THEN expr", - /* 307 */ "case_exprlist ::= WHEN expr THEN expr", - /* 308 */ "case_else ::= ELSE expr", - /* 309 */ "case_else ::=", - /* 310 */ "case_operand ::= exprx", - /* 311 */ "case_operand ::=", - /* 312 */ "exprlist ::= nexprlist", - /* 313 */ "exprlist ::=", - /* 314 */ "nexprlist ::= nexprlist COMMA expr", - /* 315 */ "nexprlist ::= exprx", - /* 316 */ "cmd ::= CREATE uniqueflag INDEX ifnotexists nm dbnm ON nm LP idxlist RP where_opt", - /* 317 */ "cmd ::= CREATE uniqueflag INDEX ifnotexists nm dbnm ON ID_TAB", - /* 318 */ "cmd ::= CREATE uniqueflag INDEX ifnotexists nm DOT ID_IDX_NEW", - /* 319 */ "cmd ::= CREATE uniqueflag INDEX ifnotexists ID_DB|ID_IDX_NEW", - /* 320 */ "uniqueflag ::= UNIQUE", - /* 321 */ "uniqueflag ::=", - /* 322 */ "idxlist_opt ::=", - /* 323 */ "idxlist_opt ::= LP idxlist RP", - /* 324 */ "idxlist ::= idxlist COMMA idxlist_single", - /* 325 */ "idxlist ::= idxlist_single", - /* 326 */ "idxlist_single ::= nm collate sortorder", - /* 327 */ "idxlist_single ::= ID_COL", - /* 328 */ "collate ::=", - /* 329 */ "collate ::= COLLATE ids", - /* 330 */ "collate ::= COLLATE ID_COLLATE", - /* 331 */ "cmd ::= DROP INDEX ifexists fullname", - /* 332 */ "cmd ::= DROP INDEX ifexists nm DOT ID_IDX", - /* 333 */ "cmd ::= DROP INDEX ifexists ID_DB|ID_IDX", - /* 334 */ "cmd ::= VACUUM", - /* 335 */ "cmd ::= VACUUM nm", - /* 336 */ "cmd ::= PRAGMA nm dbnm", - /* 337 */ "cmd ::= PRAGMA nm dbnm EQ nmnum", - /* 338 */ "cmd ::= PRAGMA nm dbnm LP nmnum RP", - /* 339 */ "cmd ::= PRAGMA nm dbnm EQ minus_num", - /* 340 */ "cmd ::= PRAGMA nm dbnm LP minus_num RP", - /* 341 */ "cmd ::= PRAGMA nm DOT ID_PRAGMA", - /* 342 */ "cmd ::= PRAGMA ID_DB|ID_PRAGMA", - /* 343 */ "nmnum ::= plus_num", - /* 344 */ "nmnum ::= nm", - /* 345 */ "nmnum ::= ON", - /* 346 */ "nmnum ::= DELETE", - /* 347 */ "nmnum ::= DEFAULT", - /* 348 */ "plus_num ::= PLUS number", - /* 349 */ "plus_num ::= number", - /* 350 */ "minus_num ::= MINUS number", - /* 351 */ "number ::= INTEGER", - /* 352 */ "number ::= FLOAT", - /* 353 */ "cmd ::= CREATE temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON nm foreach_clause when_clause BEGIN trigger_cmd_list END", - /* 354 */ "cmd ::= CREATE temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON nm foreach_clause when_clause", - /* 355 */ "cmd ::= CREATE temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON nm foreach_clause when_clause BEGIN trigger_cmd_list", - /* 356 */ "cmd ::= CREATE temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON ID_TAB", - /* 357 */ "cmd ::= CREATE temp TRIGGER ifnotexists nm DOT ID_TRIG_NEW", - /* 358 */ "cmd ::= CREATE temp TRIGGER ifnotexists ID_DB|ID_TRIG_NEW", - /* 359 */ "trigger_time ::= BEFORE", - /* 360 */ "trigger_time ::= AFTER", - /* 361 */ "trigger_time ::= INSTEAD OF", - /* 362 */ "trigger_time ::=", - /* 363 */ "trigger_event ::= DELETE", - /* 364 */ "trigger_event ::= INSERT", - /* 365 */ "trigger_event ::= UPDATE", - /* 366 */ "trigger_event ::= UPDATE OF inscollist", - /* 367 */ "foreach_clause ::=", - /* 368 */ "foreach_clause ::= FOR EACH ROW", - /* 369 */ "when_clause ::=", - /* 370 */ "when_clause ::= WHEN expr", - /* 371 */ "trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI", - /* 372 */ "trigger_cmd_list ::= trigger_cmd SEMI", - /* 373 */ "trigger_cmd_list ::= SEMI", - /* 374 */ "trigger_cmd ::= update_stmt", - /* 375 */ "trigger_cmd ::= insert_stmt", - /* 376 */ "trigger_cmd ::= delete_stmt", - /* 377 */ "trigger_cmd ::= select_stmt", - /* 378 */ "raisetype ::= ROLLBACK|ABORT|FAIL", - /* 379 */ "cmd ::= DROP TRIGGER ifexists fullname", - /* 380 */ "cmd ::= DROP TRIGGER ifexists nm DOT ID_TRIG", - /* 381 */ "cmd ::= DROP TRIGGER ifexists ID_DB|ID_TRIG", - /* 382 */ "cmd ::= ATTACH database_kw_opt expr AS expr key_opt", - /* 383 */ "cmd ::= DETACH database_kw_opt expr", - /* 384 */ "key_opt ::=", - /* 385 */ "key_opt ::= KEY expr", - /* 386 */ "database_kw_opt ::= DATABASE", - /* 387 */ "database_kw_opt ::=", - /* 388 */ "cmd ::= REINDEX", - /* 389 */ "cmd ::= REINDEX nm dbnm", - /* 390 */ "cmd ::= REINDEX ID_COLLATE", - /* 391 */ "cmd ::= REINDEX nm DOT ID_TAB|ID_IDX", - /* 392 */ "cmd ::= REINDEX ID_DB|ID_IDX|ID_TAB", - /* 393 */ "cmd ::= ANALYZE", - /* 394 */ "cmd ::= ANALYZE nm dbnm", - /* 395 */ "cmd ::= ANALYZE nm DOT ID_TAB|ID_IDX", - /* 396 */ "cmd ::= ANALYZE ID_DB|ID_IDX|ID_TAB", - /* 397 */ "cmd ::= ALTER TABLE fullname RENAME TO nm", - /* 398 */ "cmd ::= ALTER TABLE fullname ADD kwcolumn_opt column", - /* 399 */ "cmd ::= ALTER TABLE fullname RENAME TO ID_TAB_NEW", - /* 400 */ "cmd ::= ALTER TABLE nm DOT ID_TAB", - /* 401 */ "cmd ::= ALTER TABLE ID_DB|ID_TAB", - /* 402 */ "kwcolumn_opt ::=", - /* 403 */ "kwcolumn_opt ::= COLUMNKW", - /* 404 */ "cmd ::= create_vtab", - /* 405 */ "create_vtab ::= CREATE VIRTUAL TABLE ifnotexists nm dbnm USING nm", - /* 406 */ "create_vtab ::= CREATE VIRTUAL TABLE ifnotexists nm dbnm USING nm LP vtabarglist RP", - /* 407 */ "create_vtab ::= CREATE VIRTUAL TABLE ifnotexists nm DOT ID_TAB_NEW", - /* 408 */ "create_vtab ::= CREATE VIRTUAL TABLE ifnotexists ID_DB|ID_TAB_NEW", - /* 409 */ "vtabarglist ::= vtabarg", - /* 410 */ "vtabarglist ::= vtabarglist COMMA vtabarg", - /* 411 */ "vtabarg ::=", - /* 412 */ "vtabarg ::= vtabarg vtabargtoken", - /* 413 */ "vtabargtoken ::= ANY", - /* 414 */ "vtabargtoken ::= LP anylist RP", - /* 415 */ "anylist ::=", - /* 416 */ "anylist ::= anylist LP anylist RP", - /* 417 */ "anylist ::= anylist ANY", - /* 418 */ "with ::=", - /* 419 */ "with ::= WITH wqlist", - /* 420 */ "with ::= WITH RECURSIVE wqlist", - /* 421 */ "wqlist ::= nm idxlist_opt AS LP select RP", - /* 422 */ "wqlist ::= wqlist COMMA nm idxlist_opt AS LP select RP", - /* 423 */ "wqlist ::= ID_TAB_NEW", + /* 294 */ "exprx ::= LP expr", + /* 295 */ "exprx ::= expr not_opt IN ID_DB", + /* 296 */ "exprx ::= expr not_opt IN nm DOT ID_TAB", + /* 297 */ "exprx ::= ID_DB|ID_TAB|ID_COL|ID_FN", + /* 298 */ "exprx ::= nm DOT ID_TAB|ID_COL", + /* 299 */ "exprx ::= nm DOT nm DOT ID_COL", + /* 300 */ "exprx ::= expr COLLATE ID_COLLATE", + /* 301 */ "exprx ::= RAISE LP raisetype COMMA ID_ERR_MSG RP", + /* 302 */ "expr ::= exprx", + /* 303 */ "expr ::=", + /* 304 */ "not_opt ::=", + /* 305 */ "not_opt ::= NOT", + /* 306 */ "likeop ::= LIKE_KW|MATCH", + /* 307 */ "case_exprlist ::= case_exprlist WHEN expr THEN expr", + /* 308 */ "case_exprlist ::= WHEN expr THEN expr", + /* 309 */ "case_else ::= ELSE expr", + /* 310 */ "case_else ::=", + /* 311 */ "case_operand ::= exprx", + /* 312 */ "case_operand ::=", + /* 313 */ "exprlist ::= nexprlist", + /* 314 */ "exprlist ::=", + /* 315 */ "nexprlist ::= nexprlist COMMA expr", + /* 316 */ "nexprlist ::= exprx", + /* 317 */ "cmd ::= CREATE uniqueflag INDEX ifnotexists nm dbnm ON nm LP idxlist RP where_opt", + /* 318 */ "cmd ::= CREATE uniqueflag INDEX ifnotexists nm dbnm ON ID_TAB", + /* 319 */ "cmd ::= CREATE uniqueflag INDEX ifnotexists nm DOT ID_IDX_NEW", + /* 320 */ "cmd ::= CREATE uniqueflag INDEX ifnotexists ID_DB|ID_IDX_NEW", + /* 321 */ "uniqueflag ::= UNIQUE", + /* 322 */ "uniqueflag ::=", + /* 323 */ "idxlist_opt ::=", + /* 324 */ "idxlist_opt ::= LP idxlist RP", + /* 325 */ "idxlist ::= idxlist COMMA idxlist_single", + /* 326 */ "idxlist ::= idxlist_single", + /* 327 */ "idxlist_single ::= nm collate sortorder", + /* 328 */ "idxlist_single ::= ID_COL", + /* 329 */ "collate ::=", + /* 330 */ "collate ::= COLLATE ids", + /* 331 */ "collate ::= COLLATE ID_COLLATE", + /* 332 */ "cmd ::= DROP INDEX ifexists fullname", + /* 333 */ "cmd ::= DROP INDEX ifexists nm DOT ID_IDX", + /* 334 */ "cmd ::= DROP INDEX ifexists ID_DB|ID_IDX", + /* 335 */ "cmd ::= VACUUM", + /* 336 */ "cmd ::= VACUUM nm", + /* 337 */ "cmd ::= PRAGMA nm dbnm", + /* 338 */ "cmd ::= PRAGMA nm dbnm EQ nmnum", + /* 339 */ "cmd ::= PRAGMA nm dbnm LP nmnum RP", + /* 340 */ "cmd ::= PRAGMA nm dbnm EQ minus_num", + /* 341 */ "cmd ::= PRAGMA nm dbnm LP minus_num RP", + /* 342 */ "cmd ::= PRAGMA nm DOT ID_PRAGMA", + /* 343 */ "cmd ::= PRAGMA ID_DB|ID_PRAGMA", + /* 344 */ "nmnum ::= plus_num", + /* 345 */ "nmnum ::= nm", + /* 346 */ "nmnum ::= ON", + /* 347 */ "nmnum ::= DELETE", + /* 348 */ "nmnum ::= DEFAULT", + /* 349 */ "plus_num ::= PLUS number", + /* 350 */ "plus_num ::= number", + /* 351 */ "minus_num ::= MINUS number", + /* 352 */ "number ::= INTEGER", + /* 353 */ "number ::= FLOAT", + /* 354 */ "cmd ::= CREATE temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON nm foreach_clause when_clause BEGIN trigger_cmd_list END", + /* 355 */ "cmd ::= CREATE temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON nm foreach_clause when_clause", + /* 356 */ "cmd ::= CREATE temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON nm foreach_clause when_clause BEGIN trigger_cmd_list", + /* 357 */ "cmd ::= CREATE temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON ID_TAB", + /* 358 */ "cmd ::= CREATE temp TRIGGER ifnotexists nm DOT ID_TRIG_NEW", + /* 359 */ "cmd ::= CREATE temp TRIGGER ifnotexists ID_DB|ID_TRIG_NEW", + /* 360 */ "trigger_time ::= BEFORE", + /* 361 */ "trigger_time ::= AFTER", + /* 362 */ "trigger_time ::= INSTEAD OF", + /* 363 */ "trigger_time ::=", + /* 364 */ "trigger_event ::= DELETE", + /* 365 */ "trigger_event ::= INSERT", + /* 366 */ "trigger_event ::= UPDATE", + /* 367 */ "trigger_event ::= UPDATE OF inscollist", + /* 368 */ "foreach_clause ::=", + /* 369 */ "foreach_clause ::= FOR EACH ROW", + /* 370 */ "when_clause ::=", + /* 371 */ "when_clause ::= WHEN expr", + /* 372 */ "trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI", + /* 373 */ "trigger_cmd_list ::= trigger_cmd SEMI", + /* 374 */ "trigger_cmd_list ::= SEMI", + /* 375 */ "trigger_cmd ::= update_stmt", + /* 376 */ "trigger_cmd ::= insert_stmt", + /* 377 */ "trigger_cmd ::= delete_stmt", + /* 378 */ "trigger_cmd ::= select_stmt", + /* 379 */ "raisetype ::= ROLLBACK|ABORT|FAIL", + /* 380 */ "cmd ::= DROP TRIGGER ifexists fullname", + /* 381 */ "cmd ::= DROP TRIGGER ifexists nm DOT ID_TRIG", + /* 382 */ "cmd ::= DROP TRIGGER ifexists ID_DB|ID_TRIG", + /* 383 */ "cmd ::= ATTACH database_kw_opt expr AS expr key_opt", + /* 384 */ "cmd ::= DETACH database_kw_opt expr", + /* 385 */ "key_opt ::=", + /* 386 */ "key_opt ::= KEY expr", + /* 387 */ "database_kw_opt ::= DATABASE", + /* 388 */ "database_kw_opt ::=", + /* 389 */ "cmd ::= REINDEX", + /* 390 */ "cmd ::= REINDEX nm dbnm", + /* 391 */ "cmd ::= REINDEX ID_COLLATE", + /* 392 */ "cmd ::= REINDEX nm DOT ID_TAB|ID_IDX", + /* 393 */ "cmd ::= REINDEX ID_DB|ID_IDX|ID_TAB", + /* 394 */ "cmd ::= ANALYZE", + /* 395 */ "cmd ::= ANALYZE nm dbnm", + /* 396 */ "cmd ::= ANALYZE nm DOT ID_TAB|ID_IDX", + /* 397 */ "cmd ::= ANALYZE ID_DB|ID_IDX|ID_TAB", + /* 398 */ "cmd ::= ALTER TABLE fullname RENAME TO nm", + /* 399 */ "cmd ::= ALTER TABLE fullname ADD kwcolumn_opt column", + /* 400 */ "cmd ::= ALTER TABLE fullname RENAME TO ID_TAB_NEW", + /* 401 */ "cmd ::= ALTER TABLE nm DOT ID_TAB", + /* 402 */ "cmd ::= ALTER TABLE ID_DB|ID_TAB", + /* 403 */ "kwcolumn_opt ::=", + /* 404 */ "kwcolumn_opt ::= COLUMNKW", + /* 405 */ "cmd ::= create_vtab", + /* 406 */ "create_vtab ::= CREATE VIRTUAL TABLE ifnotexists nm dbnm USING nm", + /* 407 */ "create_vtab ::= CREATE VIRTUAL TABLE ifnotexists nm dbnm USING nm LP vtabarglist RP", + /* 408 */ "create_vtab ::= CREATE VIRTUAL TABLE ifnotexists nm DOT ID_TAB_NEW", + /* 409 */ "create_vtab ::= CREATE VIRTUAL TABLE ifnotexists ID_DB|ID_TAB_NEW", + /* 410 */ "vtabarglist ::= vtabarg", + /* 411 */ "vtabarglist ::= vtabarglist COMMA vtabarg", + /* 412 */ "vtabarg ::=", + /* 413 */ "vtabarg ::= vtabarg vtabargtoken", + /* 414 */ "vtabargtoken ::= ANY", + /* 415 */ "vtabargtoken ::= LP anylist RP", + /* 416 */ "anylist ::=", + /* 417 */ "anylist ::= anylist LP anylist RP", + /* 418 */ "anylist ::= anylist ANY", + /* 419 */ "with ::=", + /* 420 */ "with ::= WITH wqlist", + /* 421 */ "with ::= WITH RECURSIVE wqlist", + /* 422 */ "wqlist ::= nm idxlist_opt AS LP select RP", + /* 423 */ "wqlist ::= wqlist COMMA nm idxlist_opt AS LP select RP", + /* 424 */ "wqlist ::= ID_TAB_NEW", }; #endif /* NDEBUG */ @@ -2519,6 +2520,7 @@ static const struct { { 251, 5 }, { 251, 4 }, { 251, 5 }, + { 251, 2 }, { 251, 4 }, { 251, 6 }, { 251, 1 }, @@ -2735,11 +2737,11 @@ static void yy_reduce( {yygotominor.yy225 = new ParserStubExplain(true, true);} break; case 8: /* cmdx ::= cmd */ - case 374: /* trigger_cmd ::= update_stmt */ yytestcase(yyruleno==374); - case 375: /* trigger_cmd ::= insert_stmt */ yytestcase(yyruleno==375); - case 376: /* trigger_cmd ::= delete_stmt */ yytestcase(yyruleno==376); - case 377: /* trigger_cmd ::= select_stmt */ yytestcase(yyruleno==377); - case 404: /* cmd ::= create_vtab */ yytestcase(yyruleno==404); + case 375: /* trigger_cmd ::= update_stmt */ yytestcase(yyruleno==375); + case 376: /* trigger_cmd ::= insert_stmt */ yytestcase(yyruleno==376); + case 377: /* trigger_cmd ::= delete_stmt */ yytestcase(yyruleno==377); + case 378: /* trigger_cmd ::= select_stmt */ yytestcase(yyruleno==378); + case 405: /* cmd ::= create_vtab */ yytestcase(yyruleno==405); {yygotominor.yy399 = yymsp[0].minor.yy399;} break; case 9: /* cmd ::= BEGIN transtype trans_opt */ @@ -2828,10 +2830,10 @@ static void yy_reduce( case 86: /* autoinc ::= AUTOINCR */ yytestcase(yyruleno==86); case 108: /* tconscomma ::= COMMA */ yytestcase(yyruleno==108); case 130: /* ifexists ::= IF EXISTS */ yytestcase(yyruleno==130); - case 304: /* not_opt ::= NOT */ yytestcase(yyruleno==304); - case 320: /* uniqueflag ::= UNIQUE */ yytestcase(yyruleno==320); - case 386: /* database_kw_opt ::= DATABASE */ yytestcase(yyruleno==386); - case 402: /* kwcolumn_opt ::= */ yytestcase(yyruleno==402); + case 305: /* not_opt ::= NOT */ yytestcase(yyruleno==305); + case 321: /* uniqueflag ::= UNIQUE */ yytestcase(yyruleno==321); + case 387: /* database_kw_opt ::= DATABASE */ yytestcase(yyruleno==387); + case 403: /* kwcolumn_opt ::= */ yytestcase(yyruleno==403); {yygotominor.yy237 = new bool(true);} break; case 22: /* savepoint_opt ::= */ @@ -2839,10 +2841,10 @@ static void yy_reduce( case 85: /* autoinc ::= */ yytestcase(yyruleno==85); case 109: /* tconscomma ::= */ yytestcase(yyruleno==109); case 131: /* ifexists ::= */ yytestcase(yyruleno==131); - case 303: /* not_opt ::= */ yytestcase(yyruleno==303); - case 321: /* uniqueflag ::= */ yytestcase(yyruleno==321); - case 387: /* database_kw_opt ::= */ yytestcase(yyruleno==387); - case 403: /* kwcolumn_opt ::= COLUMNKW */ yytestcase(yyruleno==403); + case 304: /* not_opt ::= */ yytestcase(yyruleno==304); + case 322: /* uniqueflag ::= */ yytestcase(yyruleno==322); + case 388: /* database_kw_opt ::= */ yytestcase(yyruleno==388); + case 404: /* kwcolumn_opt ::= COLUMNKW */ yytestcase(yyruleno==404); {yygotominor.yy237 = new bool(false);} break; case 23: /* cmd ::= SAVEPOINT nm */ @@ -2914,22 +2916,22 @@ static void yy_reduce( break; case 31: /* cmd ::= CREATE temp TABLE ifnotexists nm DOT ID_TAB_NEW */ case 133: /* cmd ::= CREATE temp VIEW ifnotexists nm DOT ID_VIEW_NEW */ yytestcase(yyruleno==133); - case 357: /* cmd ::= CREATE temp TRIGGER ifnotexists nm DOT ID_TRIG_NEW */ yytestcase(yyruleno==357); + case 358: /* cmd ::= CREATE temp TRIGGER ifnotexists nm DOT ID_TRIG_NEW */ yytestcase(yyruleno==358); { yy_destructor(yypParser,179,&yymsp[-5].minor); yy_destructor(yypParser,177,&yymsp[-2].minor); } break; case 32: /* cmd ::= CREATE temp TABLE ifnotexists ID_DB|ID_TAB_NEW */ case 134: /* cmd ::= CREATE temp VIEW ifnotexists ID_DB|ID_VIEW_NEW */ yytestcase(yyruleno==134); - case 358: /* cmd ::= CREATE temp TRIGGER ifnotexists ID_DB|ID_TRIG_NEW */ yytestcase(yyruleno==358); + case 359: /* cmd ::= CREATE temp TRIGGER ifnotexists ID_DB|ID_TRIG_NEW */ yytestcase(yyruleno==359); { yy_destructor(yypParser,179,&yymsp[-3].minor); } break; case 33: /* table_options ::= */ case 185: /* dbnm ::= */ yytestcase(yyruleno==185); - case 328: /* collate ::= */ yytestcase(yyruleno==328); - case 411: /* vtabarg ::= */ yytestcase(yyruleno==411); - case 415: /* anylist ::= */ yytestcase(yyruleno==415); + case 329: /* collate ::= */ yytestcase(yyruleno==329); + case 412: /* vtabarg ::= */ yytestcase(yyruleno==412); + case 416: /* anylist ::= */ yytestcase(yyruleno==416); {yygotominor.yy211 = new QString();} break; case 34: /* table_options ::= WITHOUT nm */ @@ -2974,8 +2976,8 @@ static void yy_reduce( case 47: /* nm ::= id */ yytestcase(yyruleno==47); case 55: /* typename ::= ids */ yytestcase(yyruleno==55); case 186: /* dbnm ::= DOT nm */ yytestcase(yyruleno==186); - case 329: /* collate ::= COLLATE ids */ yytestcase(yyruleno==329); - case 330: /* collate ::= COLLATE ID_COLLATE */ yytestcase(yyruleno==330); + case 330: /* collate ::= COLLATE ids */ yytestcase(yyruleno==330); + case 331: /* collate ::= COLLATE ID_COLLATE */ yytestcase(yyruleno==331); {yygotominor.yy211 = yymsp[0].minor.yy211;} break; case 45: /* id ::= ID */ @@ -3035,9 +3037,9 @@ static void yy_reduce( break; case 58: /* signed ::= plus_num */ case 59: /* signed ::= minus_num */ yytestcase(yyruleno==59); - case 343: /* nmnum ::= plus_num */ yytestcase(yyruleno==343); - case 348: /* plus_num ::= PLUS number */ yytestcase(yyruleno==348); - case 349: /* plus_num ::= number */ yytestcase(yyruleno==349); + case 344: /* nmnum ::= plus_num */ yytestcase(yyruleno==344); + case 349: /* plus_num ::= PLUS number */ yytestcase(yyruleno==349); + case 350: /* plus_num ::= number */ yytestcase(yyruleno==350); {yygotominor.yy21 = yymsp[0].minor.yy21;} break; case 60: /* carglist ::= carglist ccons */ @@ -3202,9 +3204,9 @@ static void yy_reduce( } break; case 84: /* term ::= STRING|BLOB */ - case 345: /* nmnum ::= ON */ yytestcase(yyruleno==345); - case 346: /* nmnum ::= DELETE */ yytestcase(yyruleno==346); - case 347: /* nmnum ::= DEFAULT */ yytestcase(yyruleno==347); + case 346: /* nmnum ::= ON */ yytestcase(yyruleno==346); + case 347: /* nmnum ::= DELETE */ yytestcase(yyruleno==347); + case 348: /* nmnum ::= DEFAULT */ yytestcase(yyruleno==348); {yygotominor.yy21 = new QVariant(yymsp[0].minor.yy0->value);} break; case 87: /* refargs ::= */ @@ -3389,23 +3391,23 @@ static void yy_reduce( case 179: /* singlesrc ::= ID_DB|ID_TAB */ yytestcase(yyruleno==179); case 180: /* singlesrc ::= nm DOT ID_VIEW */ yytestcase(yyruleno==180); case 181: /* singlesrc ::= ID_DB|ID_VIEW */ yytestcase(yyruleno==181); - case 297: /* exprx ::= nm DOT ID_TAB|ID_COL */ yytestcase(yyruleno==297); - case 318: /* cmd ::= CREATE uniqueflag INDEX ifnotexists nm DOT ID_IDX_NEW */ yytestcase(yyruleno==318); - case 319: /* cmd ::= CREATE uniqueflag INDEX ifnotexists ID_DB|ID_IDX_NEW */ yytestcase(yyruleno==319); - case 332: /* cmd ::= DROP INDEX ifexists nm DOT ID_IDX */ yytestcase(yyruleno==332); - case 333: /* cmd ::= DROP INDEX ifexists ID_DB|ID_IDX */ yytestcase(yyruleno==333); - case 341: /* cmd ::= PRAGMA nm DOT ID_PRAGMA */ yytestcase(yyruleno==341); - case 342: /* cmd ::= PRAGMA ID_DB|ID_PRAGMA */ yytestcase(yyruleno==342); - case 380: /* cmd ::= DROP TRIGGER ifexists nm DOT ID_TRIG */ yytestcase(yyruleno==380); - case 381: /* cmd ::= DROP TRIGGER ifexists ID_DB|ID_TRIG */ yytestcase(yyruleno==381); - case 391: /* cmd ::= REINDEX nm DOT ID_TAB|ID_IDX */ yytestcase(yyruleno==391); - case 392: /* cmd ::= REINDEX ID_DB|ID_IDX|ID_TAB */ yytestcase(yyruleno==392); - case 395: /* cmd ::= ANALYZE nm DOT ID_TAB|ID_IDX */ yytestcase(yyruleno==395); - case 396: /* cmd ::= ANALYZE ID_DB|ID_IDX|ID_TAB */ yytestcase(yyruleno==396); - case 400: /* cmd ::= ALTER TABLE nm DOT ID_TAB */ yytestcase(yyruleno==400); - case 401: /* cmd ::= ALTER TABLE ID_DB|ID_TAB */ yytestcase(yyruleno==401); - case 407: /* create_vtab ::= CREATE VIRTUAL TABLE ifnotexists nm DOT ID_TAB_NEW */ yytestcase(yyruleno==407); - case 408: /* create_vtab ::= CREATE VIRTUAL TABLE ifnotexists ID_DB|ID_TAB_NEW */ yytestcase(yyruleno==408); + case 298: /* exprx ::= nm DOT ID_TAB|ID_COL */ yytestcase(yyruleno==298); + case 319: /* cmd ::= CREATE uniqueflag INDEX ifnotexists nm DOT ID_IDX_NEW */ yytestcase(yyruleno==319); + case 320: /* cmd ::= CREATE uniqueflag INDEX ifnotexists ID_DB|ID_IDX_NEW */ yytestcase(yyruleno==320); + case 333: /* cmd ::= DROP INDEX ifexists nm DOT ID_IDX */ yytestcase(yyruleno==333); + case 334: /* cmd ::= DROP INDEX ifexists ID_DB|ID_IDX */ yytestcase(yyruleno==334); + case 342: /* cmd ::= PRAGMA nm DOT ID_PRAGMA */ yytestcase(yyruleno==342); + case 343: /* cmd ::= PRAGMA ID_DB|ID_PRAGMA */ yytestcase(yyruleno==343); + case 381: /* cmd ::= DROP TRIGGER ifexists nm DOT ID_TRIG */ yytestcase(yyruleno==381); + case 382: /* cmd ::= DROP TRIGGER ifexists ID_DB|ID_TRIG */ yytestcase(yyruleno==382); + case 392: /* cmd ::= REINDEX nm DOT ID_TAB|ID_IDX */ yytestcase(yyruleno==392); + case 393: /* cmd ::= REINDEX ID_DB|ID_IDX|ID_TAB */ yytestcase(yyruleno==393); + case 396: /* cmd ::= ANALYZE nm DOT ID_TAB|ID_IDX */ yytestcase(yyruleno==396); + case 397: /* cmd ::= ANALYZE ID_DB|ID_IDX|ID_TAB */ yytestcase(yyruleno==397); + case 401: /* cmd ::= ALTER TABLE nm DOT ID_TAB */ yytestcase(yyruleno==401); + case 402: /* cmd ::= ALTER TABLE ID_DB|ID_TAB */ yytestcase(yyruleno==402); + case 408: /* create_vtab ::= CREATE VIRTUAL TABLE ifnotexists nm DOT ID_TAB_NEW */ yytestcase(yyruleno==408); + case 409: /* create_vtab ::= CREATE VIRTUAL TABLE ifnotexists ID_DB|ID_TAB_NEW */ yytestcase(yyruleno==409); { yy_destructor(yypParser,177,&yymsp[-2].minor); } break; @@ -3801,11 +3803,11 @@ static void yy_reduce( {yygotominor.yy226 = new SqliteSortOrder(SqliteSortOrder::null);} break; case 205: /* groupby_opt ::= */ - case 313: /* exprlist ::= */ yytestcase(yyruleno==313); + case 314: /* exprlist ::= */ yytestcase(yyruleno==314); {yygotominor.yy13 = new ParserExprList();} break; case 206: /* groupby_opt ::= GROUP BY nexprlist */ - case 312: /* exprlist ::= nexprlist */ yytestcase(yyruleno==312); + case 313: /* exprlist ::= nexprlist */ yytestcase(yyruleno==313); {yygotominor.yy13 = yymsp[0].minor.yy13;} break; case 207: /* groupby_opt ::= GROUP BY */ @@ -3816,19 +3818,19 @@ static void yy_reduce( break; case 208: /* having_opt ::= */ case 220: /* where_opt ::= */ yytestcase(yyruleno==220); - case 309: /* case_else ::= */ yytestcase(yyruleno==309); - case 311: /* case_operand ::= */ yytestcase(yyruleno==311); - case 369: /* when_clause ::= */ yytestcase(yyruleno==369); - case 384: /* key_opt ::= */ yytestcase(yyruleno==384); + case 310: /* case_else ::= */ yytestcase(yyruleno==310); + case 312: /* case_operand ::= */ yytestcase(yyruleno==312); + case 370: /* when_clause ::= */ yytestcase(yyruleno==370); + case 385: /* key_opt ::= */ yytestcase(yyruleno==385); {yygotominor.yy490 = nullptr;} break; case 209: /* having_opt ::= HAVING expr */ case 221: /* where_opt ::= WHERE expr */ yytestcase(yyruleno==221); - case 301: /* expr ::= exprx */ yytestcase(yyruleno==301); - case 308: /* case_else ::= ELSE expr */ yytestcase(yyruleno==308); - case 310: /* case_operand ::= exprx */ yytestcase(yyruleno==310); - case 370: /* when_clause ::= WHEN expr */ yytestcase(yyruleno==370); - case 385: /* key_opt ::= KEY expr */ yytestcase(yyruleno==385); + case 302: /* expr ::= exprx */ yytestcase(yyruleno==302); + case 309: /* case_else ::= ELSE expr */ yytestcase(yyruleno==309); + case 311: /* case_operand ::= exprx */ yytestcase(yyruleno==311); + case 371: /* when_clause ::= WHEN expr */ yytestcase(yyruleno==371); + case 386: /* key_opt ::= KEY expr */ yytestcase(yyruleno==386); {yygotominor.yy490 = yymsp[0].minor.yy490;} break; case 210: /* limit_opt ::= */ @@ -4401,64 +4403,72 @@ static void yy_reduce( parserContext->minorErrorBeforeNextToken("Syntax error"); } break; - case 294: /* exprx ::= expr not_opt IN ID_DB */ + case 294: /* exprx ::= LP expr */ +{ + yygotominor.yy490 = new SqliteExpr(); + yygotominor.yy490->initSubExpr(yymsp[0].minor.yy490); + objectForTokens = yygotominor.yy490; + parserContext->minorErrorBeforeNextToken("Syntax error"); + } + break; + case 295: /* exprx ::= expr not_opt IN ID_DB */ { yy_destructor(yypParser,199,&yymsp[-3].minor); } break; - case 295: /* exprx ::= expr not_opt IN nm DOT ID_TAB */ - case 296: /* exprx ::= ID_DB|ID_TAB|ID_COL|ID_FN */ yytestcase(yyruleno==296); + case 296: /* exprx ::= expr not_opt IN nm DOT ID_TAB */ + case 297: /* exprx ::= ID_DB|ID_TAB|ID_COL|ID_FN */ yytestcase(yyruleno==297); { yy_destructor(yypParser,199,&yymsp[-5].minor); yy_destructor(yypParser,177,&yymsp[-2].minor); } break; - case 298: /* exprx ::= nm DOT nm DOT ID_COL */ + case 299: /* exprx ::= nm DOT nm DOT ID_COL */ { yy_destructor(yypParser,177,&yymsp[-4].minor); yy_destructor(yypParser,177,&yymsp[-2].minor); } break; - case 299: /* exprx ::= expr COLLATE ID_COLLATE */ - case 300: /* exprx ::= RAISE LP raisetype COMMA ID_ERR_MSG RP */ yytestcase(yyruleno==300); + case 300: /* exprx ::= expr COLLATE ID_COLLATE */ + case 301: /* exprx ::= RAISE LP raisetype COMMA ID_ERR_MSG RP */ yytestcase(yyruleno==301); { yy_destructor(yypParser,199,&yymsp[-2].minor); } break; - case 302: /* expr ::= */ + case 303: /* expr ::= */ { yygotominor.yy490 = new SqliteExpr(); objectForTokens = yygotominor.yy490; parserContext->minorErrorAfterLastToken("Syntax error"); } break; - case 305: /* likeop ::= LIKE_KW|MATCH */ + case 306: /* likeop ::= LIKE_KW|MATCH */ {yygotominor.yy374 = new SqliteExpr::LikeOp(SqliteExpr::likeOp(yymsp[0].minor.yy0->value));} break; - case 306: /* case_exprlist ::= case_exprlist WHEN expr THEN expr */ + case 307: /* case_exprlist ::= case_exprlist WHEN expr THEN expr */ { yymsp[-4].minor.yy13->append(yymsp[-2].minor.yy490); yymsp[-4].minor.yy13->append(yymsp[0].minor.yy490); yygotominor.yy13 = yymsp[-4].minor.yy13; } break; - case 307: /* case_exprlist ::= WHEN expr THEN expr */ + case 308: /* case_exprlist ::= WHEN expr THEN expr */ { yygotominor.yy13 = new ParserExprList(); yygotominor.yy13->append(yymsp[-2].minor.yy490); yygotominor.yy13->append(yymsp[0].minor.yy490); } break; - case 314: /* nexprlist ::= nexprlist COMMA expr */ + case 315: /* nexprlist ::= nexprlist COMMA expr */ { yymsp[-2].minor.yy13->append(yymsp[0].minor.yy490); yygotominor.yy13 = yymsp[-2].minor.yy13; DONT_INHERIT_TOKENS("nexprlist"); } break; - case 315: /* nexprlist ::= exprx */ + case 316: /* nexprlist ::= exprx */ { yygotominor.yy13 = new ParserExprList(); yygotominor.yy13->append(yymsp[0].minor.yy490); } break; - case 316: /* cmd ::= CREATE uniqueflag INDEX ifnotexists nm dbnm ON nm LP idxlist RP where_opt */ + case 317: /* cmd ::= CREATE uniqueflag INDEX ifnotexists nm dbnm ON nm LP idxlist RP where_opt */ { yygotominor.yy399 = new SqliteCreateIndex( *(yymsp[-10].minor.yy237), @@ -4478,31 +4488,31 @@ static void yy_reduce( objectForTokens = yygotominor.yy399; } break; - case 317: /* cmd ::= CREATE uniqueflag INDEX ifnotexists nm dbnm ON ID_TAB */ + case 318: /* cmd ::= CREATE uniqueflag INDEX ifnotexists nm dbnm ON ID_TAB */ { yy_destructor(yypParser,177,&yymsp[-3].minor); } break; - case 322: /* idxlist_opt ::= */ + case 323: /* idxlist_opt ::= */ {yygotominor.yy139 = new ParserIndexedColumnList();} break; - case 323: /* idxlist_opt ::= LP idxlist RP */ + case 324: /* idxlist_opt ::= LP idxlist RP */ {yygotominor.yy139 = yymsp[-1].minor.yy139;} break; - case 324: /* idxlist ::= idxlist COMMA idxlist_single */ + case 325: /* idxlist ::= idxlist COMMA idxlist_single */ { yymsp[-2].minor.yy139->append(yymsp[0].minor.yy90); yygotominor.yy139 = yymsp[-2].minor.yy139; DONT_INHERIT_TOKENS("idxlist"); } break; - case 325: /* idxlist ::= idxlist_single */ + case 326: /* idxlist ::= idxlist_single */ { yygotominor.yy139 = new ParserIndexedColumnList(); yygotominor.yy139->append(yymsp[0].minor.yy90); } break; - case 326: /* idxlist_single ::= nm collate sortorder */ - case 327: /* idxlist_single ::= ID_COL */ yytestcase(yyruleno==327); + case 327: /* idxlist_single ::= nm collate sortorder */ + case 328: /* idxlist_single ::= ID_COL */ yytestcase(yyruleno==328); { SqliteIndexedColumn* obj = new SqliteIndexedColumn( @@ -4517,7 +4527,7 @@ static void yy_reduce( objectForTokens = yygotominor.yy90; } break; - case 331: /* cmd ::= DROP INDEX ifexists fullname */ + case 332: /* cmd ::= DROP INDEX ifexists fullname */ { yygotominor.yy399 = new SqliteDropIndex(*(yymsp[-1].minor.yy237), yymsp[0].minor.yy66->name1, yymsp[0].minor.yy66->name2); delete yymsp[-1].minor.yy237; @@ -4525,20 +4535,20 @@ static void yy_reduce( objectForTokens = yygotominor.yy399; } break; - case 334: /* cmd ::= VACUUM */ + case 335: /* cmd ::= VACUUM */ { yygotominor.yy399 = new SqliteVacuum(); objectForTokens = yygotominor.yy399; } break; - case 335: /* cmd ::= VACUUM nm */ + case 336: /* cmd ::= VACUUM nm */ { yygotominor.yy399 = new SqliteVacuum(*(yymsp[0].minor.yy211)); delete yymsp[0].minor.yy211; objectForTokens = yygotominor.yy399; } break; - case 336: /* cmd ::= PRAGMA nm dbnm */ + case 337: /* cmd ::= PRAGMA nm dbnm */ { yygotominor.yy399 = new SqlitePragma(*(yymsp[-1].minor.yy211), *(yymsp[0].minor.yy211)); delete yymsp[-1].minor.yy211; @@ -4546,8 +4556,8 @@ static void yy_reduce( objectForTokens = yygotominor.yy399; } break; - case 337: /* cmd ::= PRAGMA nm dbnm EQ nmnum */ - case 339: /* cmd ::= PRAGMA nm dbnm EQ minus_num */ yytestcase(yyruleno==339); + case 338: /* cmd ::= PRAGMA nm dbnm EQ nmnum */ + case 340: /* cmd ::= PRAGMA nm dbnm EQ minus_num */ yytestcase(yyruleno==340); { yygotominor.yy399 = new SqlitePragma(*(yymsp[-3].minor.yy211), *(yymsp[-2].minor.yy211), *(yymsp[0].minor.yy21), true); delete yymsp[-3].minor.yy211; @@ -4556,8 +4566,8 @@ static void yy_reduce( objectForTokens = yygotominor.yy399; } break; - case 338: /* cmd ::= PRAGMA nm dbnm LP nmnum RP */ - case 340: /* cmd ::= PRAGMA nm dbnm LP minus_num RP */ yytestcase(yyruleno==340); + case 339: /* cmd ::= PRAGMA nm dbnm LP nmnum RP */ + case 341: /* cmd ::= PRAGMA nm dbnm LP minus_num RP */ yytestcase(yyruleno==341); { yygotominor.yy399 = new SqlitePragma(*(yymsp[-4].minor.yy211), *(yymsp[-3].minor.yy211), *(yymsp[-1].minor.yy21), false); delete yymsp[-4].minor.yy211; @@ -4566,13 +4576,13 @@ static void yy_reduce( objectForTokens = yygotominor.yy399; } break; - case 344: /* nmnum ::= nm */ + case 345: /* nmnum ::= nm */ { yygotominor.yy21 = new QVariant(*(yymsp[0].minor.yy211)); delete yymsp[0].minor.yy211; } break; - case 350: /* minus_num ::= MINUS number */ + case 351: /* minus_num ::= MINUS number */ { if (yymsp[0].minor.yy21->type() == QVariant::Double) *(yymsp[0].minor.yy21) = -(yymsp[0].minor.yy21->toDouble()); @@ -4584,13 +4594,13 @@ static void yy_reduce( yygotominor.yy21 = yymsp[0].minor.yy21; } break; - case 351: /* number ::= INTEGER */ + case 352: /* number ::= INTEGER */ {yygotominor.yy21 = new QVariant(QVariant(yymsp[0].minor.yy0->value).toLongLong());} break; - case 352: /* number ::= FLOAT */ + case 353: /* number ::= FLOAT */ {yygotominor.yy21 = new QVariant(QVariant(yymsp[0].minor.yy0->value).toDouble());} break; - case 353: /* cmd ::= CREATE temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON nm foreach_clause when_clause BEGIN trigger_cmd_list END */ + case 354: /* cmd ::= CREATE temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON nm foreach_clause when_clause BEGIN trigger_cmd_list END */ { yygotominor.yy399 = new SqliteCreateTrigger( *(yymsp[-13].minor.yy376), @@ -4616,7 +4626,7 @@ static void yy_reduce( objectForTokens = yygotominor.yy399; } break; - case 354: /* cmd ::= CREATE temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON nm foreach_clause when_clause */ + case 355: /* cmd ::= CREATE temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON nm foreach_clause when_clause */ { QList CL; @@ -4644,7 +4654,7 @@ static void yy_reduce( parserContext->minorErrorAfterLastToken("Syntax error"); } break; - case 355: /* cmd ::= CREATE temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON nm foreach_clause when_clause BEGIN trigger_cmd_list */ + case 356: /* cmd ::= CREATE temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON nm foreach_clause when_clause BEGIN trigger_cmd_list */ { yygotominor.yy399 = new SqliteCreateTrigger( *(yymsp[-12].minor.yy376), @@ -4671,79 +4681,79 @@ static void yy_reduce( parserContext->minorErrorAfterLastToken("Syntax error"); } break; - case 356: /* cmd ::= CREATE temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON ID_TAB */ + case 357: /* cmd ::= CREATE temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON ID_TAB */ { yy_destructor(yypParser,179,&yymsp[-8].minor); yy_destructor(yypParser,177,&yymsp[-5].minor); yy_destructor(yypParser,262,&yymsp[-3].minor); yy_destructor(yypParser,263,&yymsp[-2].minor); } break; - case 359: /* trigger_time ::= BEFORE */ + case 360: /* trigger_time ::= BEFORE */ {yygotominor.yy152 = new SqliteCreateTrigger::Time(SqliteCreateTrigger::Time::BEFORE);} break; - case 360: /* trigger_time ::= AFTER */ + case 361: /* trigger_time ::= AFTER */ {yygotominor.yy152 = new SqliteCreateTrigger::Time(SqliteCreateTrigger::Time::AFTER);} break; - case 361: /* trigger_time ::= INSTEAD OF */ + case 362: /* trigger_time ::= INSTEAD OF */ {yygotominor.yy152 = new SqliteCreateTrigger::Time(SqliteCreateTrigger::Time::INSTEAD_OF);} break; - case 362: /* trigger_time ::= */ + case 363: /* trigger_time ::= */ {yygotominor.yy152 = new SqliteCreateTrigger::Time(SqliteCreateTrigger::Time::null);} break; - case 363: /* trigger_event ::= DELETE */ + case 364: /* trigger_event ::= DELETE */ { yygotominor.yy309 = new SqliteCreateTrigger::Event(SqliteCreateTrigger::Event::DELETE); objectForTokens = yygotominor.yy309; } break; - case 364: /* trigger_event ::= INSERT */ + case 365: /* trigger_event ::= INSERT */ { yygotominor.yy309 = new SqliteCreateTrigger::Event(SqliteCreateTrigger::Event::INSERT); objectForTokens = yygotominor.yy309; } break; - case 365: /* trigger_event ::= UPDATE */ + case 366: /* trigger_event ::= UPDATE */ { yygotominor.yy309 = new SqliteCreateTrigger::Event(SqliteCreateTrigger::Event::UPDATE); objectForTokens = yygotominor.yy309; } break; - case 366: /* trigger_event ::= UPDATE OF inscollist */ + case 367: /* trigger_event ::= UPDATE OF inscollist */ { yygotominor.yy309 = new SqliteCreateTrigger::Event(*(yymsp[0].minor.yy445)); delete yymsp[0].minor.yy445; objectForTokens = yygotominor.yy309; } break; - case 367: /* foreach_clause ::= */ + case 368: /* foreach_clause ::= */ {yygotominor.yy409 = new SqliteCreateTrigger::Scope(SqliteCreateTrigger::Scope::null);} break; - case 368: /* foreach_clause ::= FOR EACH ROW */ + case 369: /* foreach_clause ::= FOR EACH ROW */ {yygotominor.yy409 = new SqliteCreateTrigger::Scope(SqliteCreateTrigger::Scope::FOR_EACH_ROW);} break; - case 371: /* trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI */ + case 372: /* trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI */ { yymsp[-2].minor.yy214->append(yymsp[-1].minor.yy399); yygotominor.yy214 = yymsp[-2].minor.yy214; DONT_INHERIT_TOKENS("trigger_cmd_list"); } break; - case 372: /* trigger_cmd_list ::= trigger_cmd SEMI */ + case 373: /* trigger_cmd_list ::= trigger_cmd SEMI */ { yygotominor.yy214 = new ParserQueryList(); yygotominor.yy214->append(yymsp[-1].minor.yy399); } break; - case 373: /* trigger_cmd_list ::= SEMI */ + case 374: /* trigger_cmd_list ::= SEMI */ { yygotominor.yy214 = new ParserQueryList(); parserContext->minorErrorAfterLastToken("Syntax error"); } break; - case 378: /* raisetype ::= ROLLBACK|ABORT|FAIL */ + case 379: /* raisetype ::= ROLLBACK|ABORT|FAIL */ {yygotominor.yy0 = yymsp[0].minor.yy0;} break; - case 379: /* cmd ::= DROP TRIGGER ifexists fullname */ + case 380: /* cmd ::= DROP TRIGGER ifexists fullname */ { yygotominor.yy399 = new SqliteDropTrigger(*(yymsp[-1].minor.yy237), yymsp[0].minor.yy66->name1, yymsp[0].minor.yy66->name2); delete yymsp[-1].minor.yy237; @@ -4751,25 +4761,25 @@ static void yy_reduce( objectForTokens = yygotominor.yy399; } break; - case 382: /* cmd ::= ATTACH database_kw_opt expr AS expr key_opt */ + case 383: /* cmd ::= ATTACH database_kw_opt expr AS expr key_opt */ { yygotominor.yy399 = new SqliteAttach(*(yymsp[-4].minor.yy237), yymsp[-3].minor.yy490, yymsp[-1].minor.yy490, yymsp[0].minor.yy490); delete yymsp[-4].minor.yy237; objectForTokens = yygotominor.yy399; } break; - case 383: /* cmd ::= DETACH database_kw_opt expr */ + case 384: /* cmd ::= DETACH database_kw_opt expr */ { yygotominor.yy399 = new SqliteDetach(*(yymsp[-1].minor.yy237), yymsp[0].minor.yy490); delete yymsp[-1].minor.yy237; objectForTokens = yygotominor.yy399; } break; - case 388: /* cmd ::= REINDEX */ + case 389: /* cmd ::= REINDEX */ {yygotominor.yy399 = new SqliteReindex();} break; - case 389: /* cmd ::= REINDEX nm dbnm */ - case 390: /* cmd ::= REINDEX ID_COLLATE */ yytestcase(yyruleno==390); + case 390: /* cmd ::= REINDEX nm dbnm */ + case 391: /* cmd ::= REINDEX ID_COLLATE */ yytestcase(yyruleno==391); { yygotominor.yy399 = new SqliteReindex(*(yymsp[-1].minor.yy211), *(yymsp[0].minor.yy211)); delete yymsp[-1].minor.yy211; @@ -4777,13 +4787,13 @@ static void yy_reduce( objectForTokens = yygotominor.yy399; } break; - case 393: /* cmd ::= ANALYZE */ + case 394: /* cmd ::= ANALYZE */ { yygotominor.yy399 = new SqliteAnalyze(); objectForTokens = yygotominor.yy399; } break; - case 394: /* cmd ::= ANALYZE nm dbnm */ + case 395: /* cmd ::= ANALYZE nm dbnm */ { yygotominor.yy399 = new SqliteAnalyze(*(yymsp[-1].minor.yy211), *(yymsp[0].minor.yy211)); delete yymsp[-1].minor.yy211; @@ -4791,7 +4801,7 @@ static void yy_reduce( objectForTokens = yygotominor.yy399; } break; - case 397: /* cmd ::= ALTER TABLE fullname RENAME TO nm */ + case 398: /* cmd ::= ALTER TABLE fullname RENAME TO nm */ { yygotominor.yy399 = new SqliteAlterTable( yymsp[-3].minor.yy66->name1, @@ -4803,7 +4813,7 @@ static void yy_reduce( objectForTokens = yygotominor.yy399; } break; - case 398: /* cmd ::= ALTER TABLE fullname ADD kwcolumn_opt column */ + case 399: /* cmd ::= ALTER TABLE fullname ADD kwcolumn_opt column */ { yygotominor.yy399 = new SqliteAlterTable( yymsp[-3].minor.yy66->name1, @@ -4816,11 +4826,11 @@ static void yy_reduce( objectForTokens = yygotominor.yy399; } break; - case 399: /* cmd ::= ALTER TABLE fullname RENAME TO ID_TAB_NEW */ + case 400: /* cmd ::= ALTER TABLE fullname RENAME TO ID_TAB_NEW */ { yy_destructor(yypParser,181,&yymsp[-3].minor); } break; - case 405: /* create_vtab ::= CREATE VIRTUAL TABLE ifnotexists nm dbnm USING nm */ + case 406: /* create_vtab ::= CREATE VIRTUAL TABLE ifnotexists nm dbnm USING nm */ { yygotominor.yy399 = new SqliteCreateVirtualTable( *(yymsp[-4].minor.yy237), @@ -4835,7 +4845,7 @@ static void yy_reduce( objectForTokens = yygotominor.yy399; } break; - case 406: /* create_vtab ::= CREATE VIRTUAL TABLE ifnotexists nm dbnm USING nm LP vtabarglist RP */ + case 407: /* create_vtab ::= CREATE VIRTUAL TABLE ifnotexists nm dbnm USING nm LP vtabarglist RP */ { yygotominor.yy399 = new SqliteCreateVirtualTable( *(yymsp[-7].minor.yy237), @@ -4852,14 +4862,14 @@ static void yy_reduce( objectForTokens = yygotominor.yy399; } break; - case 409: /* vtabarglist ::= vtabarg */ + case 410: /* vtabarglist ::= vtabarg */ { yygotominor.yy445 = new ParserStringList(); yygotominor.yy445->append((yymsp[0].minor.yy211)->mid(1)); // mid(1) to skip the first whitespace added in vtabarg delete yymsp[0].minor.yy211; } break; - case 410: /* vtabarglist ::= vtabarglist COMMA vtabarg */ + case 411: /* vtabarglist ::= vtabarglist COMMA vtabarg */ { yymsp[-2].minor.yy445->append((yymsp[0].minor.yy211)->mid(1)); // mid(1) to skip the first whitespace added in vtabarg yygotominor.yy445 = yymsp[-2].minor.yy445; @@ -4867,19 +4877,19 @@ static void yy_reduce( DONT_INHERIT_TOKENS("vtabarglist"); } break; - case 412: /* vtabarg ::= vtabarg vtabargtoken */ + case 413: /* vtabarg ::= vtabarg vtabargtoken */ { yymsp[-1].minor.yy211->append(" "+ *(yymsp[0].minor.yy211)); yygotominor.yy211 = yymsp[-1].minor.yy211; delete yymsp[0].minor.yy211; } break; - case 413: /* vtabargtoken ::= ANY */ + case 414: /* vtabargtoken ::= ANY */ { yygotominor.yy211 = new QString(yymsp[0].minor.yy0->value); } break; - case 414: /* vtabargtoken ::= LP anylist RP */ + case 415: /* vtabargtoken ::= LP anylist RP */ { yygotominor.yy211 = new QString("("); yygotominor.yy211->append(*(yymsp[-1].minor.yy211)); @@ -4887,7 +4897,7 @@ static void yy_reduce( delete yymsp[-1].minor.yy211; } break; - case 416: /* anylist ::= anylist LP anylist RP */ + case 417: /* anylist ::= anylist LP anylist RP */ { yygotominor.yy211 = yymsp[-3].minor.yy211; yygotominor.yy211->append("("); @@ -4897,37 +4907,37 @@ static void yy_reduce( DONT_INHERIT_TOKENS("anylist"); } break; - case 417: /* anylist ::= anylist ANY */ + case 418: /* anylist ::= anylist ANY */ { yygotominor.yy211 = yymsp[-1].minor.yy211; yygotominor.yy211->append(yymsp[0].minor.yy0->value); DONT_INHERIT_TOKENS("anylist"); } break; - case 418: /* with ::= */ + case 419: /* with ::= */ {yygotominor.yy367 = nullptr;} break; - case 419: /* with ::= WITH wqlist */ + case 420: /* with ::= WITH wqlist */ { yygotominor.yy367 = yymsp[0].minor.yy367; objectForTokens = yygotominor.yy367; } break; - case 420: /* with ::= WITH RECURSIVE wqlist */ + case 421: /* with ::= WITH RECURSIVE wqlist */ { yygotominor.yy367 = yymsp[0].minor.yy367; yygotominor.yy367->recursive = true; objectForTokens = yygotominor.yy367; } break; - case 421: /* wqlist ::= nm idxlist_opt AS LP select RP */ + case 422: /* wqlist ::= nm idxlist_opt AS LP select RP */ { yygotominor.yy367 = SqliteWith::append(*(yymsp[-5].minor.yy211), *(yymsp[-4].minor.yy139), yymsp[-1].minor.yy123); delete yymsp[-5].minor.yy211; delete yymsp[-4].minor.yy139; } break; - case 422: /* wqlist ::= wqlist COMMA nm idxlist_opt AS LP select RP */ + case 423: /* wqlist ::= wqlist COMMA nm idxlist_opt AS LP select RP */ { yygotominor.yy367 = SqliteWith::append(yymsp[-7].minor.yy367, *(yymsp[-5].minor.yy211), *(yymsp[-4].minor.yy139), yymsp[-1].minor.yy123); delete yymsp[-5].minor.yy211; @@ -4935,7 +4945,7 @@ static void yy_reduce( DONT_INHERIT_TOKENS("wqlist"); } break; - case 423: /* wqlist ::= ID_TAB_NEW */ + case 424: /* wqlist ::= ID_TAB_NEW */ { parserContext->minorErrorBeforeNextToken("Syntax error"); yygotominor.yy367 = new SqliteWith(); diff --git a/SQLiteStudio3/coreSQLiteStudio/parser/sqlite3_parse.y b/SQLiteStudio3/coreSQLiteStudio/parser/sqlite3_parse.y index a249f6e..65a4dd7 100644 --- a/SQLiteStudio3/coreSQLiteStudio/parser/sqlite3_parse.y +++ b/SQLiteStudio3/coreSQLiteStudio/parser/sqlite3_parse.y @@ -1738,7 +1738,12 @@ exprx(X) ::= expr(E) not_opt(N) IN LP objectForTokens = X; parserContext->minorErrorBeforeNextToken("Syntax error"); } - +exprx(X) ::= LP expr(E). { + X = new SqliteExpr(); + X->initSubExpr(E); + objectForTokens = X; + parserContext->minorErrorBeforeNextToken("Syntax error"); + } exprx ::= expr not_opt IN ID_DB. [IN] {} exprx ::= expr not_opt IN nm DOT ID_TAB. [IN] {} diff --git a/SQLiteStudio3/coreSQLiteStudio/plugins/exportplugin.h b/SQLiteStudio3/coreSQLiteStudio/plugins/exportplugin.h index 06aded7..8c269e2 100644 --- a/SQLiteStudio3/coreSQLiteStudio/plugins/exportplugin.h +++ b/SQLiteStudio3/coreSQLiteStudio/plugins/exportplugin.h @@ -224,6 +224,7 @@ class ExportPlugin : virtual public Plugin * @param database "Attach" name of the database that the table belongs to. Can be "main", "temp", or any attach name. * @param table Name of the table to export. * @param columnNames Name of columns in the table, in order they will appear in the rows passed to exportTableRow(). + * This will be empty if data is not being exported. This is different than for exportTable(), where columnNames are always present. * @param ddl The DDL of the table. * @param createTable Table DDL parsed into an object. * @param providedData All data entries requested by the plugin in the return value of getProviderFlags(). diff --git a/SQLiteStudio3/coreSQLiteStudio/plugins/genericexportplugin.h b/SQLiteStudio3/coreSQLiteStudio/plugins/genericexportplugin.h index 1719baa..0edbde6 100644 --- a/SQLiteStudio3/coreSQLiteStudio/plugins/genericexportplugin.h +++ b/SQLiteStudio3/coreSQLiteStudio/plugins/genericexportplugin.h @@ -6,6 +6,8 @@ class API_EXPORT GenericExportPlugin : virtual public GenericPlugin, public ExportPlugin { + Q_OBJECT + public: bool initBeforeExport(Db* db, QIODevice* output, const ExportManager::StandardExportConfig& config); ExportManager::ExportModes getSupportedModes() const; diff --git a/SQLiteStudio3/coreSQLiteStudio/plugins/populateconstant.ui b/SQLiteStudio3/coreSQLiteStudio/plugins/populateconstant.ui index 39e80e1..ddd1131 100644 --- a/SQLiteStudio3/coreSQLiteStudio/plugins/populateconstant.ui +++ b/SQLiteStudio3/coreSQLiteStudio/plugins/populateconstant.ui @@ -11,7 +11,7 @@ - Form + Form @@ -23,7 +23,7 @@ - PopulateConstant.Value + PopulateConstant.Value diff --git a/SQLiteStudio3/coreSQLiteStudio/plugins/populatedictionary.ui b/SQLiteStudio3/coreSQLiteStudio/plugins/populatedictionary.ui index f99491f..6a28476 100644 --- a/SQLiteStudio3/coreSQLiteStudio/plugins/populatedictionary.ui +++ b/SQLiteStudio3/coreSQLiteStudio/plugins/populatedictionary.ui @@ -11,7 +11,7 @@ - Form + Form @@ -23,7 +23,7 @@ - PopulateDictionary.File + PopulateDictionary.File Pick dictionary file @@ -41,12 +41,12 @@ - - PopulateDictionary.Lines - Whitespace + + PopulateDictionary.Lines + false @@ -54,12 +54,12 @@ - - PopulateDictionary.Lines - Line break + + PopulateDictionary.Lines + true @@ -76,12 +76,12 @@ - - PopulateDictionary.Random - Ordered + + PopulateDictionary.Random + false @@ -89,12 +89,12 @@ - - PopulateDictionary.Random - Randomly + + PopulateDictionary.Random + true diff --git a/SQLiteStudio3/coreSQLiteStudio/plugins/populaterandom.ui b/SQLiteStudio3/coreSQLiteStudio/plugins/populaterandom.ui index fb304ea..4e7853e 100644 --- a/SQLiteStudio3/coreSQLiteStudio/plugins/populaterandom.ui +++ b/SQLiteStudio3/coreSQLiteStudio/plugins/populaterandom.ui @@ -11,7 +11,7 @@ - Form + Form @@ -22,12 +22,12 @@ - - PopulateRandom.Prefix - No prefix + + PopulateRandom.Prefix + @@ -41,15 +41,15 @@ - - PopulateRandom.MinValue - -999999999 999999999 + + PopulateRandom.MinValue + @@ -63,9 +63,6 @@ - - PopulateRandom.MaxValue - -999999999 @@ -75,6 +72,9 @@ 999999999 + + PopulateRandom.MaxValue + @@ -88,12 +88,12 @@ - - PopulateRandom.Suffix - No suffix + + PopulateRandom.Suffix + diff --git a/SQLiteStudio3/coreSQLiteStudio/plugins/populaterandomtext.ui b/SQLiteStudio3/coreSQLiteStudio/plugins/populaterandomtext.ui index 28febde..00ff1e5 100644 --- a/SQLiteStudio3/coreSQLiteStudio/plugins/populaterandomtext.ui +++ b/SQLiteStudio3/coreSQLiteStudio/plugins/populaterandomtext.ui @@ -11,20 +11,20 @@ - Form + Form - - PopulateRandomText.UseCustomSets - Use characters from common sets: true + + PopulateRandomText.UseCustomSets + false @@ -38,12 +38,12 @@ - - PopulateRandomText.MinLength - 999999999 + + PopulateRandomText.MinLength + @@ -63,12 +63,12 @@ Letters from a to z. - - PopulateRandomText.IncludeAlpha - Alpha + + PopulateRandomText.IncludeAlpha + @@ -76,12 +76,12 @@ Numbers from 0 to 9. - - PopulateRandomText.IncludeNumeric - Numeric + + PopulateRandomText.IncludeNumeric + @@ -89,12 +89,12 @@ A whitespace, a tab and a new line character. - - PopulateRandomText.IncludeWhitespace - Whitespace + + PopulateRandomText.IncludeWhitespace + @@ -102,12 +102,12 @@ Includes all above and all others. - - PopulateRandomText.IncludeBinary - Binary + + PopulateRandomText.IncludeBinary + @@ -115,12 +115,12 @@ - - PopulateRandomText.UseCustomSets - Use characters from my custom set: + + PopulateRandomText.UseCustomSets + true @@ -134,12 +134,12 @@ - - PopulateRandomText.MaxLength - 999999999 + + PopulateRandomText.MaxLength + @@ -160,7 +160,7 @@ If you type some character multiple times, it's more likely to be used. - PopulateRandomText.CustomCharacters + PopulateRandomText.CustomCharacters diff --git a/SQLiteStudio3/coreSQLiteStudio/plugins/populatescript.ui b/SQLiteStudio3/coreSQLiteStudio/plugins/populatescript.ui index 8d37994..7e530f5 100644 --- a/SQLiteStudio3/coreSQLiteStudio/plugins/populatescript.ui +++ b/SQLiteStudio3/coreSQLiteStudio/plugins/populatescript.ui @@ -11,7 +11,7 @@ - Form + Form @@ -29,7 +29,7 @@ - PopulateScript.InitCode + PopulateScript.InitCode true @@ -48,7 +48,7 @@ - PopulateScript.Code + PopulateScript.Code true @@ -73,7 +73,7 @@ - PopulateScript.Language + PopulateScript.Language true @@ -92,13 +92,13 @@ - ... + ... - http://sqlitestudio.pl/wiki/index.php/Official_plugins#Script_.28built-in.29 + http://sqlitestudio.pl/wiki/index.php/Official_plugins#Script_.28built-in.29 - help + help diff --git a/SQLiteStudio3/coreSQLiteStudio/plugins/populatesequence.ui b/SQLiteStudio3/coreSQLiteStudio/plugins/populatesequence.ui index 231af85..20c7064 100644 --- a/SQLiteStudio3/coreSQLiteStudio/plugins/populatesequence.ui +++ b/SQLiteStudio3/coreSQLiteStudio/plugins/populatesequence.ui @@ -11,20 +11,20 @@ - Form + Form - - PopulateSequence.StartValue - -99999999 99999999 + + PopulateSequence.StartValue + @@ -36,9 +36,6 @@ - - PopulateSequence.Step - -999999 @@ -48,6 +45,9 @@ 1 + + PopulateSequence.Step + diff --git a/SQLiteStudio3/coreSQLiteStudio/populateworker.cpp b/SQLiteStudio3/coreSQLiteStudio/populateworker.cpp index 71ab9a4..0b08526 100644 --- a/SQLiteStudio3/coreSQLiteStudio/populateworker.cpp +++ b/SQLiteStudio3/coreSQLiteStudio/populateworker.cpp @@ -48,12 +48,7 @@ void PopulateWorker::run() args.clear(); for (PopulateEngine* engine : engines) - { args << engine->nextValue(nextValueError); - db->rollback(); - emit finished(false); - return; - } query->setArgs(args); if (!query->execute()) diff --git a/SQLiteStudio3/coreSQLiteStudio/schemaresolver.cpp b/SQLiteStudio3/coreSQLiteStudio/schemaresolver.cpp index a1ceca5..f14d23d 100644 --- a/SQLiteStudio3/coreSQLiteStudio/schemaresolver.cpp +++ b/SQLiteStudio3/coreSQLiteStudio/schemaresolver.cpp @@ -306,7 +306,7 @@ QString SchemaResolver::getObjectDdl(const QString &database, const QString &nam // Validate query results if (!results.isValid() || results.isNull()) { - qDebug() << "Could not get object's DDL:" << database << "." << name; + qDebug() << "Could not get object's DDL:" << dbName << "." << name; return QString::null; } @@ -458,9 +458,10 @@ QStringList SchemaResolver::getAllObjects(const QString& database) return resList; } -QString SchemaResolver::getUniqueName(const QString& database, const QString& namePrefix) +QString SchemaResolver::getUniqueName(const QString& database, const QString& namePrefix, const QStringList& forbiddenNames) { QStringList allObjects = getAllObjects(database); + allObjects += forbiddenNames; QString baseName = namePrefix; QString name = baseName; for (int i = 0; allObjects.contains(name); i++) @@ -469,9 +470,9 @@ QString SchemaResolver::getUniqueName(const QString& database, const QString& na return name; } -QString SchemaResolver::getUniqueName(const QString& namePrefix) +QString SchemaResolver::getUniqueName(const QString& namePrefix, const QStringList& forbiddenNames) { - return getUniqueName("main", namePrefix); + return getUniqueName("main", namePrefix, forbiddenNames); } QStringList SchemaResolver::getFkReferencingTables(const QString& table) diff --git a/SQLiteStudio3/coreSQLiteStudio/schemaresolver.h b/SQLiteStudio3/coreSQLiteStudio/schemaresolver.h index e1a8d5d..5316f5a 100644 --- a/SQLiteStudio3/coreSQLiteStudio/schemaresolver.h +++ b/SQLiteStudio3/coreSQLiteStudio/schemaresolver.h @@ -52,8 +52,8 @@ class API_EXPORT SchemaResolver QStringList getObjects(const QString& database, const QString& type); QStringList getAllObjects(); QStringList getAllObjects(const QString& database); - QString getUniqueName(const QString& database, const QString& namePrefix); - QString getUniqueName(const QString& namePrefix = QString::null); + QString getUniqueName(const QString& database, const QString& namePrefix, const QStringList& forbiddenNames = QStringList()); + QString getUniqueName(const QString& namePrefix = QString::null, const QStringList& forbiddenNames = QStringList()); QStringList getFkReferencingTables(const QString& table); QStringList getFkReferencingTables(const QString& database, const QString& table); diff --git a/SQLiteStudio3/coreSQLiteStudio/services/config.h b/SQLiteStudio3/coreSQLiteStudio/services/config.h index 5a3f594..6e1fd95 100644 --- a/SQLiteStudio3/coreSQLiteStudio/services/config.h +++ b/SQLiteStudio3/coreSQLiteStudio/services/config.h @@ -23,6 +23,7 @@ CFG_CATEGORIES(Core, CFG_ENTRY(QString, LoadedPlugins, "") CFG_ENTRY(QVariantHash, ActiveCodeFormatter, QVariantHash()) CFG_ENTRY(bool, CheckUpdatesOnStartup, true) + CFG_ENTRY(QString, Language, "en") ) CFG_CATEGORY(Console, CFG_ENTRY(int, HistorySize, 100) diff --git a/SQLiteStudio3/coreSQLiteStudio/services/exportmanager.cpp b/SQLiteStudio3/coreSQLiteStudio/services/exportmanager.cpp index 6f916bc..c9b272d 100644 --- a/SQLiteStudio3/coreSQLiteStudio/services/exportmanager.cpp +++ b/SQLiteStudio3/coreSQLiteStudio/services/exportmanager.cpp @@ -221,7 +221,7 @@ void ExportManager::finalizeExport(bool result, QIODevice* output) else if (!config->outputFileName.isEmpty()) notifyInfo(tr("Export to the file '%1' was successful.").arg(config->outputFileName)); else - notifyInfo(tr("Export to was successful.").arg(config->outputFileName)); + notifyInfo(tr("Export was successful.")); emit exportSuccessful(); } diff --git a/SQLiteStudio3/coreSQLiteStudio/services/extralicensemanager.cpp b/SQLiteStudio3/coreSQLiteStudio/services/extralicensemanager.cpp index 23fb513..2bdc712 100644 --- a/SQLiteStudio3/coreSQLiteStudio/services/extralicensemanager.cpp +++ b/SQLiteStudio3/coreSQLiteStudio/services/extralicensemanager.cpp @@ -1,16 +1,63 @@ #include "extralicensemanager.h" +#include +#include ExtraLicenseManager::ExtraLicenseManager() { } +ExtraLicenseManager::~ExtraLicenseManager() +{ + for (License* lic : licenses.values()) + delete lic; + + licenses.clear(); +} + bool ExtraLicenseManager::addLicense(const QString& title, const QString& filePath) { - if (licenses.contains(title)) + return addLicense(title, filePath, Type::FILE); +} + +bool ExtraLicenseManager::addLicenseContents(const QString& title, const QString& contents) +{ + return addLicense(title, contents, Type::CONTENTS); +} + +void ExtraLicenseManager::setViolatedLicense(const QString& title, const QString& violationMessage) +{ + if (!licenses.contains(title)) + return; + + License* lic = licenses[title]; + lic->violated = true; + lic->violationMessage = violationMessage; +} + +void ExtraLicenseManager::unsetViolatedLicense(const QString& title) +{ + if (!licenses.contains(title)) + return; + + License* lic = licenses[title]; + lic->violated = false; + lic->violationMessage = QString(); +} + +bool ExtraLicenseManager::isViolatedLicense(const QString& title) +{ + if (!licenses.contains(title)) return false; - licenses[title] = filePath; - return true; + return licenses[title]->violated; +} + +QString ExtraLicenseManager::getViolationMessage(const QString& title) +{ + if (!licenses.contains(title)) + return QString::null; + + return licenses[title]->violationMessage; } bool ExtraLicenseManager::removeLicense(const QString& title) @@ -18,11 +65,53 @@ bool ExtraLicenseManager::removeLicense(const QString& title) if (!licenses.contains(title)) return false; + delete licenses[title]; licenses.remove(title); return true; } -const QHash&ExtraLicenseManager::getLicenses() const +QHash ExtraLicenseManager::getLicensesContents() const +{ + QHash result; + License* lic = nullptr; + for (const QString& title : licenses.keys()) + { + lic = licenses[title]; + switch (lic->type) + { + case Type::CONTENTS: + result[title] = lic->data; + break; + case Type::FILE: + result[title] = readLicenseFile(lic->data); + break; + } + } + return result; +} + +bool ExtraLicenseManager::addLicense(const QString& title, const QString& data, ExtraLicenseManager::Type type) +{ + if (licenses.contains(title)) + return false; + + License* lic = new License; + lic->title = title; + lic->data = data; + lic->type = type; + licenses[title] = lic; + return true; +} + +QString ExtraLicenseManager::readLicenseFile(const QString& path) const { - return licenses; + QFile file(path); + if (!file.open(QIODevice::ReadOnly)) + { + qCritical() << "Error opening" << file.fileName(); + return QString::null; + } + QString contents = QString::fromLatin1(file.readAll()); + file.close(); + return contents; } diff --git a/SQLiteStudio3/coreSQLiteStudio/services/extralicensemanager.h b/SQLiteStudio3/coreSQLiteStudio/services/extralicensemanager.h index fcf1203..c8da6f9 100644 --- a/SQLiteStudio3/coreSQLiteStudio/services/extralicensemanager.h +++ b/SQLiteStudio3/coreSQLiteStudio/services/extralicensemanager.h @@ -8,14 +8,38 @@ class API_EXPORT ExtraLicenseManager { public: + enum class Type + { + FILE, + CONTENTS + }; + + struct License + { + QString title; + QString data; + Type type; + QString violationMessage; + bool violated = false; + }; + ExtraLicenseManager(); + virtual ~ExtraLicenseManager(); bool addLicense(const QString& title, const QString& filePath); + bool addLicenseContents(const QString& title, const QString& contents); + void setViolatedLicense(const QString& title, const QString& violationMessage); + void unsetViolatedLicense(const QString& title); + bool isViolatedLicense(const QString& title); + QString getViolationMessage(const QString& title); bool removeLicense(const QString& title); - const QHash& getLicenses() const; + QHash getLicensesContents() const; private: - QHash licenses; + bool addLicense(const QString& title, const QString& data, Type type); + QString readLicenseFile(const QString& path) const; + + QHash licenses; }; #endif // EXTRALISENCEMANAGER_H diff --git a/SQLiteStudio3/coreSQLiteStudio/services/impl/configimpl.cpp b/SQLiteStudio3/coreSQLiteStudio/services/impl/configimpl.cpp index e210f01..bbfec32 100644 --- a/SQLiteStudio3/coreSQLiteStudio/services/impl/configimpl.cpp +++ b/SQLiteStudio3/coreSQLiteStudio/services/impl/configimpl.cpp @@ -278,13 +278,14 @@ qint64 ConfigImpl::addSqlHistory(const QString& sql, const QString& dbName, int sqlHistoryId = 0; } + sqlHistoryMutex.lock(); QtConcurrent::run(this, &ConfigImpl::asyncAddSqlHistory, sqlHistoryId, sql, dbName, timeSpentMillis, rowsAffected); - sqlHistoryId++; - return sqlHistoryId; + return sqlHistoryId++; } void ConfigImpl::updateSqlHistory(qint64 id, const QString& sql, const QString& dbName, int timeSpentMillis, int rowsAffected) { + sqlHistoryMutex.lock(); QtConcurrent::run(this, &ConfigImpl::asyncUpdateSqlHistory, id, sql, dbName, timeSpentMillis, rowsAffected); } @@ -638,6 +639,7 @@ void ConfigImpl::asyncAddSqlHistory(qint64 id, const QString& sql, const QString { qDebug() << "Error adding SQL history:" << results->getErrorText(); db->rollback(); + sqlHistoryMutex.unlock(); return; } @@ -657,6 +659,7 @@ void ConfigImpl::asyncAddSqlHistory(qint64 id, const QString& sql, const QString db->commit(); emit sqlHistoryRefreshNeeded(); + sqlHistoryMutex.unlock(); } void ConfigImpl::asyncUpdateSqlHistory(qint64 id, const QString& sql, const QString& dbName, int timeSpentMillis, int rowsAffected) @@ -665,6 +668,7 @@ void ConfigImpl::asyncUpdateSqlHistory(qint64 id, const QString& sql, const QStr {dbName, timeSpentMillis, rowsAffected, sql, id}); emit sqlHistoryRefreshNeeded(); + sqlHistoryMutex.unlock(); } void ConfigImpl::asyncClearSqlHistory() diff --git a/SQLiteStudio3/coreSQLiteStudio/services/impl/configimpl.h b/SQLiteStudio3/coreSQLiteStudio/services/impl/configimpl.h index ec32e8d..63d1e1f 100644 --- a/SQLiteStudio3/coreSQLiteStudio/services/impl/configimpl.h +++ b/SQLiteStudio3/coreSQLiteStudio/services/impl/configimpl.h @@ -4,6 +4,7 @@ #include "coreSQLiteStudio_global.h" #include "services/config.h" #include "db/sqlquery.h" +#include class AsyncConfigHandler; class SqlHistoryModel; @@ -118,6 +119,7 @@ class API_EXPORT ConfigImpl : public Config bool massSaving = false; SqlHistoryModel* sqlHistoryModel = nullptr; DdlHistoryModel* ddlHistoryModel = nullptr; + QMutex sqlHistoryMutex; public slots: void refreshDdlHistory(); diff --git a/SQLiteStudio3/coreSQLiteStudio/services/impl/pluginmanagerimpl.cpp b/SQLiteStudio3/coreSQLiteStudio/services/impl/pluginmanagerimpl.cpp index 5d7a517..c3bc581 100644 --- a/SQLiteStudio3/coreSQLiteStudio/services/impl/pluginmanagerimpl.cpp +++ b/SQLiteStudio3/coreSQLiteStudio/services/impl/pluginmanagerimpl.cpp @@ -3,6 +3,7 @@ #include "plugins/genericplugin.h" #include "services/notifymanager.h" #include "common/unused.h" +#include "translations.h" #include #include #include @@ -465,6 +466,7 @@ void PluginManagerImpl::unload(const QString& pluginName) // Deinitializing and unloading plugin emit aboutToUnload(container->plugin, container->type); container->plugin->deinit(); + unloadTranslation(container->name); QPluginLoader* loader = container->loader; if (!loader->isLoaded()) @@ -586,6 +588,7 @@ void PluginManagerImpl::pluginLoaded(PluginManagerImpl::PluginContainer* contain { if (!container->builtIn) { + loadTranslation(container->name); container->plugin = dynamic_cast(container->loader->instance()); container->loaded = true; } diff --git a/SQLiteStudio3/coreSQLiteStudio/sqlhistorymodel.h b/SQLiteStudio3/coreSQLiteStudio/sqlhistorymodel.h index 0f6b25d..17e1bc3 100644 --- a/SQLiteStudio3/coreSQLiteStudio/sqlhistorymodel.h +++ b/SQLiteStudio3/coreSQLiteStudio/sqlhistorymodel.h @@ -7,6 +7,8 @@ class Db; class SqlHistoryModel : public QueryModel { + Q_OBJECT + public: SqlHistoryModel(Db* db, QObject *parent = nullptr); diff --git a/SQLiteStudio3/coreSQLiteStudio/sqlitestudio.cpp b/SQLiteStudio3/coreSQLiteStudio/sqlitestudio.cpp index 3595b21..8ff4f0d 100644 --- a/SQLiteStudio3/coreSQLiteStudio/sqlitestudio.cpp +++ b/SQLiteStudio3/coreSQLiteStudio/sqlitestudio.cpp @@ -32,13 +32,14 @@ #include "plugins/populateplugin.h" #include "services/bugreporter.h" #include "services/extralicensemanager.h" +#include "translations.h" #include #include #include DEFINE_SINGLETON(SQLiteStudio) -static const int sqlitestudioVersion = 30001; +static const int sqlitestudioVersion = 30002; SQLiteStudio::SQLiteStudio() { @@ -49,6 +50,21 @@ SQLiteStudio::SQLiteStudio() SQLiteStudio::~SQLiteStudio() { } +QStringList SQLiteStudio::getInitialTranslationFiles() const +{ + return initialTranslationFiles; +} + +void SQLiteStudio::setInitialTranslationFiles(const QStringList& value) +{ + initialTranslationFiles = value; +} + + +QString SQLiteStudio::getCurrentLang() const +{ + return currentLang; +} ExtraLicenseManager* SQLiteStudio::getExtraLicenseManager() const { @@ -263,6 +279,9 @@ void SQLiteStudio::init(const QStringList& cmdListArguments, bool guiAvailable) config = new ConfigImpl(); config->init(); + currentLang = CFG_CORE.General.Language.get(); + loadTranslations(initialTranslationFiles); + pluginManager = new PluginManagerImpl(); dbManager = new DbManagerImpl(); @@ -325,7 +344,9 @@ void SQLiteStudio::cleanUp() disconnect(pluginManager, SIGNAL(unloaded(QString,PluginType*)), this, SLOT(pluginUnloaded(QString,PluginType*))); if (!immediateQuit) { - pluginManager->deinit(); + if (pluginManager) + pluginManager->deinit(); + safe_delete(pluginManager); // PluginManager before DbManager, so Db objects are deleted while DbManager still exists safe_delete(updateManager); safe_delete(bugReporter); diff --git a/SQLiteStudio3/coreSQLiteStudio/sqlitestudio.h b/SQLiteStudio3/coreSQLiteStudio/sqlitestudio.h index a41867a..f338e92 100644 --- a/SQLiteStudio3/coreSQLiteStudio/sqlitestudio.h +++ b/SQLiteStudio3/coreSQLiteStudio/sqlitestudio.h @@ -147,6 +147,11 @@ class API_EXPORT SQLiteStudio : public QObject ExtraLicenseManager* getExtraLicenseManager() const; void setExtraLicenseManager(ExtraLicenseManager* value); + QString getCurrentLang() const; + + QStringList getInitialTranslationFiles() const; + void setInitialTranslationFiles(const QStringList& value); + private: /** * @brief Creates singleton instance. @@ -197,6 +202,8 @@ class API_EXPORT SQLiteStudio : public QObject BugReporter* bugReporter = nullptr; UpdateManager* updateManager = nullptr; ExtraLicenseManager* extraLicenseManager = nullptr; + QString currentLang; + QStringList initialTranslationFiles; private slots: void pluginLoaded(Plugin* plugin,PluginType* pluginType); diff --git a/SQLiteStudio3/coreSQLiteStudio/tablemodifier.cpp b/SQLiteStudio3/coreSQLiteStudio/tablemodifier.cpp index 7555714..d064cb1 100644 --- a/SQLiteStudio3/coreSQLiteStudio/tablemodifier.cpp +++ b/SQLiteStudio3/coreSQLiteStudio/tablemodifier.cpp @@ -44,11 +44,12 @@ void TableModifier::alterTable(SqliteCreateTablePtr newCreateTable) sqls << newCreateTable->detokenize(); copyDataTo(newCreateTable); + handleFks(tempTableName); + // If temp table was created, it means that table name hasn't changed. In that case we need to cleanup temp table (drop it). // Otherwise, the table name has changed, therefor there still remains the old table which we copied data from - we need to drop it here. sqls << QString("DROP TABLE %1;").arg(wrapObjIfNeeded(tempTableName.isNull() ? originalTable : tempTableName, dialect)); - handleFks(); handleIndexes(); handleTriggers(); handleViews(); @@ -92,7 +93,7 @@ void TableModifier::copyDataTo(const QString& targetTable) copyDataTo(targetTable, colsToCopy, colsToCopy); } -void TableModifier::handleFks() +void TableModifier::handleFks(const QString& tempTableName) { SchemaResolver resolver(db); @@ -108,10 +109,11 @@ void TableModifier::handleFks() continue; } + subModifier.usedTempTableNames = usedTempTableNames; subModifier.tableColMap = tableColMap; subModifier.existingColumns = existingColumns; subModifier.newName = newName; - subModifier.subHandleFks(originalTable); + subModifier.subHandleFks(originalTable, tempTableName); sqls += subModifier.generateSqls(); modifiedTables << fkTable; @@ -125,18 +127,18 @@ void TableModifier::handleFks() } } -void TableModifier::subHandleFks(const QString& oldName) +void TableModifier::subHandleFks(const QString& oldName, const QString& oldTempName) { bool modified = false; foreach (SqliteCreateTable::Constraint* fk, createTable->getForeignKeysByTable(oldName)) { - if (subHandleFks(fk->foreignKey, oldName)) + if (subHandleFks(fk->foreignKey, oldName, oldTempName)) modified = true; } foreach (SqliteCreateTable::Column::Constraint* fk, createTable->getColumnForeignKeysByTable(oldName)) { - if (subHandleFks(fk->foreignKey, oldName)) + if (subHandleFks(fk->foreignKey, oldName, oldTempName)) modified = true; } @@ -151,19 +153,29 @@ void TableModifier::subHandleFks(const QString& oldName) copyDataTo(originalTable); + handleFks(tempName); + sqls << QString("DROP TABLE %1;").arg(wrapObjIfNeeded(tempName, dialect)); simpleHandleIndexes(); simpleHandleTriggers(); } -bool TableModifier::subHandleFks(SqliteForeignKey* fk, const QString& oldName) +bool TableModifier::subHandleFks(SqliteForeignKey* fk, const QString& oldName, const QString& oldTempName) { + // If table was not renamed (but uses temp table name), we will rename temp name into target name. + // If table was renamed, we will rename old name to new name. bool modified = false; // Table if (handleName(oldName, fk->foreignTable)) modified = true; + else if (!oldTempName.isNull() && fk->foreignTable.compare(oldName, Qt::CaseInsensitive) == 0) + { + // This is the case when main table was not renamed - we will stay with the original name, but we need to mark it as modified, + // so the table gets recreated (the temp table is changed to the original table name in this FK). + modified = true; + } // Columns if (handleIndexedColumns(fk->indexedColumns)) @@ -354,9 +366,16 @@ void TableModifier::handleIndex(SqliteCreateIndexPtr index) { handleName(originalTable, index->table); handleIndexedColumns(index->indexedColumns); - index->rebuildTokens(); - sqls << index->detokenize(); - modifiedIndexes << index->index; + if (index->indexedColumns.size() > 0) + { + index->rebuildTokens(); + sqls << index->detokenize(); + modifiedIndexes << index->index; + } + else + { + warnings << QObject::tr("All columns indexed by the index %1 are gone. The index will not be recreated after table modification.").arg(index->index); + } // TODO partial index needs handling expr here } @@ -388,9 +407,16 @@ void TableModifier::handleTrigger(SqliteCreateTriggerPtr trigger) } trigger->queries = newQueries; - trigger->rebuildTokens(); - sqls << trigger->detokenize(); - modifiedTriggers << trigger->trigger; + if (trigger->event->type == SqliteCreateTrigger::Event::UPDATE_OF && trigger->event->columnNames.size() == 0) + { + warnings << QObject::tr("All columns covered by the trigger %1 are gone. The trigger will not be recreated after table modification.").arg(trigger->trigger); + } + else + { + trigger->rebuildTokens(); + sqls << trigger->detokenize(); + modifiedTriggers << trigger->trigger; + } } void TableModifier::handleViews() @@ -688,8 +714,10 @@ void TableModifier::parseDdl() this->createTable = createTable; } -QString TableModifier::getTempTableName() const +QString TableModifier::getTempTableName() { SchemaResolver resolver(db); - return resolver.getUniqueName("sqlitestudio_temp_table"); + QString name = resolver.getUniqueName("sqlitestudio_temp_table", usedTempTableNames); + usedTempTableNames << name; + return name; } diff --git a/SQLiteStudio3/coreSQLiteStudio/tablemodifier.h b/SQLiteStudio3/coreSQLiteStudio/tablemodifier.h index 6a39b33..62af492 100644 --- a/SQLiteStudio3/coreSQLiteStudio/tablemodifier.h +++ b/SQLiteStudio3/coreSQLiteStudio/tablemodifier.h @@ -31,7 +31,7 @@ class API_EXPORT TableModifier private: void init(); void parseDdl(); - QString getTempTableName() const; + QString getTempTableName(); void copyDataTo(const QString& targetTable, const QStringList& srcCols, const QStringList& dstCols); void renameTo(const QString& newName); QString renameToTemp(); @@ -60,9 +60,9 @@ class API_EXPORT TableModifier * @param newCreateTable * Finds all tables referencing currently modified table and updates their referenced table name and columns. */ - void handleFks(); - void subHandleFks(const QString& oldName); - bool subHandleFks(SqliteForeignKey* fk, const QString& oldName); + void handleFks(const QString& tempTableName); + void subHandleFks(const QString& oldName, const QString& oldTempName); + bool subHandleFks(SqliteForeignKey* fk, const QString& oldName, const QString& oldTempName); bool handleName(const QString& oldName, QString& valueToUpdate); bool handleIndexedColumns(QList& columnsToUpdate); @@ -74,18 +74,18 @@ class API_EXPORT TableModifier Dialect dialect; /** - * @brief database Database name. The "main" is default. + * @brief Database name. The "main" is default. * Other databases (temp, attached...) are not supported at the moment. */ QString database; /** - * @brief table Current table name (after renaming) + * @brief Current table name (after renaming) */ QString table; /** - * @brief originalTable Initial table name, before any renaming. + * @brief Initial table name, before any renaming. */ QString originalTable; @@ -95,7 +95,7 @@ class API_EXPORT TableModifier SqliteCreateTablePtr createTable; /** - * @brief sqls Statements to be executed to make changes real. + * @brief Statements to be executed to make changes real. */ QStringList sqls; @@ -109,6 +109,7 @@ class API_EXPORT TableModifier QStringList modifiedIndexes; QStringList modifiedTriggers; QStringList modifiedViews; + QStringList usedTempTableNames; }; #endif // TABLEMODIFIER_H diff --git a/SQLiteStudio3/coreSQLiteStudio/translations.cpp b/SQLiteStudio3/coreSQLiteStudio/translations.cpp new file mode 100644 index 0000000..56dc5f6 --- /dev/null +++ b/SQLiteStudio3/coreSQLiteStudio/translations.cpp @@ -0,0 +1,108 @@ +#include "translations.h" +#include "sqlitestudio.h" +#include +#include +#include +#include +#include + +QHash SQLITESTUDIO_TRANSLATIONS; +QStringList SQLITESTUDIO_TRANSLATION_DIRS = QStringList({":/msg", ":/msg/translations", "msg", "translations"}); + +void loadTranslation(const QString& baseName) +{ + if (SQLITESTUDIO_TRANSLATIONS.contains(baseName)) + return; + + QTranslator* translator = new QTranslator(); + + QString fName; + bool res = false; + QString lang = SQLITESTUDIO->getCurrentLang(); + QStringList filters = QStringList({baseName+"_"+lang+".qm"}); + QDir dir; + + for (const QString& dirPath : SQLITESTUDIO_TRANSLATION_DIRS) + { + dir = dirPath; + for (const QString& f : dir.entryList(filters)) + { + res = translator->load(f, dirPath); + if (res) + { + fName = dirPath + "/" + f; + break; + } + } + + if (res) + break; + } + + if (!res) + return; + + qApp->installTranslator(translator); + SQLITESTUDIO_TRANSLATIONS[baseName] = translator; + qDebug() << "Loaded:" << fName; +} + +void unloadTranslation(const QString& baseName) +{ + if (!SQLITESTUDIO_TRANSLATIONS.contains(baseName)) + return; + + QTranslator* trans = SQLITESTUDIO_TRANSLATIONS[baseName]; + SQLITESTUDIO_TRANSLATIONS.remove(baseName); + qApp->removeTranslator(trans); + delete trans; +} + +void loadTranslations(const QStringList& baseNames) +{ + for (const QString& name : baseNames) + loadTranslation(name); +} + +QStringList getAvailableTranslations() +{ + QSet locales; + QRegularExpression re("[^\\_]+\\_(\\w+)\\.qm"); + QRegularExpressionMatch match; + QDir dir; + QStringList filters = QStringList({"*_*.qm"}); + for (const QString& dirPath : SQLITESTUDIO_TRANSLATION_DIRS) + { + dir = dirPath; + for (const QString& f : dir.entryList(filters)) + { + match = re.match(f); + if (!match.isValid()) + continue; + + locales << match.captured(1).toLower(); + } + } + locales << "en"; + + return locales.toList(); +} + +QMap getAvailableLanguages() +{ + QMap langs; + QStringList translations = getAvailableTranslations(); + QLocale locale; + QString langName; + for (const QString& trans : translations) + { + locale = QLocale(trans); + langName = locale.nativeLanguageName(); + if (langName.isEmpty()) + langName = trans; + + langs[langName] = trans; + } + + return langs; +} diff --git a/SQLiteStudio3/coreSQLiteStudio/translations.h b/SQLiteStudio3/coreSQLiteStudio/translations.h new file mode 100644 index 0000000..c130064 --- /dev/null +++ b/SQLiteStudio3/coreSQLiteStudio/translations.h @@ -0,0 +1,25 @@ +#ifndef TRANSLATIONS_H +#define TRANSLATIONS_H + +#include +#include + +void loadTranslations(const QStringList& baseNames); +void loadTranslation(const QString& baseName); +void unloadTranslation(const QString& baseName); + +/** + * @brief Provides list of translations as code names. + * @return List of available translations in their code names (pl, pt, de, ...). + */ +QStringList getAvailableTranslations(); + +/** + * @brief Provides list of languages and their code names. + * @return A map of pairs, there key is a translated (with a current language) name of language and value is its translation code name (pl, pt, de, ...). + * + * As the result is a QMap, it comes sorted by a translated names of languages. + */ +QMap getAvailableLanguages(); + +#endif // TRANSLATIONS_H diff --git a/SQLiteStudio3/coreSQLiteStudio/translations/coreSQLiteStudio_pl.qm b/SQLiteStudio3/coreSQLiteStudio/translations/coreSQLiteStudio_pl.qm new file mode 100644 index 0000000..8011cf1 Binary files /dev/null and b/SQLiteStudio3/coreSQLiteStudio/translations/coreSQLiteStudio_pl.qm differ diff --git a/SQLiteStudio3/coreSQLiteStudio/translations/coreSQLiteStudio_pl.ts b/SQLiteStudio3/coreSQLiteStudio/translations/coreSQLiteStudio_pl.ts new file mode 100644 index 0000000..dc64023 --- /dev/null +++ b/SQLiteStudio3/coreSQLiteStudio/translations/coreSQLiteStudio_pl.ts @@ -0,0 +1,1298 @@ + + + + + AbstractDb + + + + Cannot execute query on closed database. + Nie można wykonać zapytania na zamkniętej bazie danych. + + + + Error attaching database %1: %2 + Błąd podczas dołączania bazy danych %1: %2 + + + + BugReporter + + + Invalid login or password + Niepoprawny login lub hasło + + + + ChainExecutor + + + The database for executing queries was not defined. + chain executor + Nie zdefiniowano bazy danych do wykonywania zapytań. + + + + The database for executing queries was not open. + chain executor + Baza danych do wykonywania zapytań nie jest otwarta. + + + + Could not start a database transaction. Details: %1 + chain executor + Nie udało się rozpocząć transakcji bazy danych. Szczegóły: %1 + + + + Interrupted + chain executor + Przerwane + + + + Could not commit a database transaction. Details: %1 + chain executor + Nie udało się zatwierdzić transakcji bazy danych. Szczegóły: %1 + + + + CompletionHelper + + + New row reference + Odnośnik do nowego wiersza + + + + Old row reference + Odnośnik do starego wiersza + + + + New table name + Nazwa nowej tabeli + + + + New index name + Nazwa nowego indeksu + + + + New view name + Nazwa nowego widoku + + + + New trigger name + Nazwa nowego wyzwalacza + + + + Table or column alias + Alias tabeli lub kolumny + + + + transaction name + Nazwa transakcji + + + + New column name + Nazwa nowej kolumny + + + + Column data type + Typ danych kolumny + + + + Constraint name + Nazwa ograniczenia + + + + Error message + Treść błędu + + + + Collation name + Nazwa zestawienia + + + + Any word + Dowolne słowo + + + + Default database + Domyślna baza danych + + + + Temporary objects database + Baza danych obiektów tymczasowych + + + + DbManagerImpl + + + Could not add database %1: %2 + Nie udało się dodać bazę danych %1: %2 + + + + Database %1 could not be updated, because of an error: %2 + Nie udało się zaktualizować baza danych %1 z powodu błędu: %2 + + + + + Database file doesn't exist. + Plik bazy danych nie istnieje. + + + + + + No supporting plugin loaded. + Nie załadowano obsługującej wtyczki. + + + + Database could not be initialized. + Nie udało się zainicjalizować bazy danych. + + + + No suitable database driver plugin found. + Nie znaleziono odpowiedniej wtyczki sterownika. + + + + DbObjectOrganizer + + + + Error while creating table in target database: %1 + Błąd podczas tworzenia tabeli w docelowej bazie danych: %1 + + + + Could not parse table. + Nie udało się przeanalizować tabeli. + + + + Database %1 could not be attached to database %2, so the data of table %3 will be copied with SQLiteStudio as a mediator. This method can be slow for huge tables, so please be patient. + Nie udało się dołączyć bazy danych %1 do bazy danych %2, więc dane tabeli %3 będą skopiowane przez SQLiteStudio jako pośrednika. Ta metoda może być powolna dla dużych tabel, więc proszę o cierpliwość. + + + + Error while copying data for table %1: %2 + Błąd podczas copiowania danych tabeli %1: %2 + + + + + + Error while copying data to table %1: %2 + Błąd podczas kopiowania danych do tabeli %1: %2 + + + + Error while dropping source view %1: %2 +Tables, indexes, triggers and views copied to database %3 will remain. + Błąd podczas upuszczania widoku źródłowego %1: %2 +Tabele, indeksy, wyzwalacze i widoki skopiowane do bazy danych %3 pozostaną na miejscu. + + + + Error while creating view in target database: %1 + Błąd podczas tworzenia widoku w docelowej bazie danych: %1 + + + + Error while creating index in target database: %1 + Błąd podczas tworzenia indeksu w docelowej bazie danych: %1 + + + + Error while creating trigger in target database: %1 + Błąd podczas tworzenia wyzwalacza w docelowej bazie danych: %1 + + + + DbVersionConverter + + + Target file exists, but could not be overwritten. + Plik docelowy istnieje, ale nie może być nadpisany. + + + + Could not find proper database plugin to create target database. + Nie znaleziono odpowiedniej wtyczki bazy danych, aby utworzyć docelową bazę danych. + + + + Error while converting database: %1 + Błąd podczas konwersji bazy danych: %1 + + + + DdlHistoryModel + + + Database name + ddl history header + Nazwa bazy danych + + + + Database file + ddl history header + Plik bazy danych + + + + Date of execution + ddl history header + Data wykonania + + + + Changes + ddl history header + Zmiany + + + + ExportManager + + + Export plugin %1 doesn't support exporing query results. + Wtyczka eksportu %1 nie obsługuje exportowania wyników zapytania. + + + + Export plugin %1 doesn't support exporing tables. + Wtyczka exportu %1 nie obsługuje eksportowania tabel. + + + + Export plugin %1 doesn't support exporing databases. + Wtyczka exportu %1 nie obsługuje eksportowania baz danych. + + + + Export format '%1' is not supported. Supported formats are: %2. + Format eksportu %1 nie jest obsługiwany. Obsługiwane formaty to: %2 + + + + Export to the clipboard was successful. + Eksport do schowka przebiegł pomyślnie. + + + + Export to the file '%1' was successful. + Eksport do pliku '%1' przebiegł pomyślnie. + + + + Export was successful. + Export przebiegł pomyślnie. + + + + Could not export to file %1. File cannot be open for writting. + Eksport do pliku %1 nie powiódł się. Plik nie może być otwarty do zapisu. + + + Export to was successful. + Eksport do przebiegł pomyślnie. + + + + ExportWorker + + + Error while exporting query results: %1 + Błąd podczas eksportowania wyników zapytania: %1 + + + Error while counting data column width to export from query results: %2 + Błąd podczas liczenia szerokości kolumn danych do eksportu wyników zapytania: %2 + + + + Error while counting data column width to export from query results: %1 + Błąd podczas liczenia szerokości kolumn danych do eksportu wyników zapytania: %1 + + + + + Could not parse %1 in order to export it. It will be excluded from the export output. + Nie udało się przeanalizować %1 w celu wyeksportowania. Element ten zostanie pominięty w wynikach eksportu. + + + + Error while reading data to export from table %1: %2 + Błąd podczas odczytu danych do eksportu z tabeli %1: %2 + + + + Error while counting data to export from table %1: %2 + Błąd podczas liczenia danych do eksportu z tabeli %1: %2 + + + + Error while counting data column width to export from table %1: %2 + Błąd podczas obliczania szerokości kolumn danych do eksportu z tabeli %1: %2 + + + + FunctionManagerImpl + + + Invalid number of arguments to function '%1'. Expected %2, but got %3. + Niepoprawna liczba argumentów do funkcji '%1'. Oczekiwano %2, a jest %3. + + + + No such function registered in SQLiteStudio: %1(%2) + Nie znaleziono funkcji zarejestrowanej w SQLiteStudio: %1 (%2) + + + + Function %1(%2) was registered with language %3, but the plugin supporting that language is not currently loaded. + Funkcja %1 (%2) została zarejestrowana dla języka %3, ale wtyczka obsługująca ten język nie jest aktualnie załadowana. + + + + Invalid regular expression pattern: %1 + Niepoprawne wyrażenie regularne: %1 + + + + + Could not open file %1 for reading: %2 + Nie udało się otworzyć pliku %1 do odczytu: %2 + + + + Could not open file %1 for writting: %2 + Nie udało się otworzyć pliku %2 do zapisu: %2 + + + + Error while writting to file %1: %2 + Błąd podczas zapisu do pliku %1: %2 + + + + Unsupported scripting language: %1 + Nieobsługiwany język skryptowy: %1 + + + + GenericExportPlugin + + + Could not initialize text codec for exporting. Using default codec: %1 + Nie udało się zainicjalizować kodeka do exportu. Użyty będzie domyślny kodek: %1 + + + + ImportManager + + + Imported data to the table '%1' successfully. + Pomyślnie zaimportowano dane do tabeli '%1'. + + + + ImportWorker + + + No columns provided by the import plugin. + Wtyczka importu nie dostarczyła żadnych kolumn. + + + + Could not start transaction in order to import a data: %1 + Nie udało się wystartować transakcji w celu zaimportowania danych: %1 + + + + Could not commit transaction for imported data: %1 + Nie udało się zatwierdzić transakcji w celu zaimportowania danych: %1 + + + + Table '%1' has less columns than there are columns in the data to be imported. Excessive data columns will be ignored. + Tabela '%1' ma mniej kolumn, niż jest kolumn w danych do importu. Nadmiarowe kolumny zostaną zignorowane. + + + + Table '%1' has more columns than there are columns in the data to be imported. Some columns in the table will be left empty. + Tabela '%1' ma więcej kolumn, niż jest kolumn w danych do importu. Część kolumn w tabeli będzie pozostawiona pusta. + + + + Could not create table to import to: %1 + Nie udało się stworzyć tabeli do zaimportowania: %1 + + + + + + Error while importing data: %1 + Błąd podczas importowania danych: %1 + + + + + Interrupted. + import process status update + Przerwano. + + + + PluginManagerImpl + + + Cannot load plugin %1, because it's in conflict with plugin %2. + Nie udało się załadować wtyczki %1, ponieważ jest ona w konflikcie z wtyczką %2. + + + + Cannot load plugin %1, because its dependency was not loaded: %2. + Nie udało się załadować wtyczki %1, ponieważ jej zależność nie została załadowana: %2 + + + + Cannot load plugin %1. Error details: %2 + Nie udało się załadować wtyczki %1. Szczegóły błędu: %2 + + + + Cannot load plugin %1 (error while initializing plugin). + Nie udało się załadować wtyczki %1 (błąd podczas inicjalizacji wtyczki). + + + + min: %1 + plugin dependency version + min: %1 + + + + max: %1 + plugin dependency version + maks: %1 + + + + PopulateConstant + + + Constant + populate constant plugin name + Stała + + + + PopulateConstantConfig + + + Constant value: + Stała wartość: + + + + PopulateDictionary + + + Dictionary + dictionary populating plugin name + Słownik + + + + PopulateDictionaryConfig + + + Dictionary file + Plik słownika + + + + Pick dictionary file + Wybierz plik słownika + + + + Word separator + Separator słowa + + + + Whitespace + Biały znak + + + + Line break + Nowa linia + + + + Method of using words + Metoda używania słów + + + + Ordered + Uporządkowana + + + + Randomly + Losowa + + + + PopulateManager + + + Table '%1' populated successfully. + Zaludnianie tabeli '%1' przebiegło pomyślnie. + + + + PopulateRandom + + + Random number + Losowa liczba + + + + PopulateRandomConfig + + + Constant prefix + Stały przedrostek + + + + No prefix + Bez predrostka + + + + Minimum value + Wartość minimalna + + + + Maximum value + Wartość maksymalna + + + + Constant suffix + Stały przyrostek + + + + No suffix + Brak przyrostka + + + + PopulateRandomText + + + Random text + Losowy tekst + + + + PopulateRandomTextConfig + + + Use characters from common sets: + Użyj znaków z zestawów: + + + + Minimum length + Długość minimalna + + + + Letters from a to z. + Litery od a do z. + + + + Alpha + Litery + + + + Numbers from 0 to 9. + Liczby od 0 do 9. + + + + Numeric + Liczby + + + + A whitespace, a tab and a new line character. + Znak biały, znak tabulacji, znak nowej linii. + + + + Whitespace + Znak biały + + + + Includes all above and all others. + Zawiera wszystkie powyższe, oraz wszystkie pozostałe. + + + + Binary + Binarne + + + + Use characters from my custom set: + Użyj znaków z mojego zestawu: + + + + Maximum length + Długość maksymalna + + + + If you type some character multiple times, it's more likely to be used. + Jeśli wpiszesz dany znak kilka razy, będzie on miał większą szansę na wylosowanie. + + + + PopulateScript + + + Script + Skrypt + + + + PopulateScriptConfig + + + Initialization code (optional) + Kod inicjalizujący (opcjonalny) + + + + Per step code + Kod dla każdego kroku + + + + Language + Język + + + + Help + Pomoc + + + + PopulateSequence + + + Sequence + Sekwencja + + + + PopulateSequenceConfig + + + Start value: + Wartość początkowa: + + + + Step: + Wartość końcowa: + + + + PopulateWorker + + + Could not start transaction in order to perform table populating. Error details: %1 + Nie udało się rozpocząć transakcji w celu zaludnienia tabeli. Szczegóły błędu: %1 + + + + Error while populating table: %1 + Błąd podczas zaludniania tabeli: %2 + + + + Could not commit transaction after table populating. Error details: %1 + Nie udało się zatwierdzić transakcji po zaludnieniu tabeli. Szczegóły błędy: %1 + + + + QObject + + + + + + + + + SQLite %1 does not support '%2' statement. + SQLite %1 nie obsługuje zapytania '%2'. + + + + SQLite %1 does not support '%2' statement, but the regular table can be created instead if you proceed. + SQLite %1 nie obsługuje zapytania '%2', ale stworzona zostanie zwykła tabela, jeśli będziesz kontynuować. + + + + Could not parse statement: %1 +Error details: %2 + Nie udało się przeanalizować zapytania: %1 +Szczegóły błędu: %2 + + + + + + + SQLite %1 does not support the '%2' clause. Cannot convert '%3' statement with that clause. + SQLite %1 nie obsługuje klauzuli '%2'. Nie można przekonwertować zapytania '%3' z tą klauzulą. + + + + SQLite %1 does not support the '%2' clause in the '%3' statement. + SQLite %1 nie obsługuje klauzuli '%2' w zapytaniu '%3'. + + + SQLite %1 does not support the '%2' clause. Cannot convert '%1' statement with that clause. + SQLite %1 nie obsługuje klauzuli '%2'. Nie można przekonwertować zapytania '%3' z tą klauzulą. {1 ?} {2'?} {1'?} + + + + SQLite %1 does not support current date or time clauses in expressions. + SQLite %1 nie obsługuje aktualnej daty lub klauzul czasowu w wyrażeniach. + + + + + + SQLite %1 does not support '%2' clause in expressions. + SQLite %1 nie obsługuje klauzuli '%2' w wyrażeniach. + + + + Could not attach database %1: %2 + Nie udało się dołączyć bazy danych %1: %2 + + + + + Incomplete query. + Niekompletne zapytanie. + + + + + Parser stack overflow + Przeciążenie stosu analizatora. + + + + + Syntax error + Błąd składni + + + + Could not open dictionary file %1 for reading. + Nie udało się otworzyć pliku słownika %1 do odczytu. + + + + Dictionary file must exist and be readable. + Plik słownika musi istnieć i musisz mieć prawa do jego odczytu. + + + + Maximum value cannot be less than minimum value. + Wartość maksymalna nie może być mniejsza niż wartość minimalna. + + + + Maximum length cannot be less than minimum length. + Długość maksymalna nie może być mniejsza niż długość minimalna. + + + + Custom character set cannot be empty. + Zestaw własnych znaków nie może być pusty. + + + + Could not find plugin to support scripting language: %1 + Nie udało się znaleźć wtyczki obsługującej język skryptowy: %1 + + + + Error while executing populating initial code: %1 + Błąd podczas wykonywania kodu inicjalizującego zaludnianie: %1 + + + + Error while executing populating code: %1 + Błąd podczas wykonywania kodu zaludniania: %1 + + + + Select implementation language. + Wybierz język implementacji. + + + + Implementation code cannot be empty. + Kod implementacji nie może być pusty. + + + + Could not resolve data source for column: %1 + Nie znaleziono źródła danych dla kolumny: %1 + + + + Could not initialize configuration file. Any configuration changes and queries history will be lost after application restart. Tried to initialize the file at following localizations: %1. + Nie udało się zainicjalizować pliku konfiguracyjnego. Jakiekolwiek zmiany w konfiguracji i historia zapytań będą utracone po zrestartowaniu aplikacji. Próbowano zainicjalizować plik konfiguracyjny w następujących lokalizacjach: %1. + + + + General purpose + plugin category name + Ogólne + + + + Database support + plugin category name + Wsparcie baz danych + + + + Code formatter + plugin category name + Formatowanie kodu + + + + Scripting languages + plugin category name + Języki skryptowe + + + + Exporting + plugin category name + Eksportowanie + + + + Importing + plugin category name + Importowanie + + + + Table populating + plugin category name + Zaludnianie tabel + + + + Table %1 is referencing table %2, but the foreign key definition will not be updated for new table definition due to problems while parsing DDL of the table %3. + Tabela %1 odwołuje się do tabeli %2, ale definicja klucza obcego nie zostanie zaktualizowane dla definicji nowej tabeli w związku z problemami przy analizowaniu DDL tabeli %3. + + + + All columns indexed by the index %1 are gone. The index will not be recreated after table modification. + Wszystkie kolumny indeksowane przez indeks %1 już nie istnieją. Indeks ten nie będzie odtworzony po modyfikacji tabeli. + + + + Cannot not update trigger %1 according to table %2 modification. + Nie można zaktualizować wyzwalacza %1 zgodnie z modyfikacjami tabeli %2. + + + + All columns covered by the trigger %1 are gone. The trigger will not be recreated after table modification. + Wszystkie kolumny obsługiwane przez wyzwalacz %1 już nie istnieją. Wyzwalacz ten nie będzie odtworzony po modyfikacji tabeli. + + + + Cannot not update view %1 according to table %2 modifications. +The view will remain as it is. + Nie można zaktualizować widoku %1 w związku z modyfikacjami tabeli %2. +Widok pozostanie nienaruszony. + + + + + + There is a problem with updating an %1 statement within %2 trigger. One of the SELECT substatements which might be referring to table %3 cannot be properly modified. Manual update of the trigger may be necessary. + Jest problem ze zaktualizowaniem zapytania %1 w wyzwalaczu %2. Jedeno z podzapytań SELECT, które może odwoływać się do tabeli %2 nie może być poprawnie zmodyfikowane. Ręczna aktualizacja tego wyzwalacza może być niezbędna. + + + + Could not parse DDL of the view to be created. Details: %1 + Nie udało się przeanalizować DDL widoku do stworzenia. Szczegóły: %1 + + + + Parsed query is not CREATE VIEW. It's: %1 + Przeanalizowane zapytanie to nie CREATE VIEW, ale: %1 + + + + SQLiteStudio was unable to resolve columns returned by the new view, therefore it won't be able to tell which triggers might fail during the recreation process. + SQLiteStudio nie było w stanie określić kolumn zwracanych przez nowy widok, w związku z czym nie może określić które wyzwalacze mogą się nie powieść podczas procesu odtwarzania. + + + + + Could not open database: %1 + Nie udało się otworzyć bazy danych: %1 + + + + Could not close database: %1 + Nie udało się zamknąć bazy danych: %1 + + + + + Result set expired or no row available. + Wyniki zapytania są nieaktualne, lub nie ma dostępnych wierszy. + + + + Query + + Result set expired or no row available. + Wyniki zapytania są nieaktualne, lub nie ma dostępnych wierszy. + + + + QueryExecutor + + + Execution interrupted. + Wykonywanie przerwane. + + + + Database is not open. + Baza danych nie jest otwarta. + + + + Only one query can be executed simultaneously. + Tylko jedno zapytanie może być wykonywane w danym momencie. + + + + + An error occured while executing the count(*) query, thus data paging will be disabled. Error details from the database: %1 + Wystąpił błąd podczas wykonywania zapytania count(*), przez co stronicowanie danych będzie wyłączone. Szczegóły błędy z bazy danych: %1 + + + + SQLiteStudio was unable to extract metadata from the query. Results won't be editable. + SQLiteStudio nie mogło uzyskać metadanych z zapytania. Nie będzie można edytować wyników zapytania. + + + + ScriptingQtDbProxy + + + No database available in current context, while called QtScript's %1 command. + Brak dostępnej bazy danych w bieżącym kontekście, podczas wywoływania komendy QtScript: %1. + + + + Error from %1: %2 + Błąd z %1: %2 + + + + SqlHistoryModel + + + Database + sql history header + Baza danych + + + + Execution date + sql history header + Data wykonania + + + + Time spent + sql history header + Czas trwania + + + + Rows affected + sql history header + Liczba wierszy + + + + SQL + sql history header + SQL + + + + UpdateManager + + + An error occurred while checking for updates: %1. + Wystąpił błąd podczas sprawdzania aktualizacji: %1 + + + + Could not check available updates, because server responded with invalid message format. It is safe to ignore this warning. + Nie udało się sprawdzić aktualizacji, ponieważ serwer odpowiedział wiadomością w niepoprawnym formacie. Możesz spokojnie zignorować tą informację. + + + + An error occurred while reading updates metadata: %1. + Wystąpił błąd podczas odczytu metadanych aktualizacji: %1 + + + + Could not download updates, because server responded with invalid message format. You can try again later or download and install updates manually. See <a href="%1">User Manual</a> for details. + Nie udało się ściągnąć aktualizacji, ponieważ serwer odpowiedział wiadomością w niepoprawnym formacie. Możesz spróbować jeszcze raz później, lub ściągnąć i stainstalować aktualizację ręcznie. Szczegóły: <a href="%1">Podręcznik użytkownika</a>. + + + + Could not create temporary directory for downloading the update. Updating aborted. + Nie udało się stworzyć katalogu tymczasowego w celu pobrania aktualizacji. Aktualizacja została przerwana. + + + + There was no updates to download. Updating aborted. + Nie znaleziono aktualizacji do pobrania. Aktualizacja przerwana. + + + + Downloading: %1 + Pobieranie: %1 + + + + Could not determinate file name from update URL: %1. Updating aborted. + Nie udało się określić nazwy pliku z URL aktualizacji: %1. Aktualizacja przerwana. + + + + Failed to open file '%1' for writting: %2. Updating aborted. + Nie udało się otworzyć pliku '%1' do zapisu: %2. Aktualizacja przerwana. + + + + Installing updates. + Instalowanie aktualizacji. + + + + Could not copy current application directory into %1 directory. + Nie udało się skopiować bieżącego katalogu aplikacji do katalogu %1. + + + + Could not create directory %1. + Nie udało się stworzyć katalogu %1. + + + + Could not rename directory %1 to %2. +Details: %3 + Nie udało się zmienić nazwy katalogu %1 na %2. +Szczegóły: %3 + + + + Cannot not rename directory %1 to %2. +Details: %3 + Nie można zmienić nazwy katalogu %1 na %2. +Szczegóły: %3 + + + + Could not move directory %1 to %2 and also failed to restore original directory, so the original SQLiteStudio directory is now located at: %3 + Nie udało się przenieść katalogu %1 do %2, oraz nie udało się przywrócić originalnego katalog, więc originalny katalog SQLiteStudio jest mieści się teraz w: %3 + + + + Could not rename directory %1 to %2. Rolled back to the original SQLiteStudio version. + Nie udało się zmienić nazwy katalogu %1 na %2. Przywrócono originalną wersję SQLiteStudio. + + + + Could not unpack component %1 into %2 directory. + Nie udało się rozpakować komponentu %1 do katalogu %2. + + + + Could not find permissions elevator application to run update as a root. Looked for: %1 + Nie udało się znaleźć narzędzia do podnoszenia uprawnień aplikacji, aby uruchomić aktualizację jako administrator. Szukano następujących: %1 + + + + Could not execute final updating steps as root: %1 + Nie udało się wykonać ostatnich kroków jako administrator: %1 + + + + + + + Could not execute final updating steps as admin: %1 + Nie udało się wykonać ostatnich kroków jako administrator: %1 + + + + Cannot create temporary directory for updater. + Nie można stworzyć tymczasowego katalogu dla aktualizacji. + + + + Cannot create updater script file. + Nie można utworzyć skryptu aktualizacji. + + + + Updating canceled. + Aktualizacja wycofana. + + + + Could not execute final updating steps as administrator. + Nie udało się wykonać ostatich kroków aktualizacji jako administrator. + + + + Could not execute final updating steps as administrator. Updater startup timed out. + Nie udało się wykonać ostatich kroków aktualizacji jako administrator. Przekroczono limit czasu oczekiwania. + + + + Could not execute final updating steps as administrator. Updater operation timed out. + Nie udało się wykonać ostatich kroków aktualizacji jako administrator. Przekroczono limit czasu oczekiwania. + + + + Could not clean up temporary directory %1. You can delete it manually at any time. + Nie udało się wyczyścić katalogu tymczasowego %1. Możesz go usunąć ręcznie w dowolnym momencie. + + + + Could not run new version for continuing update. + Nie udało się uruchomić nowej wersji w celu kontynuowania aktualizacji. + + + + Package not in tar.gz format, cannot install: %1 + Paczka nie jest w formacie tar.gz, nie można zainstalować: %1 + + + + Package %1 cannot be installed, because cannot move it to directory: %2 + Paczka %1 nie może być zainstalowana, ponieważ nie można przenieść jej do katalogu: %2 + + + + Package %1 cannot be installed, because cannot unpack it: %2 + Paczka %1 nie może być zainstalowana, ponieważ nie można jej rozpakować: %2 + + + + Package not in zip format, cannot install: %1 + Paczka nie jest w formacie zip, nie można zainstalować: %1 + + + + Package %1 cannot be installed, because cannot unzip it to directory %2: %3 + Paczka %1 nie może być zainstalowana, ponieważ nie można jej rozpakować do katalogu %2: %3 + + + + Package %1 cannot be installed, because cannot unzip it to directory: %2 + Paczka %1 nie może być zainstalowana, ponieważ nie można jej rozpakować do katalogu %2 + + + + + Could not rename directory %1 to %2. + Nie udało się zmienić nazwy katalogu %1 na %2. + + + + Could not delete directory %1. + Nie udało się skasować katalogu %1. + + + + Error executing update command: %1 +Error message: %2 + Błąd podczas wykonywania polecenia aktualizacji: %1 +Treść błędu: %2 + + + + An error occurred while downloading updates: %1. Updating aborted. + Wystąpił błąd podczas pobierania aktualizacji: %1. Aktualizacja przerwana. + + + diff --git a/SQLiteStudio3/dirs.pri b/SQLiteStudio3/dirs.pri index 537d0c7..777c640 100644 --- a/SQLiteStudio3/dirs.pri +++ b/SQLiteStudio3/dirs.pri @@ -8,7 +8,6 @@ UI_DIR = $$PWD/../$$OUTPUT_DIR_NAME/build LIBS += -L$$DESTDIR - macx: { QMAKE_CXXFLAGS += -Wno-gnu-zero-variadic-macro-arguments -Wno-overloaded-virtual INCLUDEPATH += $$PWD/../../include diff --git a/SQLiteStudio3/guiSQLiteStudio/common/fontedit.ui b/SQLiteStudio3/guiSQLiteStudio/common/fontedit.ui index d8daa9f..575208f 100644 --- a/SQLiteStudio3/guiSQLiteStudio/common/fontedit.ui +++ b/SQLiteStudio3/guiSQLiteStudio/common/fontedit.ui @@ -7,24 +7,24 @@ 0 0 451 - 35 + 37 - Form + Form - TextLabel + TextLabel - ... + ... diff --git a/SQLiteStudio3/guiSQLiteStudio/common/numericspinbox.cpp b/SQLiteStudio3/guiSQLiteStudio/common/numericspinbox.cpp index 5a48033..e1b6620 100644 --- a/SQLiteStudio3/guiSQLiteStudio/common/numericspinbox.cpp +++ b/SQLiteStudio3/guiSQLiteStudio/common/numericspinbox.cpp @@ -34,7 +34,6 @@ QValidator::State NumericSpinBox::validate(QString& input, int& pos) const { UNUSED(input); UNUSED(pos); - emit modified(); if (strict) return validateStrict(input, pos); @@ -103,6 +102,7 @@ void NumericSpinBox::setStrict(bool value, bool allowEmpty) void NumericSpinBox::valueEdited(const QString& value) { setValueInternal(value); + emit modified(); } QAbstractSpinBox::StepEnabled NumericSpinBox::stepEnabled() const diff --git a/SQLiteStudio3/guiSQLiteStudio/completer/completeritemdelegate.cpp b/SQLiteStudio3/guiSQLiteStudio/completer/completeritemdelegate.cpp index bda3040..a0da399 100644 --- a/SQLiteStudio3/guiSQLiteStudio/completer/completeritemdelegate.cpp +++ b/SQLiteStudio3/guiSQLiteStudio/completer/completeritemdelegate.cpp @@ -51,7 +51,7 @@ void CompleterItemDelegate::paintIcon(QPainter* painter, const QStyleOptionViewI iconRect.setSize(iconSize + QSize(spacer*2, spacer*2)); iconRect.setTopLeft(iconRect.topLeft() + QPoint(spacer, spacer)); - QIcon::State state = option.state & QStyle::State_Open ? QIcon::On : QIcon::Off; + QIcon::State state = (option.state & QStyle::State_Open) ? QIcon::On : QIcon::Off; icon.paint(painter, iconRect, option.decorationAlignment, mode, state); } @@ -60,7 +60,7 @@ void CompleterItemDelegate::paintText(QPainter* painter, const QStyleOptionViewI painter->save(); // Colors - QPalette::ColorGroup cg = option.state & QStyle::State_Enabled ? QPalette::Normal : QPalette::Disabled; + QPalette::ColorGroup cg = (option.state & QStyle::State_Enabled) ? QPalette::Normal : QPalette::Disabled; if (cg == QPalette::Normal && !(option.state & QStyle::State_Active)) cg = QPalette::Inactive; diff --git a/SQLiteStudio3/guiSQLiteStudio/constraints/columncollatepanel.ui b/SQLiteStudio3/guiSQLiteStudio/constraints/columncollatepanel.ui index a481875..0c3478e 100644 --- a/SQLiteStudio3/guiSQLiteStudio/constraints/columncollatepanel.ui +++ b/SQLiteStudio3/guiSQLiteStudio/constraints/columncollatepanel.ui @@ -11,7 +11,7 @@ - Form + Form @@ -23,7 +23,16 @@ - + + 0 + + + 0 + + + 0 + + 0 @@ -46,7 +55,16 @@ - + + 0 + + + 0 + + + 0 + + 0 diff --git a/SQLiteStudio3/guiSQLiteStudio/constraints/columndefaultpanel.cpp b/SQLiteStudio3/guiSQLiteStudio/constraints/columndefaultpanel.cpp index 3d7090a..4f402b2 100644 --- a/SQLiteStudio3/guiSQLiteStudio/constraints/columndefaultpanel.cpp +++ b/SQLiteStudio3/guiSQLiteStudio/constraints/columndefaultpanel.cpp @@ -1,9 +1,9 @@ #include "columndefaultpanel.h" #include "ui_columndefaultpanel.h" -#include "parser/ast/sqlitecreatetable.h" #include "parser/parser.h" #include "parser/keywords.h" #include "uiutils.h" +#include "schemaresolver.h" #include ColumnDefaultPanel::ColumnDefaultPanel(QWidget *parent) : @@ -34,6 +34,22 @@ void ColumnDefaultPanel::changeEvent(QEvent *e) bool ColumnDefaultPanel::validate() { + if (!ui->exprEdit->isSyntaxChecked()) + { + setValidState(ui->exprEdit, false, tr("Enter a default value expression.")); + currentMode = Mode::ERROR; + return false; + } + + // First check if we already validated this text. + // This method is called twice, by both errors checking and syntax highlighting, + // because signal for textChange() is connected with call to updateValidation(). + QString text = ui->exprEdit->toPlainText(); + if (!lastValidatedText.isNull() && lastValidatedText == text) + return lastValidationResult; + + lastValidatedText = text; + bool nameOk = true; if (ui->namedCheck->isChecked() && ui->namedEdit->text().isEmpty()) nameOk = false; @@ -41,12 +57,40 @@ bool ColumnDefaultPanel::validate() bool exprOk = !ui->exprEdit->toPlainText().trimmed().isEmpty() && !ui->exprEdit->haveErrors(); - bool exprCheckedOk = exprOk && ui->exprEdit->isSyntaxChecked(); + QString exprError; + if (exprOk) + { + // Everything looks fine, so lets do the final check - if the value is considered constant by SQLite. + static QString tempDdlLiteralTpl = QStringLiteral("CREATE TABLE temp.%1 (col DEFAULT %2);"); + static QString tempDdlExprTpl = QStringLiteral("CREATE TABLE temp.%1 (col DEFAULT (%2));"); + static QString dropTempDdl = QStringLiteral("DROP TABLE IF EXISTS temp.%1;"); + + QString tableName = getTempTable(); + QString tempDdl = tempDdlExprTpl.arg(tableName, ui->exprEdit->toPlainText()); + SqlQueryPtr res = db->exec(tempDdl); + if (res->isError()) + { + tempDdl = tempDdlLiteralTpl.arg(tableName, ui->exprEdit->toPlainText()); + res = db->exec(tempDdl); + if (res->isError()) + { + exprOk = false; + exprError = tr("Invalid default value expression: %1").arg(res->getErrorText()); + } + else + currentMode = Mode::LITERAL; + } + else + currentMode = Mode::EXPR; + + db->exec(dropTempDdl.arg(tableName)); + } - setValidState(ui->exprEdit, exprOk, tr("Enter a default value expression.")); + setValidState(ui->exprEdit, exprOk, exprError); setValidState(ui->namedEdit, nameOk, tr("Enter a name of the constraint.")); - return exprCheckedOk && nameOk; + lastValidationResult = (exprOk && nameOk); + return lastValidationResult; } bool ColumnDefaultPanel::validateOnly() @@ -69,18 +113,99 @@ void ColumnDefaultPanel::storeConfiguration() if (constraint.isNull()) return; + if (currentMode == Mode::ERROR) + { + qCritical() << "Call to ColumnDefaultPanel::storeConfiguration() while its mode is in ERROR state."; + return; + } + SqliteCreateTable::Column::Constraint* constr = dynamic_cast(constraint.data()); constr->type = SqliteCreateTable::Column::Constraint::DEFAULT; - SqliteExprPtr expr = parseExpression(ui->exprEdit->toPlainText()); - SqliteExpr* newExpr = new SqliteExpr(*expr.data()); - newExpr->setParent(constraint.data()); - constr->expr = newExpr; + switch (currentMode) + { + case Mode::EXPR: + storeExpr(constr); + break; + case Mode::LITERAL: + storeLiteral(constr); + break; + case Mode::ERROR: + return; + } if (ui->namedCheck->isChecked()) constr->name = ui->namedEdit->text(); } +void ColumnDefaultPanel::storeExpr(SqliteCreateTable::Column::Constraint* constr) +{ + QString text = ui->exprEdit->toPlainText(); + clearDefault(constr); + if (text.toUpper() == "NULL") + { + // We will just use literal null, no need to create expression with null. + constr->literalNull = true; + return; + } + + Parser parser(db->getDialect()); + SqliteExpr* newExpr = parser.parseExpr(text); + newExpr->setParent(constraint.data()); + constr->expr = newExpr; +} + +void ColumnDefaultPanel::storeLiteral(SqliteCreateTable::Column::Constraint* constr) +{ + QString text = ui->exprEdit->toPlainText(); + + Parser parser(db->getDialect()); + SqliteCreateTablePtr createTable = parser.parse("CREATE TABLE tab (col DEFAULT "+text+");"); + if (!createTable || createTable->columns.size() == 0 || createTable->columns.first()->constraints.size() == 0) + { + qCritical() << "ColumnDefaultPanel::storeLiteral(): create table not parsed! Cannot store literal. Expression was:" << text; + return; + } + + SqliteCreateTable::Column::Constraint* parsedConstr = createTable->columns.first()->constraints.first(); + if (parsedConstr->type != SqliteCreateTable::Column::Constraint::Type::DEFAULT) + { + qCritical() << "ColumnDefaultPanel::storeLiteral(): parsed constraint not a DEFAULT! Cannot store literal. Expression was:" << text; + return; + } + + clearDefault(constr); + if (!parsedConstr->id.isNull()) + constr->id = parsedConstr->id; + else if (!parsedConstr->ctime.isNull()) + constr->ctime = parsedConstr->ctime.toUpper(); + else if (parsedConstr->expr) + { + qWarning() << "ColumnDefaultPanel::storeLiteral(): parsed constraint turned out to be an expression. This should be handled by ColumnDefaultPanel::storeExpr." + << "Expression was:" << text; + constr->expr = parsedConstr->expr; + parsedConstr->expr = nullptr; + constr->expr->setParent(constr); + } + else if (parsedConstr->literalNull) + constr->literalNull = true; + else + constr->literalValue = parsedConstr->literalValue; +} + +void ColumnDefaultPanel::clearDefault(SqliteCreateTable::Column::Constraint* constr) +{ + if (constr->expr) + { + delete constr->expr; + constr->expr = nullptr; + } + constr->literalNull = false; + constr->literalValue = QVariant(); + constr->id = QString(); + constr->ctime = QString(); +} + void ColumnDefaultPanel::init() { setFocusProxy(ui->exprEdit); @@ -101,101 +226,49 @@ void ColumnDefaultPanel::readConstraint() SqliteCreateTable::Column::Constraint* constr = dynamic_cast(constraint.data()); if (constr->expr) + { ui->exprEdit->setPlainText(constr->expr->detokenize()); + currentMode = Mode::EXPR; + } else if (!constr->literalValue.isNull()) - ui->exprEdit->setPlainText(constr->literalValue.toString()); - - if (!constr->name.isNull()) { - ui->namedCheck->setChecked(true); - ui->namedEdit->setText(constr->name); + ui->exprEdit->setPlainText(constr->literalValue.toString()); + currentMode = Mode::LITERAL; } -} - -void ColumnDefaultPanel::updateVirtualSql() -{ - ui->exprEdit->setDb(db); - - SqliteCreateTable::Column* column = dynamic_cast(constraint->parentStatement()); - SqliteCreateTable* createTable = dynamic_cast(column->parentStatement()); - - createTable->rebuildTokens(); - TokenList tokens = createTable->tokens; - TokenList colTokens = column->tokens; - if (createTable->columns.indexOf(column) == -1) + else if (!constr->id.isNull()) { - if (createTable->columns.size() == 0) - { - // No columns. Cannot get any context info. - return; - } - - colTokens = createTable->columns.last()->tokens; + ui->exprEdit->setPlainText(constr->id); + currentMode = Mode::LITERAL; } - - if (colTokens.size() == 0) + else if (!constr->ctime.isNull()) { - qWarning() << "CREATE TABLE tokens are invalid (0) while call to ColumnDefaultPanel::updateVirtualSql()."; - return; + ui->exprEdit->setPlainText(constr->ctime); + currentMode = Mode::LITERAL; } - - int idx = tokens.lastIndexOf(colTokens.last()); - if (idx == -1) + else if (constr->literalNull) { - qWarning() << "CREATE TABLE tokens are invalid while call to ColumnDefaultPanel::updateVirtualSql()."; - return; + ui->exprEdit->setPlainText("NULL"); + currentMode = Mode::LITERAL; } - idx++; - - TokenList newTokens; - newTokens << TokenPtr::create(Token::SPACE, " ") - << TokenPtr::create(Token::KEYWORD, "DEFAULT") - << TokenPtr::create(Token::SPACE, " "); - if (constraint->dialect == Dialect::Sqlite3) - { - newTokens << TokenPtr::create(Token::PAR_LEFT, "(") - << TokenPtr::create(Token::OTHER, "%1") - << TokenPtr::create(Token::PAR_RIGHT, ")"); - } - else + if (!constr->name.isNull()) { - newTokens << TokenPtr::create(Token::OTHER, "%1"); + ui->namedCheck->setChecked(true); + ui->namedEdit->setText(constr->name); } - - tokens.insert(idx, newTokens); - QString sql = tokens.detokenize(); - - ui->exprEdit->setVirtualSqlExpression(sql); } -SqliteExprPtr ColumnDefaultPanel::parseExpression(const QString& sql) +void ColumnDefaultPanel::updateVirtualSql() { - Parser parser(db->getDialect()); - if (!parser.parse("SELECT "+sql)) - return SqliteExprPtr(); - - QList queries = parser.getQueries(); - if (queries.size() == 0) - return SqliteExprPtr(); - - SqliteQueryPtr first = queries.first(); - if (first->queryType != SqliteQueryType::Select) - return SqliteExprPtr(); - - SqliteSelectPtr select = first.dynamicCast(); - if (select->coreSelects.size() < 1) - return SqliteExprPtr(); - - SqliteSelect::Core* core = select->coreSelects.first(); - if (core->resultColumns.size() < 1) - return SqliteExprPtr(); - - SqliteSelect::Core::ResultColumn* resCol = core->resultColumns.first(); - if (!resCol->expr) - return SqliteExprPtr(); + static QString sql = QStringLiteral("CREATE TABLE tab (col DEFAULT %1)"); + ui->exprEdit->setDb(db); + ui->exprEdit->setVirtualSqlExpression(sql.arg(db->getDialect() == Dialect::Sqlite3 ? "(%1)" : "%1")); +} - return resCol->expr->detach().dynamicCast(); +QString ColumnDefaultPanel::getTempTable() +{ + SchemaResolver resolver(db); + return resolver.getUniqueName("temp", "sqlitestudio_temp_table"); } void ColumnDefaultPanel::updateState() diff --git a/SQLiteStudio3/guiSQLiteStudio/constraints/columndefaultpanel.h b/SQLiteStudio3/guiSQLiteStudio/constraints/columndefaultpanel.h index 933c2dd..3cdd962 100644 --- a/SQLiteStudio3/guiSQLiteStudio/constraints/columndefaultpanel.h +++ b/SQLiteStudio3/guiSQLiteStudio/constraints/columndefaultpanel.h @@ -4,6 +4,7 @@ #include "constraintpanel.h" #include "parser/ast/sqliteconflictalgo.h" #include "guiSQLiteStudio_global.h" +#include "parser/ast/sqlitecreatetable.h" #include namespace Ui { @@ -27,12 +28,25 @@ class GUI_API_EXPORT ColumnDefaultPanel : public ConstraintPanel void storeConfiguration(); private: + enum class Mode + { + EXPR, + LITERAL, + ERROR + }; + void init(); void readConstraint(); void updateVirtualSql(); - SqliteExprPtr parseExpression(const QString& sql); + QString getTempTable(); + void storeExpr(SqliteCreateTable::Column::Constraint* constr); + void storeLiteral(SqliteCreateTable::Column::Constraint* constr); + void clearDefault(SqliteCreateTable::Column::Constraint* constr); Ui::ColumnDefaultPanel *ui = nullptr; + QString lastValidatedText; + bool lastValidationResult = false; + Mode currentMode = Mode::ERROR; private slots: void updateState(); diff --git a/SQLiteStudio3/guiSQLiteStudio/constraints/columndefaultpanel.ui b/SQLiteStudio3/guiSQLiteStudio/constraints/columndefaultpanel.ui index fdf55b0..0026fdb 100644 --- a/SQLiteStudio3/guiSQLiteStudio/constraints/columndefaultpanel.ui +++ b/SQLiteStudio3/guiSQLiteStudio/constraints/columndefaultpanel.ui @@ -11,7 +11,7 @@ - Form + Form diff --git a/SQLiteStudio3/guiSQLiteStudio/constraints/columnforeignkeypanel.cpp b/SQLiteStudio3/guiSQLiteStudio/constraints/columnforeignkeypanel.cpp index cf234f7..f4eb3eb 100644 --- a/SQLiteStudio3/guiSQLiteStudio/constraints/columnforeignkeypanel.cpp +++ b/SQLiteStudio3/guiSQLiteStudio/constraints/columnforeignkeypanel.cpp @@ -217,7 +217,7 @@ void ColumnForeignKeyPanel::storeConfiguration() storeCondition(SqliteForeignKey::Condition::DELETE, ui->onDeleteCombo->currentText()); if (ui->onUpdateCheckBox->isChecked()) - storeCondition(SqliteForeignKey::Condition::UPDATE, ui->onDeleteCombo->currentText()); + storeCondition(SqliteForeignKey::Condition::UPDATE, ui->onUpdateCombo->currentText()); if (ui->matchCheckBox->isChecked()) storeMatchCondition(ui->matchCombo->currentText()); diff --git a/SQLiteStudio3/guiSQLiteStudio/constraints/columnforeignkeypanel.ui b/SQLiteStudio3/guiSQLiteStudio/constraints/columnforeignkeypanel.ui index c442967..23e2300 100644 --- a/SQLiteStudio3/guiSQLiteStudio/constraints/columnforeignkeypanel.ui +++ b/SQLiteStudio3/guiSQLiteStudio/constraints/columnforeignkeypanel.ui @@ -17,7 +17,7 @@ - Form + Form @@ -61,7 +61,7 @@ - ON UPDATE + ON UPDATE @@ -71,14 +71,14 @@ - ON DELETE + ON DELETE - MATCH + MATCH diff --git a/SQLiteStudio3/guiSQLiteStudio/constraints/columnprimarykeypanel.ui b/SQLiteStudio3/guiSQLiteStudio/constraints/columnprimarykeypanel.ui index bedabca..d6c15d4 100644 --- a/SQLiteStudio3/guiSQLiteStudio/constraints/columnprimarykeypanel.ui +++ b/SQLiteStudio3/guiSQLiteStudio/constraints/columnprimarykeypanel.ui @@ -17,7 +17,7 @@ - Form + Form @@ -30,7 +30,16 @@ - + + 0 + + + 0 + + + 0 + + 0 @@ -56,7 +65,16 @@ - + + 0 + + + 0 + + + 0 + + 0 @@ -75,7 +93,16 @@ - + + 0 + + + 0 + + + 0 + + 0 diff --git a/SQLiteStudio3/guiSQLiteStudio/constraints/columnuniqueandnotnullpanel.ui b/SQLiteStudio3/guiSQLiteStudio/constraints/columnuniqueandnotnullpanel.ui index 16efc89..7a60f40 100644 --- a/SQLiteStudio3/guiSQLiteStudio/constraints/columnuniqueandnotnullpanel.ui +++ b/SQLiteStudio3/guiSQLiteStudio/constraints/columnuniqueandnotnullpanel.ui @@ -17,13 +17,22 @@ - Form + Form - + + 0 + + + 0 + + + 0 + + 0 @@ -42,7 +51,16 @@ - + + 0 + + + 0 + + + 0 + + 0 diff --git a/SQLiteStudio3/guiSQLiteStudio/constraints/constraintcheckpanel.ui b/SQLiteStudio3/guiSQLiteStudio/constraints/constraintcheckpanel.ui index 58f58e6..e7021b4 100644 --- a/SQLiteStudio3/guiSQLiteStudio/constraints/constraintcheckpanel.ui +++ b/SQLiteStudio3/guiSQLiteStudio/constraints/constraintcheckpanel.ui @@ -7,17 +7,17 @@ 0 0 400 - 197 + 211 - Form + Form - The expression + The condition diff --git a/SQLiteStudio3/guiSQLiteStudio/constraints/tableforeignkeypanel.cpp b/SQLiteStudio3/guiSQLiteStudio/constraints/tableforeignkeypanel.cpp index 60da220..7354997 100644 --- a/SQLiteStudio3/guiSQLiteStudio/constraints/tableforeignkeypanel.cpp +++ b/SQLiteStudio3/guiSQLiteStudio/constraints/tableforeignkeypanel.cpp @@ -327,7 +327,6 @@ void TableForeignKeyPanel::storeConfiguration() QCheckBox* check = nullptr; QComboBox* combo = nullptr; SqliteIndexedColumn* idxCol = nullptr; - QString name; for (int i = 0; i < totalColumns; i++) { // Local column @@ -352,7 +351,7 @@ void TableForeignKeyPanel::storeConfiguration() storeCondition(SqliteForeignKey::Condition::DELETE, ui->onDeleteCombo->currentText()); if (ui->onUpdateCheckBox->isChecked()) - storeCondition(SqliteForeignKey::Condition::UPDATE, ui->onDeleteCombo->currentText()); + storeCondition(SqliteForeignKey::Condition::UPDATE, ui->onUpdateCombo->currentText()); if (ui->matchCheckBox->isChecked()) storeMatchCondition(ui->matchCombo->currentText()); diff --git a/SQLiteStudio3/guiSQLiteStudio/constraints/tableforeignkeypanel.ui b/SQLiteStudio3/guiSQLiteStudio/constraints/tableforeignkeypanel.ui index 8917381..7ecbe06 100644 --- a/SQLiteStudio3/guiSQLiteStudio/constraints/tableforeignkeypanel.ui +++ b/SQLiteStudio3/guiSQLiteStudio/constraints/tableforeignkeypanel.ui @@ -17,7 +17,7 @@ - Form + Form @@ -129,7 +129,7 @@ but it's okay to use them anyway. - ON UPDATE + ON UPDATE @@ -139,14 +139,14 @@ but it's okay to use them anyway. - ON DELETE + ON DELETE - MATCH + MATCH diff --git a/SQLiteStudio3/guiSQLiteStudio/constraints/tablepkanduniquepanel.ui b/SQLiteStudio3/guiSQLiteStudio/constraints/tablepkanduniquepanel.ui index 9453d3c..52c5af1 100644 --- a/SQLiteStudio3/guiSQLiteStudio/constraints/tablepkanduniquepanel.ui +++ b/SQLiteStudio3/guiSQLiteStudio/constraints/tablepkanduniquepanel.ui @@ -11,7 +11,7 @@ - PrimaryKeyOrUniquePanel + PrimaryKeyOrUniquePanel diff --git a/SQLiteStudio3/guiSQLiteStudio/datagrid/sqlqueryitem.cpp b/SQLiteStudio3/guiSQLiteStudio/datagrid/sqlqueryitem.cpp index c732b6d..d631899 100644 --- a/SQLiteStudio3/guiSQLiteStudio/datagrid/sqlqueryitem.cpp +++ b/SQLiteStudio3/guiSQLiteStudio/datagrid/sqlqueryitem.cpp @@ -406,12 +406,14 @@ QString SqlQueryItem::loadFullData() return tr("This cell is not editable, because: %1").arg(SqlQueryModelColumn::resolveMessage(col->editionForbiddenReason.values().first())); } - if (isJustInsertedWithOutRowId()) - { - QString msg = tr("When inserted new row to the WITHOUT ROWID table, using DEFAULT value for PRIMARY KEY, " - "the table has to be reloaded in order to edit the new row."); - return tr("This cell is not editable, because: %1").arg(msg); - } + // This should not happen anymore (since WITHOUT ROWID tables should be handled properly now, + // but we will keep this here for a while, just in case. +// if (isJustInsertedWithOutRowId()) +// { +// QString msg = tr("When inserted new row to the WITHOUT ROWID table, using DEFAULT value for PRIMARY KEY, " +// "the table has to be reloaded in order to edit the new row."); +// return tr("This cell is not editable, because: %1").arg(msg); +// } SqlQueryModel *model = getModel(); Db* db = model->getDb(); diff --git a/SQLiteStudio3/guiSQLiteStudio/datagrid/sqlqueryitemdelegate.cpp b/SQLiteStudio3/guiSQLiteStudio/datagrid/sqlqueryitemdelegate.cpp index ab8f7f2..6741d08 100644 --- a/SQLiteStudio3/guiSQLiteStudio/datagrid/sqlqueryitemdelegate.cpp +++ b/SQLiteStudio3/guiSQLiteStudio/datagrid/sqlqueryitemdelegate.cpp @@ -7,6 +7,7 @@ #include #include #include +#include SqlQueryItemDelegate::SqlQueryItemDelegate(QObject *parent) : QStyledItemDelegate(parent) @@ -16,7 +17,6 @@ SqlQueryItemDelegate::SqlQueryItemDelegate(QObject *parent) : void SqlQueryItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const { QStyledItemDelegate::paint(painter, option, index); - SqlQueryItem* item = getItem(index); if (item->isUncommited()) @@ -54,6 +54,16 @@ QWidget* SqlQueryItemDelegate::createEditor(QWidget* parent, const QStyleOptionV return getEditor(item->getValue().userType(), parent); } +QString SqlQueryItemDelegate::displayText(const QVariant& value, const QLocale& locale) const +{ + UNUSED(locale); + + if (value.type() == QVariant::Double) + return value.toString(); + + return QStyledItemDelegate::displayText(value, locale); +} + SqlQueryItem* SqlQueryItemDelegate::getItem(const QModelIndex &index) const { const SqlQueryModel* queryModel = dynamic_cast(index.model()); diff --git a/SQLiteStudio3/guiSQLiteStudio/datagrid/sqlqueryitemdelegate.h b/SQLiteStudio3/guiSQLiteStudio/datagrid/sqlqueryitemdelegate.h index a190202..8b894ed 100644 --- a/SQLiteStudio3/guiSQLiteStudio/datagrid/sqlqueryitemdelegate.h +++ b/SQLiteStudio3/guiSQLiteStudio/datagrid/sqlqueryitemdelegate.h @@ -14,6 +14,7 @@ class GUI_API_EXPORT SqlQueryItemDelegate : public QStyledItemDelegate void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const; QWidget* createEditor(QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index) const; + QString displayText(const QVariant & value, const QLocale & locale) const; private: SqlQueryItem* getItem(const QModelIndex &index) const; diff --git a/SQLiteStudio3/guiSQLiteStudio/datagrid/sqlquerymodel.cpp b/SQLiteStudio3/guiSQLiteStudio/datagrid/sqlquerymodel.cpp index caeab3b..cb0f27a 100644 --- a/SQLiteStudio3/guiSQLiteStudio/datagrid/sqlquerymodel.cpp +++ b/SQLiteStudio3/guiSQLiteStudio/datagrid/sqlquerymodel.cpp @@ -975,7 +975,7 @@ void SqlQueryModel::handleExecFinished(SqlQueryPtr results) { if (results->isError()) { - emit executionFailed(tr("Error while executing SQL query: %1").arg(results->getErrorText())); + emit executionFailed(tr("Error while executing SQL query on database '%1': %2").arg(db->getName(), results->getErrorText())); return; } @@ -992,11 +992,18 @@ void SqlQueryModel::handleExecFinished(SqlQueryPtr results) reloading = false; - if (queryExecutor->isRowCountingRequired() || rowCount() < CFG_UI.General.NumberOfRowsPerPage.get()) - emit totalRowsAndPagesAvailable(); // rows were counted manually + bool rowsCountedManually = queryExecutor->isRowCountingRequired() || rowCount() < CFG_UI.General.NumberOfRowsPerPage.get(); + bool countRes = false; + if (rowsCountedManually) + emit totalRowsAndPagesAvailable(); else - queryExecutor->countResults(); + countRes = queryExecutor->countResults(); + if (!countRes || !queryExecutor->getAsyncMode()) + { + results.clear(); + detachDatabases(); + } } void SqlQueryModel::handleExecFailed(int code, QString errorMessage) @@ -1019,7 +1026,7 @@ void SqlQueryModel::handleExecFailed(int code, QString errorMessage) emit executionFailed(tr("Error while loading query results: %1").arg(errorMessage)); } else - emit executionFailed(tr("Error while executing SQL query: %1").arg(errorMessage)); + emit executionFailed(tr("Error while executing SQL query on database '%1': %2").arg(db->getName(), errorMessage)); restoreNumbersToQueryExecutor(); resultsCountingFinished(0, 0, 0); @@ -1032,6 +1039,7 @@ void SqlQueryModel::resultsCountingFinished(quint64 rowsAffected, quint64 rowsRe this->rowsAffected = rowsAffected; this->totalRowsReturned = rowsReturned; this->totalPages = totalPages; + detachDatabases(); emit totalRowsAndPagesAvailable(); } @@ -1150,10 +1158,10 @@ void SqlQueryModel::storeStep1NumbersFromExecution() lastExecutionTime = queryExecutor->getLastExecutionTime(); page = queryExecutor->getPage(); sortOrder = queryExecutor->getSortOrder(); + rowsAffected = queryExecutor->getRowsAffected(); if (!queryExecutor->getSkipRowCounting()) { - rowsAffected = queryExecutor->getRowsAffected(); totalPages = queryExecutor->getTotalPages(); if (!queryExecutor->isRowCountingRequired()) totalRowsReturned = queryExecutor->getTotalRowsReturned(); @@ -1214,6 +1222,11 @@ bool SqlQueryModel::wasSchemaModified() const return queryExecutor->wasSchemaModified(); } +bool SqlQueryModel::wasDataModifyingQuery() const +{ + return queryExecutor->wasDataModifyingQuery(); +} + void SqlQueryModel::updateSelectiveCommitRollbackActions(const QItemSelection& selected, const QItemSelection& deselected) { UNUSED(selected); @@ -1310,6 +1323,11 @@ Icon& SqlQueryModel::getIconForIdx(int idx) const return ICONS.SORT_COUNT_20_PLUS; } +void SqlQueryModel::detachDatabases() +{ + queryExecutor->releaseResultsAndCleanup(); +} + void SqlQueryModel::addNewRow() { int row = rowCount(); @@ -1483,7 +1501,7 @@ void SqlQueryModel::CommitUpdateQueryBuilder::setTable(const QString& table) void SqlQueryModel::CommitUpdateQueryBuilder::setColumn(const QString& column) { - this->columns = {column}; + this->columns = QStringList({column}); } void SqlQueryModel::CommitUpdateQueryBuilder::addColumn(const QString& column) diff --git a/SQLiteStudio3/guiSQLiteStudio/datagrid/sqlquerymodel.h b/SQLiteStudio3/guiSQLiteStudio/datagrid/sqlquerymodel.h index cb626ae..cbdd606 100644 --- a/SQLiteStudio3/guiSQLiteStudio/datagrid/sqlquerymodel.h +++ b/SQLiteStudio3/guiSQLiteStudio/datagrid/sqlquerymodel.h @@ -113,6 +113,7 @@ class GUI_API_EXPORT SqlQueryModel : public QStandardItemModel * @return true if schema was modified, or false if not. */ bool wasSchemaModified() const; + bool wasDataModifyingQuery() const; SqlQueryView* getView() const; void setView(SqlQueryView* value); @@ -254,6 +255,7 @@ class GUI_API_EXPORT SqlQueryModel : public QStandardItemModel void reloadInternal(); void addNewRowInternal(int rowIdx); Icon& getIconForIdx(int idx) const; + void detachDatabases(); QString query; bool explain = false; diff --git a/SQLiteStudio3/guiSQLiteStudio/datagrid/sqlquerymodelcolumn.cpp b/SQLiteStudio3/guiSQLiteStudio/datagrid/sqlquerymodelcolumn.cpp index 62d0b45..0966ede 100644 --- a/SQLiteStudio3/guiSQLiteStudio/datagrid/sqlquerymodelcolumn.cpp +++ b/SQLiteStudio3/guiSQLiteStudio/datagrid/sqlquerymodelcolumn.cpp @@ -63,7 +63,8 @@ QString SqlQueryModelColumn::resolveMessage(SqlQueryModelColumn::EditionForbidde switch (reason) { case EditionForbiddenReason::COMPOUND_SELECT: - return QObject::tr("Cannot edit columns that are result of compound SELECT statements (one that includes UNION, INTERSECT or EXCEPT keywords)."); + return QObject::tr("Cannot edit columns that are result of compound %1 statements (one that includes %2, %3 or %4 keywords).") + .arg("SELECT", "UNION", "INTERSECT", "EXCEPT"); case EditionForbiddenReason::SMART_EXECUTION_FAILED: return QObject::tr("The query execution mechanism had problems with extracting ROWID's properly. This might be a bug in the application. You may want to report this."); case EditionForbiddenReason::EXPRESSION: @@ -71,11 +72,11 @@ QString SqlQueryModelColumn::resolveMessage(SqlQueryModelColumn::EditionForbidde case EditionForbiddenReason::SYSTEM_TABLE: return QObject::tr("Requested column belongs to restricted SQLite table. Those tables cannot be edited directly."); case EditionForbiddenReason::NOT_A_SELECT: - return QObject::tr("Cannot edit results of query other than SELECT."); + return QObject::tr("Cannot edit results of query other than %1.").arg("SELECT"); case EditionForbiddenReason::GROUPED_RESULTS: - return QObject::tr("Cannot edit columns that are result of aggregated SELECT statements."); + return QObject::tr("Cannot edit columns that are result of aggregated %1 statements.").arg("SELECT"); case EditionForbiddenReason::DISTINCT_RESULTS: - return QObject::tr("Cannot edit columns that are result of SELECT DISTINCT statement."); + return QObject::tr("Cannot edit columns that are result of %1 statement.").arg("SELECT DISTINCT"); case EditionForbiddenReason::COMMON_TABLE_EXPRESSION: return QObject::tr("Cannot edit columns that are result of common table expression statement (%1).").arg("WITH ... SELECT ..."); } diff --git a/SQLiteStudio3/guiSQLiteStudio/datagrid/sqlqueryview.cpp b/SQLiteStudio3/guiSQLiteStudio/datagrid/sqlqueryview.cpp index e4a0656..1f08b30 100644 --- a/SQLiteStudio3/guiSQLiteStudio/datagrid/sqlqueryview.cpp +++ b/SQLiteStudio3/guiSQLiteStudio/datagrid/sqlqueryview.cpp @@ -35,88 +35,19 @@ SqlQueryView::~SqlQueryView() delete itemDelegate; } -QList SqlQueryView::getSelectedItems() -{ - QList items; - QModelIndexList idxList = selectionModel()->selectedIndexes(); - QModelIndex currIdx = getCurrentIndex(); - if (!idxList.contains(currIdx) && currIdx.isValid()) - idxList << currIdx; - - if (idxList.size() == 0) - return items; - - qSort(idxList); - const SqlQueryModel* model = dynamic_cast(idxList.first().model()); - foreach (const QModelIndex& idx, idxList) - items << model->itemFromIndex(idx); - - return items; -} - -SqlQueryItem* SqlQueryView::getCurrentItem() -{ - QModelIndex idx = getCurrentIndex(); - if (!idx.isValid()) - return nullptr; - - return getModel()->itemFromIndex(idx); -} - -SqlQueryModel* SqlQueryView::getModel() -{ - return dynamic_cast(model()); -} - -void SqlQueryView::setModel(QAbstractItemModel* model) -{ - QTableView::setModel(model); - connect(widgetCover, SIGNAL(cancelClicked()), getModel(), SLOT(interrupt())); - connect(getModel(), &SqlQueryModel::commitStatusChanged, this, &SqlQueryView::updateCommitRollbackActions); - connect(getModel(), &SqlQueryModel::sortingUpdated, this, &SqlQueryView::sortingUpdated); -} - -SqlQueryItem* SqlQueryView::itemAt(const QPoint& pos) -{ - return dynamic_cast(getModel()->itemFromIndex(indexAt(pos))); -} - -QToolBar* SqlQueryView::getToolBar(int toolbar) const -{ - UNUSED(toolbar); - return nullptr; -} - -void SqlQueryView::addAdditionalAction(QAction* action) -{ - additionalActions << action; -} - -QModelIndex SqlQueryView::getCurrentIndex() const -{ - return currentIndex(); -} - -void SqlQueryView::mouseDoubleClickEvent(QMouseEvent* event) -{ - SqlQueryItem* item = itemAt(event->pos()); - if (item && !handleDoubleClick(item)) - return; - - QTableView::mouseDoubleClickEvent(event); -} - void SqlQueryView::init() { itemDelegate = new SqlQueryItemDelegate(); setItemDelegate(itemDelegate); setMouseTracking(true); + setEditTriggers(QAbstractItemView::AnyKeyPressed); setContextMenuPolicy(Qt::CustomContextMenu); contextMenu = new QMenu(this); connect(this, &QWidget::customContextMenuRequested, this, &SqlQueryView::customContextMenuRequested); connect(CFG_UI.Fonts.DataView, SIGNAL(changed(QVariant)), this, SLOT(updateFont())); + connect(this, SIGNAL(activated(QModelIndex)), this, SLOT(itemActivated(QModelIndex))); horizontalHeader()->setSortIndicatorShown(false); horizontalHeader()->setSectionsClickable(true); @@ -227,7 +158,84 @@ void SqlQueryView::setupHeaderMenu() headerContextMenu->addAction(actionMap[RESET_SORTING]); } -bool SqlQueryView::handleDoubleClick(SqlQueryItem* item) +QList SqlQueryView::getSelectedItems() +{ + QList items; + QModelIndexList idxList = selectionModel()->selectedIndexes(); + QModelIndex currIdx = getCurrentIndex(); + if (!idxList.contains(currIdx) && currIdx.isValid()) + idxList << currIdx; + + if (idxList.size() == 0) + return items; + + qSort(idxList); + const SqlQueryModel* model = dynamic_cast(idxList.first().model()); + foreach (const QModelIndex& idx, idxList) + items << model->itemFromIndex(idx); + + return items; +} + +SqlQueryItem* SqlQueryView::getCurrentItem() +{ + QModelIndex idx = getCurrentIndex(); + if (!idx.isValid()) + return nullptr; + + return getModel()->itemFromIndex(idx); +} + +SqlQueryModel* SqlQueryView::getModel() +{ + return dynamic_cast(model()); +} + +void SqlQueryView::setModel(QAbstractItemModel* model) +{ + QTableView::setModel(model); + connect(widgetCover, SIGNAL(cancelClicked()), getModel(), SLOT(interrupt())); + connect(getModel(), &SqlQueryModel::commitStatusChanged, this, &SqlQueryView::updateCommitRollbackActions); + connect(getModel(), &SqlQueryModel::sortingUpdated, this, &SqlQueryView::sortingUpdated); +} + +SqlQueryItem* SqlQueryView::itemAt(const QPoint& pos) +{ + return dynamic_cast(getModel()->itemFromIndex(indexAt(pos))); +} + +QToolBar* SqlQueryView::getToolBar(int toolbar) const +{ + UNUSED(toolbar); + return nullptr; +} + +void SqlQueryView::addAdditionalAction(QAction* action) +{ + additionalActions << action; +} + +QModelIndex SqlQueryView::getCurrentIndex() const +{ + return currentIndex(); +} + +void SqlQueryView::itemActivated(const QModelIndex& index) +{ + if (!index.isValid()) + return; + + SqlQueryItem* item = getModel()->itemFromIndex(index); + if (!item) + return; + + if (!editInEditorIfNecessary(item)) + return; + + edit(getCurrentIndex()); +} + +bool SqlQueryView::editInEditorIfNecessary(SqlQueryItem* item) { if (item->getColumn()->dataType.getType() == DataType::BLOB) { diff --git a/SQLiteStudio3/guiSQLiteStudio/datagrid/sqlqueryview.h b/SQLiteStudio3/guiSQLiteStudio/datagrid/sqlqueryview.h index 65486fe..a523200 100644 --- a/SQLiteStudio3/guiSQLiteStudio/datagrid/sqlqueryview.h +++ b/SQLiteStudio3/guiSQLiteStudio/datagrid/sqlqueryview.h @@ -71,9 +71,6 @@ class GUI_API_EXPORT SqlQueryView : public QTableView, public ExtActionContainer void addAdditionalAction(QAction* action); QModelIndex getCurrentIndex() const; - protected: - void mouseDoubleClickEvent(QMouseEvent* event); - private: void init(); void setupWidgetCover(); @@ -82,7 +79,7 @@ class GUI_API_EXPORT SqlQueryView : public QTableView, public ExtActionContainer void refreshShortcuts(); void setupActionsForMenu(SqlQueryItem* currentItem, const QList& selectedItems); void setupHeaderMenu(); - bool handleDoubleClick(SqlQueryItem* item); + bool editInEditorIfNecessary(SqlQueryItem* item); SqlQueryItemDelegate* itemDelegate = nullptr; QMenu* contextMenu = nullptr; @@ -100,6 +97,7 @@ class GUI_API_EXPORT SqlQueryView : public QTableView, public ExtActionContainer void resetSorting(); void sortingUpdated(const QueryExecutor::SortList& sortOrder); void updateFont(); + void itemActivated(const QModelIndex& index); public slots: void executionStarted(); diff --git a/SQLiteStudio3/guiSQLiteStudio/datagrid/sqltablemodel.cpp b/SQLiteStudio3/guiSQLiteStudio/datagrid/sqltablemodel.cpp index d097d55..b0da325 100644 --- a/SQLiteStudio3/guiSQLiteStudio/datagrid/sqltablemodel.cpp +++ b/SQLiteStudio3/guiSQLiteStudio/datagrid/sqltablemodel.cpp @@ -103,13 +103,15 @@ bool SqlTableModel::commitDeletedRow(const QList& itemsInRow) return false; } - if (itemsInRow[0]->isJustInsertedWithOutRowId()) - { - QString msg = tr("When inserted new row to the WITHOUT ROWID table, using DEFAULT value for PRIMARY KEY, " - "the table has to be reloaded in order to delete the new row."); - notifyError(tr("Error while deleting row from table %1: %2").arg(table).arg(msg)); - return false; - } + // This should not happen anymore (since WITHOUT ROWID tables should be handled properly now, + // but we will keep this here for a while, just in case. +// if (itemsInRow[0]->isJustInsertedWithOutRowId()) +// { +// QString msg = tr("When inserted new row to the WITHOUT ROWID table, using DEFAULT value for PRIMARY KEY, " +// "the table has to be reloaded in order to delete the new row."); +// notifyError(tr("Error while deleting row from table %1: %2").arg(table).arg(msg)); +// return false; +// } RowId rowId = itemsInRow[0]->getRowId(); if (rowId.isEmpty()) diff --git a/SQLiteStudio3/guiSQLiteStudio/dblistmodel.cpp b/SQLiteStudio3/guiSQLiteStudio/dblistmodel.cpp index baa0f76..af9da8f 100644 --- a/SQLiteStudio3/guiSQLiteStudio/dblistmodel.cpp +++ b/SQLiteStudio3/guiSQLiteStudio/dblistmodel.cpp @@ -55,6 +55,11 @@ Db* DbListModel::getDb(int index) return dbList[index]; } +int DbListModel::getIndexForDb(Db* db) +{ + return dbList.indexOf(db); +} + void DbListModel::setSortMode(DbListModel::SortMode sortMode) { this->sortMode = sortMode; diff --git a/SQLiteStudio3/guiSQLiteStudio/dblistmodel.h b/SQLiteStudio3/guiSQLiteStudio/dblistmodel.h index 121db4d..57928df 100644 --- a/SQLiteStudio3/guiSQLiteStudio/dblistmodel.h +++ b/SQLiteStudio3/guiSQLiteStudio/dblistmodel.h @@ -26,6 +26,7 @@ class GUI_API_EXPORT DbListModel : public QAbstractListModel QModelIndex sibling(int row, int column, const QModelIndex & idx) const; Db* getDb(int index); + int getIndexForDb(Db* db); void setSortMode(SortMode sortMode); SortMode getSortMode() const; void setSortMode(const QString& sortMode); diff --git a/SQLiteStudio3/guiSQLiteStudio/dbobjectdialogs.h b/SQLiteStudio3/guiSQLiteStudio/dbobjectdialogs.h index bedbab8..f9a36ee 100644 --- a/SQLiteStudio3/guiSQLiteStudio/dbobjectdialogs.h +++ b/SQLiteStudio3/guiSQLiteStudio/dbobjectdialogs.h @@ -14,6 +14,8 @@ class ViewWindow; class GUI_API_EXPORT DbObjectDialogs : public QObject { + Q_OBJECT + public: explicit DbObjectDialogs(Db* db); DbObjectDialogs(Db* db, QWidget* parentWidget); diff --git a/SQLiteStudio3/guiSQLiteStudio/dbtree/dbtree.cpp b/SQLiteStudio3/guiSQLiteStudio/dbtree/dbtree.cpp index 8e137a4..509594d 100644 --- a/SQLiteStudio3/guiSQLiteStudio/dbtree/dbtree.cpp +++ b/SQLiteStudio3/guiSQLiteStudio/dbtree/dbtree.cpp @@ -114,20 +114,21 @@ void DbTree::createActions() createAction(INTEGRITY_CHECK, ICONS.INTEGRITY_CHECK, tr("Integrity check"), this, SLOT(integrityCheck()), this); createAction(ADD_TABLE, ICONS.TABLE_ADD, tr("Create a table"), this, SLOT(addTable()), this); createAction(EDIT_TABLE, ICONS.TABLE_EDIT, tr("Edit the table"), this, SLOT(editTable()), this); - createAction(DEL_TABLE, ICONS.TABLE_DEL, tr("Drop the table"), this, SLOT(delTable()), this); + createAction(DEL_TABLE, ICONS.TABLE_DEL, tr("Delete the table"), this, SLOT(delTable()), this); createAction(EXPORT_TABLE, ICONS.TABLE_EXPORT, tr("Export the table"), this, SLOT(exportTable()), this); createAction(IMPORT_TABLE, ICONS.TABLE_IMPORT, tr("Import into the table"), this, SLOT(importTable()), this); createAction(POPULATE_TABLE, ICONS.TABLE_POPULATE, tr("Populate table"), this, SLOT(populateTable()), this); createAction(CREATE_SIMILAR_TABLE, ICONS.TABLE_CREATE_SIMILAR, tr("Create similar table"), this, SLOT(createSimilarTable()), this); + createAction(RESET_AUTOINCREMENT, ICONS.RESET_AUTOINCREMENT, tr("Reset autoincrement sequence"), this, SLOT(resetAutoincrement()), this); createAction(ADD_INDEX, ICONS.INDEX_ADD, tr("Create an index"), this, SLOT(addIndex()), this); createAction(EDIT_INDEX, ICONS.INDEX_EDIT, tr("Edit the index"), this, SLOT(editIndex()), this); - createAction(DEL_INDEX, ICONS.INDEX_DEL, tr("Drop the index"), this, SLOT(delIndex()), this); + createAction(DEL_INDEX, ICONS.INDEX_DEL, tr("Delete the index"), this, SLOT(delIndex()), this); createAction(ADD_TRIGGER, ICONS.TRIGGER_ADD, tr("Create a trigger"), this, SLOT(addTrigger()), this); createAction(EDIT_TRIGGER, ICONS.TRIGGER_EDIT, tr("Edit the trigger"), this, SLOT(editTrigger()), this); - createAction(DEL_TRIGGER, ICONS.TRIGGER_DEL, tr("Drop the trigger"), this, SLOT(delTrigger()), this); + createAction(DEL_TRIGGER, ICONS.TRIGGER_DEL, tr("Delete the trigger"), this, SLOT(delTrigger()), this); createAction(ADD_VIEW, ICONS.VIEW_ADD, tr("Create a view"), this, SLOT(addView()), this); createAction(EDIT_VIEW, ICONS.VIEW_EDIT, tr("Edit the view"), this, SLOT(editView()), this); - createAction(DEL_VIEW, ICONS.VIEW_DEL, tr("Drop the view"), this, SLOT(delView()), this); + createAction(DEL_VIEW, ICONS.VIEW_DEL, tr("Delete the view"), this, SLOT(delView()), this); createAction(ADD_COLUMN, ICONS.TABLE_COLUMN_ADD, tr("Add a column"), this, SLOT(addColumn()), this); createAction(EDIT_COLUMN, ICONS.TABLE_COLUMN_EDIT, tr("Edit the column"), this, SLOT(editColumn()), this); createAction(DEL_COLUMN, ICONS.TABLE_COLUMN_DELETE, tr("Delete the column"), this, SLOT(delColumn()), this); @@ -188,7 +189,7 @@ void DbTree::updateActionStates(const QStandardItem *item) break; case DbTreeItem::Type::TABLE: enabled << EDIT_TABLE << DEL_TABLE << EXPORT_TABLE << IMPORT_TABLE << POPULATE_TABLE << ADD_COLUMN << CREATE_SIMILAR_TABLE; - enabled << ADD_INDEX << ADD_TRIGGER; + enabled << RESET_AUTOINCREMENT << ADD_INDEX << ADD_TRIGGER; break; case DbTreeItem::Type::VIRTUAL_TABLE: // TODO change below when virtual tables can be edited @@ -304,12 +305,12 @@ void DbTree::setupActionsForMenu(DbTreeItem* currItem, QMenu* contextMenu) { QList actions; - ActionEntry dbEntry(ICONS.DATABASE, tr("Datatabase")); + ActionEntry dbEntry(ICONS.DATABASE, tr("Database")); dbEntry += ADD_DB; dbEntry += EDIT_DB; dbEntry += DELETE_DB; - ActionEntry dbEntryExt(ICONS.DATABASE, tr("Datatabase")); + ActionEntry dbEntryExt(ICONS.DATABASE, tr("Database")); dbEntryExt += CONNECT_TO_DB; dbEntryExt += DISCONNECT_FROM_DB; dbEntryExt += _separator; @@ -391,6 +392,7 @@ void DbTree::setupActionsForMenu(DbTreeItem* currItem, QMenu* contextMenu) actions += ActionEntry(EXPORT_TABLE); actions += ActionEntry(POPULATE_TABLE); actions += ActionEntry(CREATE_SIMILAR_TABLE); + actions += ActionEntry(RESET_AUTOINCREMENT); actions += ActionEntry(_separator); actions += dbEntryExt; break; @@ -875,6 +877,7 @@ void DbTree::refreshSchema(Db* db) return; treeModel->refreshSchema(db); + updateActionsForCurrent(); } void DbTree::copy() @@ -929,7 +932,7 @@ void DbTree::createGroup() while (existingItems.contains(name = QInputDialog::getText(this, tr("Create group"), tr("Group name"))) || (name.isEmpty() && !name.isNull())) { - QMessageBox::information(this, tr("Create directory"), tr("Entry with name %1 already exists in directory %2.") + QMessageBox::information(this, tr("Create group"), tr("Entry with name %1 already exists in group %2.") .arg(name).arg(currItem->text()), QMessageBox::Ok); } @@ -1370,6 +1373,32 @@ void DbTree::createSimilarTable() dialog.addTableSimilarTo(QString(), table); } +void DbTree::resetAutoincrement() +{ + Db* db = getSelectedDb(); + if (!db || !db->isValid()) + return; + + DbTreeItem* item = ui->treeView->currentItem(); + QString table = item->getTable(); + if (table.isNull()) + { + qWarning() << "Tried to reset autoincrement, while table wasn't selected in DbTree."; + return; + } + + QMessageBox::StandardButton btn = QMessageBox::question(this, tr("Reset autoincrement"), tr("Are you sure you want to reset autoincrement value for table '%1'?") + .arg(table)); + if (btn != QMessageBox::Yes) + return; + + SqlQueryPtr res = db->exec("DELETE FROM sqlite_sequence WHERE name = ?;", {table}); + if (res->isError()) + notifyError(tr("An error occurred while trying to reset autoincrement value for table '%1': %2").arg(table, res->getErrorText())); + else + notifyInfo(tr("Autoincrement value for table '%1' has been reset successfly.").arg(table)); +} + void DbTree::addColumn(DbTreeItem* item) { Db* db = getSelectedOpenDb(); @@ -1500,7 +1529,7 @@ void DbTree::deleteItems(const QList& itemsToDelete) if (deletedDatabases.contains(dbToRefresh)) continue; - DBTREE->refreshSchema(dbToRefresh); + refreshSchema(dbToRefresh); } } @@ -1508,6 +1537,8 @@ void DbTree::refreshSchemas() { foreach (Db* db, DBLIST->getDbList()) treeModel->refreshSchema(db); + + updateActionsForCurrent(); } void DbTree::interrupt() diff --git a/SQLiteStudio3/guiSQLiteStudio/dbtree/dbtree.h b/SQLiteStudio3/guiSQLiteStudio/dbtree/dbtree.h index b368c08..60b8dd5 100644 --- a/SQLiteStudio3/guiSQLiteStudio/dbtree/dbtree.h +++ b/SQLiteStudio3/guiSQLiteStudio/dbtree/dbtree.h @@ -83,6 +83,7 @@ class GUI_API_EXPORT DbTree : public QDockWidget, public ExtActionContainer REFRESH_SCHEMAS, REFRESH_SCHEMA, CREATE_SIMILAR_TABLE, + RESET_AUTOINCREMENT, _separator // Never use it directly, it's just for menu setup }; @@ -107,6 +108,8 @@ class GUI_API_EXPORT DbTree : public QDockWidget, public ExtActionContainer void setSelectedItem(DbTreeItem* item); bool isMimeDataValidForItem(const QMimeData* mimeData, const DbTreeItem* item); QToolBar* getToolBar(int toolbar) const; + Db* getSelectedDb(); + Db* getSelectedOpenDb(); static bool isItemDraggable(const DbTreeItem* item); @@ -116,8 +119,6 @@ class GUI_API_EXPORT DbTree : public QDockWidget, public ExtActionContainer private: void setActionEnabled(int action, bool enabled); - Db* getSelectedDb(); - Db* getSelectedOpenDb(); TableWindow* openTable(DbTreeItem* item); TableWindow* openTable(Db* db, const QString& database, const QString& table); TableWindow* newTable(DbTreeItem* item); @@ -147,6 +148,7 @@ class GUI_API_EXPORT DbTree : public QDockWidget, public ExtActionContainer void refreshSchema(Db* db); void refreshSchemas(); void interrupt(); + void updateActionsForCurrent(); private slots: void copy(); @@ -184,6 +186,7 @@ class GUI_API_EXPORT DbTree : public QDockWidget, public ExtActionContainer void vacuumDb(); void integrityCheck(); void createSimilarTable(); + void resetAutoincrement(); void addColumn(DbTreeItem* item); void editColumn(DbTreeItem* item); void delColumn(DbTreeItem* item); @@ -191,7 +194,6 @@ class GUI_API_EXPORT DbTree : public QDockWidget, public ExtActionContainer void deleteSelected(); void deleteItems(const QList& itemsToDelete); void refreshSchema(); - void updateActionsForCurrent(); void dbConnected(Db* db); void dbDisconnected(Db* db); void updateDbIcon(Db* db); diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/aboutdialog.cpp b/SQLiteStudio3/guiSQLiteStudio/dialogs/aboutdialog.cpp index df790de..0d291e5 100644 --- a/SQLiteStudio3/guiSQLiteStudio/dialogs/aboutdialog.cpp +++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/aboutdialog.cpp @@ -4,6 +4,9 @@ #include "sqlitestudio.h" #include "iconmanager.h" #include "services/extralicensemanager.h" +#include "services/pluginmanager.h" +#include "formmanager.h" +#include "iconmanager.h" #include #include @@ -26,6 +29,7 @@ void AboutDialog::init(InitialMode initialMode) ui->tabWidget->setCurrentWidget(initialMode == ABOUT ? ui->about : ui->license); + // About QString distName; switch (getDistributionType()) { @@ -43,15 +47,23 @@ void AboutDialog::init(InitialMode initialMode) QString newLabelValue = ui->aboutLabel->text().arg(SQLITESTUDIO->getVersionString(), distName); ui->aboutLabel->setText(newLabelValue); + // Licenses licenseContents = ""; int row = 1; - QHash licenses = SQLITESTUDIO->getExtraLicenseManager()->getLicenses(); + QHash licenses = SQLITESTUDIO->getExtraLicenseManager()->getLicensesContents(); + QString violation; + QString title; QHashIterator it(licenses); while (it.hasNext()) { it.next(); - readLicense(row++, it.key(), it.value()); + violation = QString(); + title = it.key(); + if (SQLITESTUDIO->getExtraLicenseManager()->isViolatedLicense(title)) + violation = SQLITESTUDIO->getExtraLicenseManager()->getViolationMessage(title); + + addLicense(row++, title, it.value(), violation); } buildIndex(); @@ -59,6 +71,18 @@ void AboutDialog::init(InitialMode initialMode) ui->licenseEdit->setHtml(licenseContents); indexContents.clear(); licenseContents.clear(); + + // Environment + copyAct = new QAction(tr("Copy"), this); + ui->appDirEdit->setText(qApp->applicationDirPath()); + ui->cfgDirEdit->setText(CFG->getConfigDir()); + ui->pluginDirList->addItems(filterResourcePaths(PLUGINS->getPluginDirs())); + ui->iconDirList->addItems(filterResourcePaths(ICONMANAGER->getIconDirs())); + ui->formDirList->addItems(filterResourcePaths(FORMS->getFormDirs())); + ui->qtVerEdit->setText(QT_VERSION_STR); + ui->pluginDirList->addAction(copyAct); + ui->iconDirList->addAction(copyAct); + ui->formDirList->addAction(copyAct); } void AboutDialog::buildIndex() @@ -68,16 +92,19 @@ void AboutDialog::buildIndex() for (const QString& idx : indexContents) entries += entryTpl.arg(idx); - licenseContents.prepend("

Table of contents:

    " + entries.join("") + "
"); + licenseContents.prepend(tr("

Table of contents:

    %2
").arg(entries.join(""))); } -void AboutDialog::readLicense(int row, const QString& title, const QString& path) +void AboutDialog::addLicense(int row, const QString& title, const QString& contents, const QString& violation) { + static_qstring(violatedTpl, "%1 (%2)"); + + QString escapedTitle = title.toHtmlEscaped(); + QString finalTitle = violation.isNull() ? escapedTitle : violatedTpl.arg(escapedTitle, violation); QString rowNum = QString::number(row); - QString contents = readFile(path); - licenseContents += "

" + rowNum + ". " + title + "

"; - licenseContents += "
" + contents + "
"; - indexContents += title; + licenseContents += "

" + rowNum + ". " + finalTitle + "

"; + licenseContents += "
" + contents.toHtmlEscaped() + "
"; + indexContents += finalTitle; } QString AboutDialog::readFile(const QString& path) @@ -92,3 +119,16 @@ QString AboutDialog::readFile(const QString& path) file.close(); return contents; } + +QStringList AboutDialog::filterResourcePaths(const QStringList& paths) +{ + QStringList output; + for (const QString& path : paths) + { + if (path.startsWith(":")) + continue; + + output << path; + } + return output; +} diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/aboutdialog.h b/SQLiteStudio3/guiSQLiteStudio/dialogs/aboutdialog.h index 3c828c0..4d49145 100644 --- a/SQLiteStudio3/guiSQLiteStudio/dialogs/aboutdialog.h +++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/aboutdialog.h @@ -26,12 +26,15 @@ class GUI_API_EXPORT AboutDialog : public QDialog private: void init(InitialMode initialMode); void buildIndex(); - void readLicense(int row, const QString& title, const QString& path); + void addLicense(int row, const QString& title, const QString& contents, const QString& violation); QString readFile(const QString& path); + static QStringList filterResourcePaths(const QStringList& paths); + Ui::AboutDialog *ui = nullptr; QStringList indexContents; QString licenseContents; + QAction* copyAct = nullptr; }; #endif // ABOUTDIALOG_H diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/aboutdialog.ui b/SQLiteStudio3/guiSQLiteStudio/dialogs/aboutdialog.ui index 67fa632..1239cf5 100644 --- a/SQLiteStudio3/guiSQLiteStudio/dialogs/aboutdialog.ui +++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/aboutdialog.ui @@ -17,7 +17,7 @@ - 1 + 2 @@ -50,6 +50,97 @@
+ + + Environment + + + + + + Icon directories + + + + + + + Qt::ActionsContextMenu + + + + + + + Form directories + + + + + + + Qt::ActionsContextMenu + + + + + + + Plugin directories + + + + + + + Application directory + + + + + + + true + + + + + + + Configuration directory + + + + + + + Qt::ActionsContextMenu + + + + + + + true + + + + + + + Qt version: + + + + + + + + + + + +
diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/bugdialog.cpp b/SQLiteStudio3/guiSQLiteStudio/dialogs/bugdialog.cpp index 7ab9c67..59a2ec6 100644 --- a/SQLiteStudio3/guiSQLiteStudio/dialogs/bugdialog.cpp +++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/bugdialog.cpp @@ -65,7 +65,6 @@ QString BugDialog::getMessageAboutReportHistory() { return tr("You can see all your reported bugs and ideas by selecting menu '%1' and then '%2'.").arg(MAINWINDOW->getSQLiteStudioMenu()->title()) .arg(MAINWINDOW->getAction(MainWindow::BUG_REPORT_HISTORY)->text()); - return ""; } void BugDialog::finishedBugReport(bool success, const QString& errorMsg) diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/bugdialog.ui b/SQLiteStudio3/guiSQLiteStudio/dialogs/bugdialog.ui index f2dbcf3..3871436 100644 --- a/SQLiteStudio3/guiSQLiteStudio/dialogs/bugdialog.ui +++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/bugdialog.ui @@ -11,7 +11,7 @@ - Dialog + Bugs and ideas @@ -51,7 +51,7 @@ - ... + ... diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/bugreportlogindialog.ui b/SQLiteStudio3/guiSQLiteStudio/dialogs/bugreportlogindialog.ui index f6597bc..d1d26e6 100644 --- a/SQLiteStudio3/guiSQLiteStudio/dialogs/bugreportlogindialog.ui +++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/bugreportlogindialog.ui @@ -33,7 +33,7 @@ - Password + Password: diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/columndialog.ui b/SQLiteStudio3/guiSQLiteStudio/dialogs/columndialog.ui index ac7e5ae..2133aca 100644 --- a/SQLiteStudio3/guiSQLiteStudio/dialogs/columndialog.ui +++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/columndialog.ui @@ -36,7 +36,7 @@ - , + , diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/configdialog.cpp b/SQLiteStudio3/guiSQLiteStudio/dialogs/configdialog.cpp index 932036e..b22ee6e 100644 --- a/SQLiteStudio3/guiSQLiteStudio/dialogs/configdialog.cpp +++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/configdialog.cpp @@ -21,6 +21,7 @@ #include "configmapper.h" #include "datatype.h" #include "uiutils.h" +#include "translations.h" #include #include #include @@ -186,6 +187,7 @@ void ConfigDialog::init() initFormatterPlugins(); initDataEditors(); initShortcuts(); + initLangs(); connect(ui->categoriesTree, SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)), this, SLOT(switchPage(QTreeWidgetItem*))); connect(ui->previewTabs, SIGNAL(currentChanged(int)), this, SLOT(updateStylePreview())); @@ -959,6 +961,7 @@ void ConfigDialog::initInternalCustomConfigWidgets() QList customWidgets; customWidgets << new StyleConfigWidget(); customWidgets << new ListToStringListHash(&CFG_UI.General.DataEditorsOrder); + customWidgets << new ComboDataWidget(&CFG_CORE.General.Language); configMapper->setInternalCustomConfigWidgets(customWidgets); } @@ -1235,7 +1238,7 @@ void ConfigDialog::initPluginsPage() builtIn = PLUGINS->isBuiltIn(pluginName); title = PLUGINS->getTitle(pluginName); if (builtIn) - title += tr(" (built-in)", "plugins manager in configuration dialog"); + title += tr("%1 (built-in)", "plugins manager in configuration dialog").arg(title); item = new QTreeWidgetItem({title}); item->setCheckState(0, PLUGINS->isLoaded(pluginName) ? Qt::Checked : Qt::Unchecked); @@ -1489,6 +1492,23 @@ void ConfigDialog::initShortcuts(CfgCategory *cfgCategory) category->setExpanded(true); } +void ConfigDialog::initLangs() +{ + QMap langs = getAvailableLanguages(); + int idx = 0; + int selected = -1; + for (const QString& lang : langs.keys()) + { + ui->langCombo->addItem(lang, langs[lang]); + if (langs[lang] == SQLITESTUDIO->getCurrentLang()) + selected = idx; + + idx++; + } + + ui->langCombo->setCurrentIndex(selected); +} + bool ConfigDialog::isPluginCategoryItem(QTreeWidgetItem *item) const { return item->parent() && item->parent()->parent() && item->parent()->parent() == getPluginsCategoryItem(); diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/configdialog.h b/SQLiteStudio3/guiSQLiteStudio/dialogs/configdialog.h index 95e9f1a..5661c1a 100644 --- a/SQLiteStudio3/guiSQLiteStudio/dialogs/configdialog.h +++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/configdialog.h @@ -56,6 +56,7 @@ class GUI_API_EXPORT ConfigDialog : public QDialog void initDataEditors(); void initShortcuts(); void initShortcuts(CfgCategory* cfgCategory); + void initLangs(); void applyStyle(QWidget* widget, QStyle* style); QTreeWidgetItem* getPluginsCategoryItem() const; QTreeWidgetItem* getPluginsCategoryItem(PluginType* type) const; diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/configdialog.ui b/SQLiteStudio3/guiSQLiteStudio/dialogs/configdialog.ui index 040600e..966ebca 100644 --- a/SQLiteStudio3/guiSQLiteStudio/dialogs/configdialog.ui +++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/configdialog.ui @@ -104,7 +104,7 @@ General - generalPage + generalPage @@ -116,7 +116,7 @@ Keyboard shortcuts - shortcutsPage + shortcutsPage @@ -128,7 +128,7 @@ Look & feel - lookAndFeelPage + lookAndFeelPage @@ -139,7 +139,7 @@ Style - stylePage + stylePage @@ -151,7 +151,7 @@ Fonts - fontsPage + fontsPage @@ -163,7 +163,7 @@ Colors - colorsPage + colorsPage @@ -176,7 +176,7 @@ Plugins - pluginsPage + pluginsPage @@ -187,7 +187,7 @@ Code formatters - formatterPluginsPage + formatterPluginsPage @@ -196,7 +196,7 @@ Data browsing - dataBrowsingPage + dataBrowsingPage @@ -207,7 +207,7 @@ Data editors - dataEditorsPage + dataEditorsPage @@ -227,7 +227,7 @@ - 2 + 6 @@ -259,7 +259,7 @@ 99999 - General.NumberOfRowsPerPage + General.NumberOfRowsPerPage @@ -288,7 +288,7 @@ 600 - General.MaxInitialColumnWith + General.MaxInitialColumnWith
@@ -334,7 +334,7 @@ - General.DataEditorsOrder + General.DataEditorsOrder @@ -433,7 +433,7 @@ 9999999 - General.DdlHistorySize + General.DdlHistorySize
@@ -450,7 +450,7 @@ Don't show DDL preview dialog when commiting schema changes - General.DontShowDdlPreview + General.DontShowDdlPreview @@ -478,7 +478,7 @@ 999999 - General.SqlHistorySize + General.SqlHistorySize @@ -501,7 +501,7 @@ Execute only the query under the cursor - General.ExecuteCurrentQueryOnly + General.ExecuteCurrentQueryOnly @@ -520,7 +520,7 @@ Automatically check for updates at startup - General.CheckUpdatesOnStartup + General.CheckUpdatesOnStartup @@ -539,7 +539,7 @@ Restore last session (active MDI windows) after startup - General.RestoreSession + General.RestoreSession @@ -650,13 +650,36 @@ 0 + + + + Language + + + + + + Changing language requires application restart to take effect. + + + + + + + General.Language + + + + + + Database list - + If switched off, then columns will be sorted in the order they are typed in CREATE TABLE statement. @@ -665,21 +688,21 @@ Sort table columns alphabetically - General.SortColumns + General.SortColumns - + Expand tables node when connected to a database - General.ExpandTables + General.ExpandTables - + <p>Additional labels are those displayed next to the names on the databases list (they are blue, unless configured otherwise). Enabling this option will result in labels for databases, invalid databases and aggregated nodes (column group, index group, trigger group). For more labels see options below.<p> @@ -694,7 +717,7 @@ false - General.ShowDbTreeLabels + General.ShowDbTreeLabels @@ -706,7 +729,7 @@ Display labels for regular tables - General.ShowRegularTableLabels + General.ShowRegularTableLabels @@ -719,24 +742,24 @@ Display labels for virtual tables - General.ShowVirtualTableLabels + General.ShowVirtualTableLabels
- + Expand views node when connected to a database - General.ExpandViews + General.ExpandViews - + If this option is switched off, then objects will be sorted in order they appear in sqlite_master table (which is in order they were created) @@ -745,17 +768,17 @@ Sort objects (tables, indexes, triggers and views) alphabetically - General.SortObjects + General.SortObjects - + Display system tables and indexes on the list - General.ShowSystemObjects + General.ShowSystemObjects @@ -777,7 +800,7 @@ Open Table Windows with the data tab for start - General.OpenTablesOnData + General.OpenTablesOnData @@ -799,7 +822,7 @@ Open View Windows with the data tab for start - General.OpenViewsOnData + General.OpenViewsOnData @@ -943,7 +966,7 @@ - General.Style + General.Style @@ -991,7 +1014,7 @@ - CheckBox + CheckBox @@ -1015,7 +1038,7 @@ - PushButton + PushButton @@ -1039,46 +1062,46 @@ - Column + Column - 123 + 123 - 11111 + 11111 - 22222 + 22222 - 33333 + 33333 - 456 + 456 - 44444 + 44444 - 55555 + 55555 - 66666 + 66666 @@ -1087,7 +1110,7 @@ - ... + ... @@ -1097,20 +1120,23 @@ - RadioButton + RadioButton + + ABC + - ABC + ABC - XYZ + XYZ @@ -1118,7 +1144,7 @@ - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> @@ -1226,7 +1252,7 @@ p, li { white-space: pre-wrap; } - Fonts.SqlEditor + Fonts.SqlEditor @@ -1242,7 +1268,7 @@ p, li { white-space: pre-wrap; } - Fonts.DbTree + Fonts.DbTree @@ -1258,7 +1284,7 @@ p, li { white-space: pre-wrap; } - Fonts.DbTreeLabel + Fonts.DbTreeLabel @@ -1274,7 +1300,7 @@ p, li { white-space: pre-wrap; } - Fonts.DataView + Fonts.DataView @@ -1290,7 +1316,7 @@ p, li { white-space: pre-wrap; } - Fonts.StatusField + Fonts.StatusField @@ -1374,7 +1400,7 @@ p, li { white-space: pre-wrap; } - Colors.SqlEditorKeywordFg + Colors.SqlEditorKeywordFg @@ -1390,7 +1416,7 @@ p, li { white-space: pre-wrap; } - Colors.SqlEditorStringFg + Colors.SqlEditorStringFg @@ -1406,7 +1432,7 @@ p, li { white-space: pre-wrap; } - Colors.SqlEditorCommentFg + Colors.SqlEditorCommentFg @@ -1422,7 +1448,7 @@ p, li { white-space: pre-wrap; } - Colors.SqlEditorForeground + Colors.SqlEditorForeground @@ -1438,7 +1464,7 @@ p, li { white-space: pre-wrap; } - Colors.SqlEditorCurrentLineBg + Colors.SqlEditorCurrentLineBg @@ -1454,7 +1480,7 @@ p, li { white-space: pre-wrap; } - Colors.SqlEditorLineNumAreaBg + Colors.SqlEditorLineNumAreaBg @@ -1480,7 +1506,7 @@ p, li { white-space: pre-wrap; } - Colors.SqlEditorParenthesisBg + Colors.SqlEditorParenthesisBg @@ -1527,7 +1553,7 @@ p, li { white-space: pre-wrap; } - Colors.SqlEditorBlobFg + Colors.SqlEditorBlobFg @@ -1564,7 +1590,7 @@ p, li { white-space: pre-wrap; } - Colors.SqlEditorNumberFg + Colors.SqlEditorNumberFg @@ -1580,7 +1606,7 @@ p, li { white-space: pre-wrap; } - Colors.SqlEditorBindParamFg + Colors.SqlEditorBindParamFg @@ -1606,7 +1632,7 @@ p, li { white-space: pre-wrap; } - Colors.SqlEditorValidObject + Colors.SqlEditorValidObject @@ -1641,7 +1667,7 @@ p, li { white-space: pre-wrap; } - Colors.DataUncommited + Colors.DataUncommited @@ -1667,7 +1693,7 @@ p, li { white-space: pre-wrap; } - Colors.DataUncommitedError + Colors.DataUncommitedError @@ -1690,7 +1716,7 @@ p, li { white-space: pre-wrap; } - Colors.DataNullFg + Colors.DataNullFg @@ -1713,7 +1739,7 @@ p, li { white-space: pre-wrap; } - Colors.DataDeletedBg + Colors.DataDeletedBg @@ -1748,7 +1774,7 @@ p, li { white-space: pre-wrap; } - Colors.DbTreeLabelsFg + Colors.DbTreeLabelsFg @@ -1780,7 +1806,7 @@ p, li { white-space: pre-wrap; } - Colors.StatusFieldInfoFg + Colors.StatusFieldInfoFg @@ -1803,7 +1829,7 @@ p, li { white-space: pre-wrap; } - Colors.StatusFieldWarnFg + Colors.StatusFieldWarnFg @@ -1826,7 +1852,7 @@ p, li { white-space: pre-wrap; } - Colors.StatusFieldErrorFg + Colors.StatusFieldErrorFg diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/constraintdialog.ui b/SQLiteStudio3/guiSQLiteStudio/dialogs/constraintdialog.ui index 7df34d8..addfb9f 100644 --- a/SQLiteStudio3/guiSQLiteStudio/dialogs/constraintdialog.ui +++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/constraintdialog.ui @@ -17,7 +17,7 @@ - Dialog + Dialog diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/dbconverterdialog.cpp b/SQLiteStudio3/guiSQLiteStudio/dialogs/dbconverterdialog.cpp index c94546e..8af131e 100644 --- a/SQLiteStudio3/guiSQLiteStudio/dialogs/dbconverterdialog.cpp +++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/dbconverterdialog.cpp @@ -45,7 +45,6 @@ void DbConverterDialog::init() { ui->setupUi(this); limitDialogWidth(this); - setWindowTitle(tr("Convert database")); widgetCover = new WidgetCover(this); widgetCover->setVisible(false); diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/dbconverterdialog.ui b/SQLiteStudio3/guiSQLiteStudio/dialogs/dbconverterdialog.ui index d328e99..f6bf009 100644 --- a/SQLiteStudio3/guiSQLiteStudio/dialogs/dbconverterdialog.ui +++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/dbconverterdialog.ui @@ -11,7 +11,7 @@ - Dialog + Convert database diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/errorsconfirmdialog.ui b/SQLiteStudio3/guiSQLiteStudio/dialogs/errorsconfirmdialog.ui index 81cdb17..615a6fd 100644 --- a/SQLiteStudio3/guiSQLiteStudio/dialogs/errorsconfirmdialog.ui +++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/errorsconfirmdialog.ui @@ -11,7 +11,7 @@ - Dialog + Errors diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/exportdialog.ui b/SQLiteStudio3/guiSQLiteStudio/dialogs/exportdialog.ui index 9f84232..333d887 100644 --- a/SQLiteStudio3/guiSQLiteStudio/dialogs/exportdialog.ui +++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/exportdialog.ui @@ -11,7 +11,7 @@ - Export dialog + Export QWizard::CancelButtonOnLeft|QWizard::NoDefaultButton @@ -111,7 +111,7 @@ - . + . @@ -289,8 +289,8 @@ 0 0 - 298 - 288 + 483 + 318 @@ -347,7 +347,7 @@ - ... + ... @@ -421,17 +421,17 @@ + + SqlEditor + QPlainTextEdit +
sqleditor.h
+
VerifiableWizardPage QWizardPage
common/verifiablewizardpage.h
1
- - SqlEditor - QPlainTextEdit -
sqleditor.h
-
diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/importdialog.ui b/SQLiteStudio3/guiSQLiteStudio/dialogs/importdialog.ui index b853ab8..c8756f7 100644 --- a/SQLiteStudio3/guiSQLiteStudio/dialogs/importdialog.ui +++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/importdialog.ui @@ -47,7 +47,7 @@ - . + . @@ -103,8 +103,8 @@ 0 0 - 269 - 280 + 479 + 310
@@ -169,7 +169,7 @@ - ... + ... diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/indexdialog.ui b/SQLiteStudio3/guiSQLiteStudio/dialogs/indexdialog.ui index e231550..4e2cbac 100644 --- a/SQLiteStudio3/guiSQLiteStudio/dialogs/indexdialog.ui +++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/indexdialog.ui @@ -17,7 +17,7 @@ - Index dialog + Index diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/languagedialog.cpp b/SQLiteStudio3/guiSQLiteStudio/dialogs/languagedialog.cpp new file mode 100644 index 0000000..38f6fe0 --- /dev/null +++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/languagedialog.cpp @@ -0,0 +1,34 @@ +#include "languagedialog.h" +#include "ui_languagedialog.h" + +LanguageDialog::LanguageDialog(QWidget *parent) : + QDialog(parent), + ui(new Ui::LanguageDialog) +{ + ui->setupUi(this); +} + +LanguageDialog::~LanguageDialog() +{ + delete ui; +} + +void LanguageDialog::setLanguages(const QMap& langs) +{ + for (const QString& langName : langs.keys()) + ui->comboBox->addItem(langName, langs[langName]); +} + +QString LanguageDialog::getSelectedLang() const +{ + return ui->comboBox->currentData().toString(); +} + +void LanguageDialog::setSelectedLang(const QString& lang) +{ + int idx = ui->comboBox->findData(lang); + if (idx < 0) + idx = 0; + + ui->comboBox->setCurrentIndex(idx); +} diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/languagedialog.h b/SQLiteStudio3/guiSQLiteStudio/dialogs/languagedialog.h new file mode 100644 index 0000000..7fc0607 --- /dev/null +++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/languagedialog.h @@ -0,0 +1,27 @@ +#ifndef LANGUAGEDIALOG_H +#define LANGUAGEDIALOG_H + +#include +#include + +namespace Ui { + class LanguageDialog; +} + +class LanguageDialog : public QDialog +{ + Q_OBJECT + + public: + explicit LanguageDialog(QWidget *parent = 0); + ~LanguageDialog(); + + void setLanguages(const QMap& langs); + QString getSelectedLang() const; + void setSelectedLang(const QString& lang); + + private: + Ui::LanguageDialog *ui; +}; + +#endif // LANGUAGEDIALOG_H diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/languagedialog.ui b/SQLiteStudio3/guiSQLiteStudio/dialogs/languagedialog.ui new file mode 100644 index 0000000..afd118e --- /dev/null +++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/languagedialog.ui @@ -0,0 +1,77 @@ + + + LanguageDialog + + + + 0 + 0 + 374 + 81 + + + + Language + + + + + + Please choose language: + + + Qt::AlignCenter + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + + + + + + buttonBox + accepted() + LanguageDialog + accept() + + + 248 + 254 + + + 157 + 274 + + + + + buttonBox + rejected() + LanguageDialog + reject() + + + 316 + 260 + + + 286 + 274 + + + + + diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/messagelistdialog.ui b/SQLiteStudio3/guiSQLiteStudio/dialogs/messagelistdialog.ui index 10ee6b8..010c866 100644 --- a/SQLiteStudio3/guiSQLiteStudio/dialogs/messagelistdialog.ui +++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/messagelistdialog.ui @@ -11,7 +11,7 @@ - Dialog + Dialog diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/searchtextdialog.ui b/SQLiteStudio3/guiSQLiteStudio/dialogs/searchtextdialog.ui index ce9e12e..30113af 100644 --- a/SQLiteStudio3/guiSQLiteStudio/dialogs/searchtextdialog.ui +++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/searchtextdialog.ui @@ -7,11 +7,11 @@ 0 0 403 - 184 + 195 - Dialog + Find or replace diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/triggercolumnsdialog.ui b/SQLiteStudio3/guiSQLiteStudio/dialogs/triggercolumnsdialog.ui index 4326fca..861e17b 100644 --- a/SQLiteStudio3/guiSQLiteStudio/dialogs/triggercolumnsdialog.ui +++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/triggercolumnsdialog.ui @@ -11,10 +11,19 @@ - Dialog + Trigger columns - + + 0 + + + 0 + + + 0 + + 0 @@ -52,12 +61,21 @@ 0 0 - 320 - 239 + 316 + 237 - + + 0 + + + 0 + + + 0 + + 0 diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/triggerdialog.ui b/SQLiteStudio3/guiSQLiteStudio/dialogs/triggerdialog.ui index bf3da0a..723f903 100644 --- a/SQLiteStudio3/guiSQLiteStudio/dialogs/triggerdialog.ui +++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/triggerdialog.ui @@ -11,7 +11,7 @@ - Trigger dialog + Trigger @@ -87,7 +87,7 @@ List of columns for UPDATE OF action. - ... + ... diff --git a/SQLiteStudio3/guiSQLiteStudio/formmanager.cpp b/SQLiteStudio3/guiSQLiteStudio/formmanager.cpp index 9df36d0..0ee7d43 100644 --- a/SQLiteStudio3/guiSQLiteStudio/formmanager.cpp +++ b/SQLiteStudio3/guiSQLiteStudio/formmanager.cpp @@ -46,6 +46,11 @@ QStringList FormManager::getAvailableForms() const return widgetNameToFullPath.keys(); } +QStringList FormManager::getFormDirs() const +{ + return formDirs; +} + QWidget* FormManager::createWidgetByFullPath(const QString& path) { QWidget* widget = uiLoader->load(path); @@ -104,22 +109,21 @@ void FormManager::init() void FormManager::load() { - QStringList dirs; - dirs += qApp->applicationDirPath() + "/forms"; - dirs += ":/forms"; - dirs += QDir(CFG->getConfigDir()).absoluteFilePath("forms"); + formDirs += qApp->applicationDirPath() + "/forms"; + formDirs += ":/forms"; + formDirs += QDir(CFG->getConfigDir()).absoluteFilePath("forms"); QString envDirs = SQLITESTUDIO->getEnv("SQLITESTUDIO_FORMS"); if (!envDirs.isNull()) - dirs += envDirs.split(PATH_LIST_SEPARATOR); + formDirs += envDirs.split(PATH_LIST_SEPARATOR); - dirs += PLUGINS->getPluginDirs(); + formDirs += PLUGINS->getPluginDirs(); #ifdef FORMS_DIR - dirs += STRINGIFY(FORMS_DIR); + formDirs += STRINGIFY(FORMS_DIR); #endif - foreach (QString dirPath, dirs) + foreach (QString dirPath, formDirs) loadRecurently(dirPath, ""); } diff --git a/SQLiteStudio3/guiSQLiteStudio/formmanager.h b/SQLiteStudio3/guiSQLiteStudio/formmanager.h index 41f98ce..fbffd7e 100644 --- a/SQLiteStudio3/guiSQLiteStudio/formmanager.h +++ b/SQLiteStudio3/guiSQLiteStudio/formmanager.h @@ -19,6 +19,7 @@ class GUI_API_EXPORT FormManager : public QObject QWidget* createWidget(const QString& name); bool hasWidget(const QString& name); QStringList getAvailableForms() const; + QStringList getFormDirs() const; private: void init(); @@ -30,6 +31,7 @@ class GUI_API_EXPORT FormManager : public QObject UiLoader* uiLoader = nullptr; QHash widgetNameToFullPath; QStringList resourceForms; + QStringList formDirs; private slots: void rescanResources(Plugin* plugin, PluginType* pluginType); diff --git a/SQLiteStudio3/guiSQLiteStudio/forms/sqlformatterplugin.ui b/SQLiteStudio3/guiSQLiteStudio/forms/sqlformatterplugin.ui index 67f1bd6..87e13fd 100644 --- a/SQLiteStudio3/guiSQLiteStudio/forms/sqlformatterplugin.ui +++ b/SQLiteStudio3/guiSQLiteStudio/forms/sqlformatterplugin.ui @@ -11,7 +11,7 @@ - Form + Form diff --git a/SQLiteStudio3/guiSQLiteStudio/guiSQLiteStudio.pro b/SQLiteStudio3/guiSQLiteStudio/guiSQLiteStudio.pro index 2195415..93796ea 100644 --- a/SQLiteStudio3/guiSQLiteStudio/guiSQLiteStudio.pro +++ b/SQLiteStudio3/guiSQLiteStudio/guiSQLiteStudio.pro @@ -27,6 +27,8 @@ QMAKE_CXXFLAGS += -pedantic DEFINES += GUISQLITESTUDIO_LIBRARY +TRANSLATIONS += translations/guiSQLiteStudio_pl.ts + SOURCES +=\ mainwindow.cpp \ iconmanager.cpp \ @@ -164,7 +166,8 @@ SOURCES +=\ windows/bugreporthistorywindow.cpp \ dialogs/newversiondialog.cpp \ dialogs/quitconfirmdialog.cpp \ - common/datawidgetmapper.cpp + common/datawidgetmapper.cpp \ + dialogs/languagedialog.cpp HEADERS += mainwindow.h \ iconmanager.h \ @@ -307,7 +310,8 @@ HEADERS += mainwindow.h \ dialogs/newversiondialog.h \ guiSQLiteStudio_global.h \ dialogs/quitconfirmdialog.h \ - common/datawidgetmapper.h + common/datawidgetmapper.h \ + dialogs/languagedialog.h FORMS += mainwindow.ui \ dbtree/dbtree.ui \ @@ -354,10 +358,12 @@ FORMS += mainwindow.ui \ dialogs/bugreportlogindialog.ui \ windows/bugreporthistorywindow.ui \ dialogs/newversiondialog.ui \ - dialogs/quitconfirmdialog.ui + dialogs/quitconfirmdialog.ui \ + dialogs/languagedialog.ui RESOURCES += \ - icons.qrc + icons.qrc \ + guiSQLiteStudio.qrc OTHER_FILES += diff --git a/SQLiteStudio3/guiSQLiteStudio/guiSQLiteStudio.qrc b/SQLiteStudio3/guiSQLiteStudio/guiSQLiteStudio.qrc new file mode 100644 index 0000000..31e0f16 --- /dev/null +++ b/SQLiteStudio3/guiSQLiteStudio/guiSQLiteStudio.qrc @@ -0,0 +1,5 @@ + + + translations/guiSQLiteStudio_pl.qm + + diff --git a/SQLiteStudio3/guiSQLiteStudio/iconmanager.cpp b/SQLiteStudio3/guiSQLiteStudio/iconmanager.cpp index efe22a1..63dde26 100644 --- a/SQLiteStudio3/guiSQLiteStudio/iconmanager.cpp +++ b/SQLiteStudio3/guiSQLiteStudio/iconmanager.cpp @@ -62,6 +62,11 @@ void IconManager::init() connect(PLUGINS, SIGNAL(pluginsInitiallyLoaded()), this, SLOT(pluginsInitiallyLoaded())); } +QStringList IconManager::getIconDirs() const +{ + return iconDirs; +} + void IconManager::rescanResources(const QString& pluginName) { if (!pluginName.isNull() && PLUGINS->isBuiltIn(pluginName)) diff --git a/SQLiteStudio3/guiSQLiteStudio/iconmanager.h b/SQLiteStudio3/guiSQLiteStudio/iconmanager.h index 8cb7dbe..8a30d99 100644 --- a/SQLiteStudio3/guiSQLiteStudio/iconmanager.h +++ b/SQLiteStudio3/guiSQLiteStudio/iconmanager.h @@ -153,6 +153,7 @@ class GUI_API_EXPORT IconManager : public QObject DEF_ICON(RELOAD, "reload") DEF_ICON(RENAME_FN_ARG, "rename_fn_arg") DEF_ICO3(RENAME_DATATYPE, RENAME_FN_ARG) + DEF_ICON(RESET_AUTOINCREMENT, "reset_autoincrement") DEF_ICON(RESULTS_BELOW, "results_below") DEF_ICON(RESULTS_IN_TAB, "results_in_tab") DEF_ICON(ROLLBACK, "rollback") @@ -244,6 +245,7 @@ class GUI_API_EXPORT IconManager : public QObject QMovie* getMovie(const QString& name); QIcon* getIcon(const QString& name); void init(); + QStringList getIconDirs() const; private: IconManager(); diff --git a/SQLiteStudio3/guiSQLiteStudio/icons.qrc b/SQLiteStudio3/guiSQLiteStudio/icons.qrc index f923fe9..d89afa9 100644 --- a/SQLiteStudio3/guiSQLiteStudio/icons.qrc +++ b/SQLiteStudio3/guiSQLiteStudio/icons.qrc @@ -190,5 +190,6 @@ img/abort24.png img/close.png img/go_back.png + img/reset_autoincrement.png diff --git a/SQLiteStudio3/guiSQLiteStudio/img/reset_autoincrement.png b/SQLiteStudio3/guiSQLiteStudio/img/reset_autoincrement.png new file mode 100644 index 0000000..d39f06d Binary files /dev/null and b/SQLiteStudio3/guiSQLiteStudio/img/reset_autoincrement.png differ diff --git a/SQLiteStudio3/guiSQLiteStudio/mainwindow.cpp b/SQLiteStudio3/guiSQLiteStudio/mainwindow.cpp index 7dbde8c..bc492df 100644 --- a/SQLiteStudio3/guiSQLiteStudio/mainwindow.cpp +++ b/SQLiteStudio3/guiSQLiteStudio/mainwindow.cpp @@ -147,6 +147,8 @@ void MainWindow::init() widgetCover->getContainerLayout()->addWidget(updatingSubBar, 2, 0); connect(UPDATES, SIGNAL(updatingProgress(QString,int,int)), this, SLOT(handleUpdatingProgress(QString,int,int))); connect(UPDATES, SIGNAL(updatingError(QString)), this, SLOT(handleUpdatingError())); + + connect(CFG_CORE.General.Language, SIGNAL(changed(QVariant)), this, SLOT(notifyAboutLanguageChange())); } void MainWindow::cleanUp() @@ -195,6 +197,11 @@ void MainWindow::updateWindowActions() actionMap[RESTORE_WINDOW]->setEnabled(hasClosedWindowToRestore()); } +void MainWindow::notifyAboutLanguageChange() +{ + notifyInfo(tr("You need to restart application to make the language change take effect.")); +} + MdiArea *MainWindow::getMdiArea() const { return dynamic_cast(ui->mdiArea); diff --git a/SQLiteStudio3/guiSQLiteStudio/mainwindow.h b/SQLiteStudio3/guiSQLiteStudio/mainwindow.h index df12621..4e9f5c0 100644 --- a/SQLiteStudio3/guiSQLiteStudio/mainwindow.h +++ b/SQLiteStudio3/guiSQLiteStudio/mainwindow.h @@ -170,6 +170,7 @@ class GUI_API_EXPORT MainWindow : public QMainWindow, public ExtActionContainer void updateWindowActions(); private slots: + void notifyAboutLanguageChange(); void cleanUp(); void openSqlEditorSlot(); void refreshMdiWindows(); diff --git a/SQLiteStudio3/guiSQLiteStudio/mainwindow.ui b/SQLiteStudio3/guiSQLiteStudio/mainwindow.ui index 0ae72c8..1dbf462 100644 --- a/SQLiteStudio3/guiSQLiteStudio/mainwindow.ui +++ b/SQLiteStudio3/guiSQLiteStudio/mainwindow.ui @@ -11,7 +11,7 @@ - SQLiteStudio (?.?.?) + SQLiteStudio (?.?.?) @@ -57,7 +57,7 @@ 0 0 964 - 22 + 19 @@ -95,6 +95,9 @@ + + true + Qt::CustomContextMenu diff --git a/SQLiteStudio3/guiSQLiteStudio/multieditor/multieditordate.h b/SQLiteStudio3/guiSQLiteStudio/multieditor/multieditordate.h index b6f6d7c..d51150b 100644 --- a/SQLiteStudio3/guiSQLiteStudio/multieditor/multieditordate.h +++ b/SQLiteStudio3/guiSQLiteStudio/multieditor/multieditordate.h @@ -5,6 +5,8 @@ class GUI_API_EXPORT MultiEditorDate : public MultiEditorDateTime { + Q_OBJECT + public: explicit MultiEditorDate(QWidget *parent = 0); diff --git a/SQLiteStudio3/guiSQLiteStudio/multieditor/multieditornumeric.cpp b/SQLiteStudio3/guiSQLiteStudio/multieditor/multieditornumeric.cpp index 198f71b..526f5c4 100644 --- a/SQLiteStudio3/guiSQLiteStudio/multieditor/multieditornumeric.cpp +++ b/SQLiteStudio3/guiSQLiteStudio/multieditor/multieditornumeric.cpp @@ -2,6 +2,7 @@ #include "common/numericspinbox.h" #include #include +#include MultiEditorNumeric::MultiEditorNumeric(QWidget* parent) : MultiEditorWidget(parent) @@ -32,7 +33,7 @@ void MultiEditorNumeric::setReadOnly(bool value) QString MultiEditorNumeric::getTabLabel() { - return tr("Number"); + return tr("Number", "numeric multi editor tab name"); } void MultiEditorNumeric::focusThisWidget() diff --git a/SQLiteStudio3/guiSQLiteStudio/multieditor/multieditornumeric.h b/SQLiteStudio3/guiSQLiteStudio/multieditor/multieditornumeric.h index 65d0409..c74d27a 100644 --- a/SQLiteStudio3/guiSQLiteStudio/multieditor/multieditornumeric.h +++ b/SQLiteStudio3/guiSQLiteStudio/multieditor/multieditornumeric.h @@ -9,6 +9,8 @@ class NumericSpinBox; class GUI_API_EXPORT MultiEditorNumeric : public MultiEditorWidget { + Q_OBJECT + public: explicit MultiEditorNumeric(QWidget *parent = 0); diff --git a/SQLiteStudio3/guiSQLiteStudio/multieditor/multieditortime.h b/SQLiteStudio3/guiSQLiteStudio/multieditor/multieditortime.h index 56bf60e..1fb05f3 100644 --- a/SQLiteStudio3/guiSQLiteStudio/multieditor/multieditortime.h +++ b/SQLiteStudio3/guiSQLiteStudio/multieditor/multieditortime.h @@ -6,6 +6,8 @@ class GUI_API_EXPORT MultiEditorTime : public MultiEditorDateTime { + Q_OBJECT + public: explicit MultiEditorTime(QWidget *parent = 0); diff --git a/SQLiteStudio3/guiSQLiteStudio/sqlcompareview.cpp b/SQLiteStudio3/guiSQLiteStudio/sqlcompareview.cpp index 0b5b91d..057ed1f 100644 --- a/SQLiteStudio3/guiSQLiteStudio/sqlcompareview.cpp +++ b/SQLiteStudio3/guiSQLiteStudio/sqlcompareview.cpp @@ -107,7 +107,6 @@ void SqlCompareView::setupHighlighting(const QString& left, const QString& right { QList diffs = diff->diff_main(left, right); int leftPos = 0; - int rightPos = 0; int lgt = 0; for (const Diff& d : diffs) { @@ -120,11 +119,9 @@ void SqlCompareView::setupHighlighting(const QString& left, const QString& right break; case EQUAL: leftPos += lgt; - rightPos += lgt; break; case INSERT: rightView->setTextBackgroundColor(leftPos, leftPos + lgt - 1, Qt::green); - rightPos += lgt; break; } } diff --git a/SQLiteStudio3/guiSQLiteStudio/sqleditor.cpp b/SQLiteStudio3/guiSQLiteStudio/sqleditor.cpp index 52e1676..edafce5 100644 --- a/SQLiteStudio3/guiSQLiteStudio/sqleditor.cpp +++ b/SQLiteStudio3/guiSQLiteStudio/sqleditor.cpp @@ -28,6 +28,7 @@ #include #include #include +#include CFG_KEYS_DEFINE(SqlEditor) @@ -184,6 +185,7 @@ Db* SqlEditor::getDb() const void SqlEditor::setDb(Db* value) { db = value; + refreshValidObjects(); scheduleQueryParser(true); } @@ -194,34 +196,41 @@ void SqlEditor::setAutoCompletion(bool enabled) void SqlEditor::customContextMenuRequested(const QPoint &pos) { - if (objectLinksEnabled) - { - const DbObject* obj = getValidObjectForPosition(pos); - QString objName = toPlainText().mid(obj->from, (obj->to - obj->from + 1)); + if (objectLinksEnabled && handleValidObjectContextMenu(pos)) + return; - validObjContextMenu->clear(); + contextMenu->popup(mapToGlobal(pos)); +} - DbTreeItem* item = nullptr; - for (DbTreeItem::Type type : {DbTreeItem::Type::TABLE, DbTreeItem::Type::INDEX, DbTreeItem::Type::TRIGGER, DbTreeItem::Type::VIEW}) - { - item = DBTREE->getModel()->findItem(type, objName); - if (item) - break; - } +bool SqlEditor::handleValidObjectContextMenu(const QPoint& pos) +{ + const DbObject* obj = getValidObjectForPosition(pos); + if (!obj) + return false; - if (item) - { - DBTREE->setSelectedItem(item); - DBTREE->setupActionsForMenu(item, validObjContextMenu); - if (validObjContextMenu->actions().size() == 0) - return; + QString objName = toPlainText().mid(obj->from, (obj->to - obj->from + 1)); - DBTREE->updateActionStates(item); - validObjContextMenu->popup(mapToGlobal(pos)); - } - return; + validObjContextMenu->clear(); + + DbTreeItem* item = nullptr; + for (DbTreeItem::Type type : {DbTreeItem::Type::TABLE, DbTreeItem::Type::INDEX, DbTreeItem::Type::TRIGGER, DbTreeItem::Type::VIEW}) + { + item = DBTREE->getModel()->findItem(type, objName); + if (item) + break; } - contextMenu->popup(mapToGlobal(pos)); + + if (!item) + return false; + + DBTREE->setSelectedItem(item); + DBTREE->setupActionsForMenu(item, validObjContextMenu); + if (validObjContextMenu->actions().size() == 0) + return false; + + DBTREE->updateActionStates(item); + validObjContextMenu->popup(mapToGlobal(pos)); + return true; } void SqlEditor::updateUndoAction(bool enabled) @@ -487,17 +496,21 @@ void SqlEditor::refreshValidObjects() if (!db || !db->isValid()) return; - objectsInNamedDb.clear(); - - SchemaResolver resolver(db); - QSet databases = resolver.getDatabases(); - databases << "main"; - QStringList objects; - foreach (const QString& dbName, databases) + QtConcurrent::run([this]() { - objects = resolver.getAllObjects(); - objectsInNamedDb[dbName] << objects; - } + QMutexLocker lock(&objectsInNamedDbMutex); + objectsInNamedDb.clear(); + + SchemaResolver resolver(db); + QSet databases = resolver.getDatabases(); + databases << "main"; + QStringList objects; + foreach (const QString& dbName, databases) + { + objects = resolver.getAllObjects(); + objectsInNamedDb[dbName] << objects; + } + }); } Dialect SqlEditor::getDialect() @@ -707,10 +720,7 @@ void SqlEditor::indentNewLine() void SqlEditor::showSearchDialog() { if (!searchDialog) - { searchDialog = new SearchTextDialog(textLocator, this); - searchDialog->setWindowTitle(tr("Find or replace", "sql editor find/replace dialog")); - } if (searchDialog->isVisible()) searchDialog->hide(); @@ -855,6 +865,7 @@ void SqlEditor::checkForValidObjects() if (!db || !db->isValid()) return; + QMutexLocker lock(&objectsInNamedDbMutex); Dialect dialect = db->getDialect(); QList fullObjects; QString dbName; @@ -1022,7 +1033,7 @@ void SqlEditor::saveToFile() QFile file(fName); if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) { - notifyError(tr("Could not open file '%1'' for writing: %2").arg(fName).arg(file.errorString())); + notifyError(tr("Could not open file '%1' for writing: %2").arg(fName).arg(file.errorString())); return; } @@ -1046,7 +1057,7 @@ void SqlEditor::loadFromFile() QFile file(fName); if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) { - notifyError(tr("Could not open file '%1'' for reading: %2").arg(fName).arg(file.errorString())); + notifyError(tr("Could not open file '%1' for reading: %2").arg(fName).arg(file.errorString())); return; } @@ -1393,6 +1404,7 @@ void SqlEditor::handleValidObjectCursor(const QPoint& point) } viewport()->setCursor(isValid ? Qt::PointingHandCursor : Qt::IBeamCursor); } + bool SqlEditor::getVirtualSqlCompleteSemicolon() const { return virtualSqlCompleteSemicolon; diff --git a/SQLiteStudio3/guiSQLiteStudio/sqleditor.h b/SQLiteStudio3/guiSQLiteStudio/sqleditor.h index d525e20..43be251 100644 --- a/SQLiteStudio3/guiSQLiteStudio/sqleditor.h +++ b/SQLiteStudio3/guiSQLiteStudio/sqleditor.h @@ -9,6 +9,7 @@ #include #include #include +#include class CompleterWindow; class QTimer; @@ -185,6 +186,7 @@ class GUI_API_EXPORT SqlEditor : public QPlainTextEdit, public ExtActionContaine const DbObject* getValidObjectForPosition(int position, bool movedLeft); const DbObject* getValidObjectForPosition(const QPoint& point); void handleValidObjectCursor(const QPoint& point); + bool handleValidObjectContextMenu(const QPoint& pos); SqliteSyntaxHighlighter* highlighter = nullptr; QMenu* contextMenu = nullptr; @@ -197,6 +199,7 @@ class GUI_API_EXPORT SqlEditor : public QPlainTextEdit, public ExtActionContaine QTimer* queryParserTimer = nullptr; Parser* queryParser = nullptr; QHash objectsInNamedDb; + QMutex objectsInNamedDbMutex; bool objectLinksEnabled = false; QList validDbObjects; QWidget* lineNumberArea = nullptr; diff --git a/SQLiteStudio3/guiSQLiteStudio/taskbar.cpp b/SQLiteStudio3/guiSQLiteStudio/taskbar.cpp index ba797f6..359dc29 100644 --- a/SQLiteStudio3/guiSQLiteStudio/taskbar.cpp +++ b/SQLiteStudio3/guiSQLiteStudio/taskbar.cpp @@ -10,7 +10,6 @@ #include #include #include -#include #include TaskBar::TaskBar(const QString& title, QWidget *parent) : @@ -179,6 +178,7 @@ bool TaskBar::handleMouseMoveEvent(QMouseEvent* event) drag->setMimeData(generateMimeData()); dragStartIndex = tasks.indexOf(dragStartTask); + drag->start(Qt::MoveAction); return true; } diff --git a/SQLiteStudio3/guiSQLiteStudio/taskbar.h b/SQLiteStudio3/guiSQLiteStudio/taskbar.h index 2cf6d56..652b3f6 100644 --- a/SQLiteStudio3/guiSQLiteStudio/taskbar.h +++ b/SQLiteStudio3/guiSQLiteStudio/taskbar.h @@ -39,7 +39,6 @@ class GUI_API_EXPORT TaskBar : public QToolBar QAction* getNextClosestAction(const QPoint& position); void dragTaskTo(QAction* task, const QPoint& position); void dragTaskTo(QAction* task, int positionIndex); - QAction* getDragTask(const QMimeData* data); QMimeData* generateMimeData(); int getActiveTaskIdx(); diff --git a/SQLiteStudio3/guiSQLiteStudio/translations/guiSQLiteStudio_pl.qm b/SQLiteStudio3/guiSQLiteStudio/translations/guiSQLiteStudio_pl.qm new file mode 100644 index 0000000..61124ad Binary files /dev/null and b/SQLiteStudio3/guiSQLiteStudio/translations/guiSQLiteStudio_pl.qm differ diff --git a/SQLiteStudio3/guiSQLiteStudio/translations/guiSQLiteStudio_pl.ts b/SQLiteStudio3/guiSQLiteStudio/translations/guiSQLiteStudio_pl.ts new file mode 100644 index 0000000..ca582d3 --- /dev/null +++ b/SQLiteStudio3/guiSQLiteStudio/translations/guiSQLiteStudio_pl.ts @@ -0,0 +1,5980 @@ + + + + + AboutDialog + + + About SQLiteStudio and licenses + O SQLiteStudio i licencje + + + + About + O programie + + + + <html><head/><body><p align="center"><span style=" font-size:11pt; font-weight:600;">SQLiteStudio v%1</span></p><p align="center">Free, open-source, cross-platform SQLite database manager.<br/><a href="http://sqlitestudio.pl"><span style=" text-decoration: underline; color:#0000ff;">http://sqlitestudio.pl</span></a><br/></p><p align="center">%2<br/></p><p align="center">Author and active maintainer:<br/>SalSoft (<a href="http://salsoft.com.pl"><span style=" text-decoration: underline; color:#0000ff;">http://salsoft.com.pl</span></a>)<br/></p></body></html> + <html><head/><body><p align="center"><span style=" font-size:11pt; font-weight:600;">SQLiteStudio v%1</span></p><p align="center">Darmowy, otwartoźródłowy, wieloplatformowy menadżer baz danych SQLite.<br/><a href="http://sqlitestudio.pl"><span style=" text-decoration: underline; color:#0000ff;">http://sqlitestudio.pl</span></a><br/></p><p align="center">%2<br/></p><p align="center">Autor i aktywny opiekun:<br/>SalSoft (<a href="http://salsoft.com.pl"><span style=" text-decoration: underline; color:#0000ff;">http://salsoft.com.pl</span></a>)<br/></p></body></html> + + + + Licenses + Licencje + + + + Environment + Środowisko + + + + Icon directories + Katalogi ikon + + + + Form directories + Katalogi formularzy + + + + Plugin directories + Katalogi wtyczek + + + + Application directory + Katalog aplikacji + + + + Configuration directory + Katalog konfiguracji + + + + Qt version: + Wersja Qt: + + + + Portable distribution. + Dystrybucja przenośna. + + + + MacOS X application boundle distribution. + Dytrybucja aplikacji MacOS X. + + + + Operating system managed distribution. + Dystrybucja zarządzana przez system operacyjny. + + + + Copy + Kopiuj + + + + <h3>Table of contents:</h3><ol>%2</ol> + <h3>Zawartość:</h3><ol>%2</ol> + + + + BugDialog + + + Bugs and ideas + Błędy i pomysły + + + + Reporter + Zgłaszający + + + + E-mail address + Adres e-mail + + + + + Log in + Zaloguj + + + + Short description + Krótki opis + + + + Detailed description + Opis szczegółowy + + + + Show more details + Pokaż więcej szczegółów + + + + SQLiteStudio version + Wersja SQLiteStudio + + + + Operating system + System operacyjny + + + + Loaded plugins + Załadowane wtyczki + + + + Send + Wyślij + + + + You can see all your reported bugs and ideas by selecting menu '%1' and then '%2'. + Możesz zobaczyć wszystkie błędy i pomysły zgłoszone przez ciebie wybierając menu '%1' i dalej '%2'. + + + + A bug report sent successfully. + Błąd został zgłoszony pomyślnie. + + + + An error occurred while sending a bug report: %1 +%2 + Wystąpił błąd podczas zgłaszania błędu: %1 +%2 + + + + + You can retry sending. The contents will be restored when you open a report dialog after an error like this. + Możesz spróbować powtórzyć wysyłkę. Zawartość będzie przywrócona, kiedy otworzysz okno zgłaszania po błędzie takim jak ten. + + + + An idea proposal sent successfully. + Pomysł został zgłoszony pomyślnie. + + + + An error occurred while sending an idea proposal: %1 +%2 + Wystąpił błąd podczas zgłaszania pomysłu: %1 +%2 + + + + A bug report + Zgłoś błąd + + + + Describe problem in few words + Opisz problem w kilku słowach + + + + Describe problem and how to reproduce it + Opisz problem, oraz jak go powtórzyć + + + + A new feature idea + Zgłoś pomysł + + + + A title for your idea + Tytuł twojego pomysłu + + + + Describe your idea in more details + Opisz twój pomysł szerzej + + + + Reporting as an unregistered user, using e-mail address. + Zgłaszanie jako niezarejestrowany użytkownik, używając adresu e-mail. + + + + Reporting as a registered user. + Zgłaszanie jako zarejestrowany użytkownik. + + + + Log out + Wyloguj + + + + Providing true email address will make it possible to contact you regarding your report. To learn more, press 'help' button on the right side. + Podanie prawdziwego adresu e-mail pozwoli na skontaktowanie się z tobą w związku z twoim zgłoszeniem. Aby dowiedzieć się więcej, kliknij przycisk 'pomoc' po prawej stronie. + + + + Enter vaild e-mail address, or log in. + Wpisz poprawny adres e-mail, lub zaloguj się. + + + + Short description requires at least 10 characters, but not more than 100. Longer description can be entered in the field below. + Krótki opis wymaga przynajmniej 10 znaków, ale nie więcej niż 100. Dłuższy opis może być wpisany w polu poniżej. + + + + Long description requires at least 30 characters. + Długi opis wymaga przynajmniej 30 znaków. + + + + BugReportHistoryWindow + + + + Title + Tytuł + + + + + Reported at + Zgłoszony dnia + + + + + URL + URL + + + + Reports history + Historia zgłoszeń + + + + Clear reports history + Wyczyść historię zgłoszeń + + + + Delete selected entry + Usuń wybraną pozycję + + + + Invalid response from server. + Niepoprawna odpowiedź z serwera. + + + + BugReportLoginDialog + + + Log in + Zaloguj + + + + Credentials + Dane do logowania + + + + Login: + Login: + + + + Password: + Hasło: + + + + Validation + Walidacja + + + + Validate + Sprawdź + + + + Validation result message + Treść wyniku walidacji + + + + Abort + Przerwij + + + + A login must be at least 2 characters long. + Login musi mieć przynajmniej 2 znaki. + + + + A password must be at least 5 characters long. + Hasło musi mieć przynajmniej 5 znaków. + + + + Valid + Poprawne + + + + CollationsEditor + + + Filter collations + Filtruj zestawienia + + + + Collation name: + Nazwa zestawienia: + + + + Implementation language: + Język implementacji: + + + + Databases + Bazy danych + + + + Register in all databases + Zarejestruj we wszystkich bazach danych + + + + Register in following databases: + Zarejestruj w następujących bazach danych: + + + + Implementation code: + Kod implementacji: + + + + Collations editor + Edytor zestawień + + + + Commit all collation changes + Zatwierdź wszystkie zmiany w zestawieniach + + + + Rollback all collation changes + Wycofaj wszystkie zmiany w zestawieniach + + + + Create new collation + Utwórz nowe zestawienie + + + + Delete selected collation + Usuń wybrane zestawienie + + + + Editing collations manual + Podręcznik edycji zestawień + + + + Enter a non-empty, unique name of the collation. + Podaj niepustą, unikalną nazwę zestawienia. + + + + Pick the implementation language. + Wybierz język implementacji. + + + + Enter a non-empty implementation code. + Wprowadź niepusty kod implementacji. + + + + Collations editor window has uncommited modifications. + Okno edytora zestawień ma niezatwierdzone zmiany. + + + + ColorButton + + + Pick a color + Wybierz kolor + + + + ColumnCollatePanel + + + Collation name: + Nazwa zestawienia: + + + + Named constraint: + Ograniczenie nazwane: + + + + Enter a name of the constraint. + Wprowadź nazwę ograniczenia. + + + + Enter a collation name. + Wprowadź nazwę zestawienia. + + + + ColumnDefaultPanel + + + Default value: + Domyślna wartość: + + + + Named constraint: + Ograniczenie nazwane: + + + + Enter a default value expression. + Wprowadź wyrażenie wartości domyślnej. + + + + Invalid default value expression: %1 + Niepoprawna wartość wyrażenia domyślnego: %1 + + + + Enter a name of the constraint. + Wprowadź nazwę ograniczenia. + + + + ColumnDialog + + + Column + Kolumna + + + + Name and type + Nazwa i typ + + + + Data type: + Typ danych: + + + + Column name: + Nazwa kolumny: + + + + Size: + Rozmiar: + + + + Constraints + Ograniczenia + + + + Unique + Wartości unikalne + + + + + + + + + + Configure + Konfiguruj + + + + Foreign Key + Klucz obcy + + + + Collate + Zestawienie + + + + Not NULL + Niepuste + + + + Check condition + Sprawdzaj warunek + + + + Primary Key + Klucz główny + + + + Default + Wartość domyślna + + + + Advanced mode + Tryb zaawandowany + + + + Add constraint + column dialog + Dodaj ograniczenie + + + + Edit constraint + column dialog + Edytuj ograniczenie + + + + + Delete constraint + column dialog + Usuń ograniczenie + + + + Move constraint up + column dialog + Przenieś ograniczenie w górę + + + + Move constraint down + column dialog + Przenieś ograniczenie w dół + + + + Add a primary key + column dialog + Dodaj klucz główny + + + + Add a foreign key + column dialog + Dodaj klucz obcy + + + + Add an unique constraint + column dialog + Dodaj ograniczenie wartości unikalnych + + + + Add a check constraint + column dialog + Dodaj ograniczenie sprawdzania wartości + + + + Add a not null constraint + column dialog + Dodaj ograniczenie niepustych wartości + + + + Add a collate constraint + column dialog + Dodaj ograniczenie zestawienia + + + + Add a default constraint + column dialog + Dodaj ograniczenie wartości domyślnej + + + + Are you sure you want to delete constraint '%1'? + column dialog + Czy na pewno chcesz usunąć ograniczenie '%1'? + + + + Correct the constraint's configuration. + Popraw konfigurację ograniczenia. + + + + This constraint is not officially supported by SQLite 2, +but it's okay to use it. + To ograniczenie nie jest oficjalnie wspireane przez SQLite 2, +ale można go używać. + + + + ColumnDialogConstraintsModel + + + Type + column dialog constraints + Typ + + + + Name + column dialog constraints + Nazwa + + + + Details + column dialog constraints + Szczegóły + + + + ColumnForeignKeyPanel + + + Foreign table: + Tabela obca: + + + + Foreign column: + Kolumn obca: + + + + Reactions + Reakcje + + + + Deferred foreign key + Klucz obcy odroczony + + + + Named constraint + Nazwane ograniczenie + + + + Constraint name + Nazwa ograniczenia + + + + Pick the foreign table. + Wybierz tabelę obcą + + + + Pick the foreign column. + Wybierz kolumnę obcą + + + + Enter a name of the constraint. + Wprowadź nazwę ograniczenia. + + + + ColumnPrimaryKeyPanel + + + Autoincrement + Autoinkrementacja + + + + Sort order: + Kierunek sortowania: + + + + Named constraint: + Ograniczenie nazwane: + + + + On conflict: + W razie konfliktu: + + + + Enter a name of the constraint. + Wprowadź nazwę ograniczenia. + + + + Autoincrement (only for %1 type columns) + column primary key + Autoinkrementacja (tylko dla kolumn o typie %1) + + + + ColumnUniqueAndNotNullPanel + + + Named constraint: + Ograniczenie nazwane: + + + + On conflict: + W razie konfliktu: + + + + Enter a name of the constraint. + Wprowadź nazwę ograniczenia. + + + + CompleterWindow + + + Column: %1 + completer statusbar + Kolumna: %1 + + + + Table: %1 + completer statusbar + Tabela: %1 + + + + Index: %1 + completer statusbar + Indeks: %1 + + + + Trigger: %1 + completer statusbar + Wyzwalacz: %1 + + + + View: %1 + completer statusbar + Widok: %1 + + + + Database: %1 + completer statusbar + Baza danych: %1 + + + + Keyword: %1 + completer statusbar + Słowo kluczowe: %1 + + + + Function: %1 + completer statusbar + Funkcja: %1 + + + + Operator: %1 + completer statusbar + Operator: %1 + + + + String + completer statusbar + Tekst + + + + Number + completer statusbar + Liczba + + + + Binary data + completer statusbar + Dane binarne + + + + Collation: %1 + completer statusbar + Zestawienie: %1 + + + + Pragma function: %1 + completer statusbar + Funkcja pragma: %1 + + + + ConfigDialog + + + + Configuration + Konfiguracja + + + + Search + Szukaj + + + + General + Ogólne + + + + Keyboard shortcuts + Skróty klawiszowe + + + + Look & feel + Wygląd i zachowanie + + + + Style + Style + + + + Fonts + Czcionki + + + + Colors + Kolory + + + + Plugins + Wtyczki + + + + Code formatters + Formatery kodu + + + + Data browsing + Przeglądanie danych + + + + Data editors + Edytory danych + + + + Data browsing and editing + Przeglądanie i edycja danych + + + + Number of data rows per page: + Liczba wierszy danych na stronie: + + + + + <p>When the data is read into grid view columns width is automatically adjusted. This value limits the initial width for the adjustment, but user can still resize the column manually over this limit.</p> + <p>Kiedy dane są wczytane do widoku siatki, szerokość kolumn jest automatycznie dostosowywana. Ta wartość ogranicza początkową szerokość tego dostosowywania, ale użytkownik nadal może rozszerzać kolumnę ręcznie poza ten limit.</p> + + + + Limit initial data column width to (in pixels): + Ogranicz początkową szerokość kolumn danych (w pikselach): + + + + Data types + Type danych + + + + Available editors: + Dostępne edytory: + + + + Editors selected for this data type: + Edytory wybrane dla tego typu danych: + + + + Schema editing + Edycja schematu + + + + Number of DDL changes kept in history. + Liczba zmian DDL trzymanych w historii. + + + + DDL history size: + Rozmiar historii DDL: + + + + Don't show DDL preview dialog when commiting schema changes + Nie pokazuj okna podglądu DDL podczas zatwierdzania zmian schematu + + + + SQL queries + Zapytania SQL + + + + + Number of queries kept in the history. + Liczba zapytań trzymana w historii. + + + + History size: + Rozmiar historii: + + + + <p>If there is more than one query in the SQL editor window, then (if this option is enabled) only a single query will be executed - the one under the keyboard insertion cursor. Otherwise all queries will be executed. You can always limit queries to be executed by selecting those queries before calling to execute.</p> + <p>Jeśli w oknie edytora SQL jest więcej niż jedno zapytanie, to (jeśli ta opcja jest włączona) tylko jedno zapytanie będzie wykonana - to, które znajduje się pod kursorem pisania. W przeciwnym wypadku wszystkie zapytania będą wykonywane. Zawsze możesz ograniczyć zapytania do wywołania przez zaznaczenie tych zapytań, które chcesz wywołać.</p> + + + + Execute only the query under the cursor + Wykonuj tylko zapytania będące pod kursorem + + + + Updates + Aktualizacje + + + + Automatically check for updates at startup + Sprawdzaj aktualizacje automatycznie przy starcie + + + + Session + Sesje + + + + Restore last session (active MDI windows) after startup + Przywróć ostatnią sesję (aktywne okna MDI) po starcie + + + + Filter shortcuts by name or key combination + Filtruj skróty po nazwie, lub kombinacji klawiszy + + + + Action + Akcja + + + + Key combination + Kombinacja klawiszy + + + + Changing language requires application restart to take effect. + Zmiana języka wymaga restartu aplikacji, aby zadziałać. + + + + Database list + Lista baz + + + + If switched off, then columns will be sorted in the order they are typed in CREATE TABLE statement. + Gdy wyłączone, to kolumny będą ułożone w takiej kolejności, w jakiej wystąpiły w zapytaniu CREATE TABLE. + + + + Sort table columns alphabetically + Sortuj kolumny tabel alfabetycznie. + + + + Expand tables node when connected to a database + Rozwiń listę tabel po połączeniu z bazą danych + + + + <p>Additional labels are those displayed next to the names on the databases list (they are blue, unless configured otherwise). Enabling this option will result in labels for databases, invalid databases and aggregated nodes (column group, index group, trigger group). For more labels see options below.<p> + <p>Dodatkowe etykiety, to te wyświetlane obok nazw na liście baz danych (są niebieskie, chyba że skonfigurowano je inaczej). Włączenie tej opcji spowoduje wyświetlenie etykiet dla baz danych, niepoprawnych baz danych, oraz dla węzłów agregujących (grupa kolumn, grupa indeksów, grupa wyzwalaczy). Więcej etykiet jest dostępne niżej.</p> + + + + Display additional labels on the list + Wyświetlaj dodatkowe etykiety na liście + + + + For regular tables labels will show number of columns, indexes and triggers for each of tables. + Dla zwykłych tabel etykiety będą pokazywać liczbę kolumn, inseksów, oraz wyzwalaczy dla tych tabel. + + + + Display labels for regular tables + Wyświetlaj etykiety dla zwykłych tabel + + + + Virtual tables will be marked with a 'virtual' label. + Tabele wirtualne będą oznaczone etykietą 'wirtualna'. + + + + Display labels for virtual tables + Wyświetlaj etykiety dla tabel wirtualnych + + + + Expand views node when connected to a database + Rozwiń listę widoków po połączeniu z bazą. + + + + If this option is switched off, then objects will be sorted in order they appear in sqlite_master table (which is in order they were created) + Gdy ta opcja jest wyłączona, to wszystkie obiekty będą ułożone w takiej kolejności, w jakiej występują w tabeli sqlite_master (czyli w takiej, w jakiej zostały stworzone) + + + + Sort objects (tables, indexes, triggers and views) alphabetically + Sortuj obiekty (tabele, indeksy, wyzwalacze i widoki) alfabetycznie + + + + Display system tables and indexes on the list + Wyświetlaj tabele i indeksy systemowe na liście + + + + Table windows + Okna tabel + + + + When enabled, Table Windows will show up with the data tab, instead of the structure tab. + Gdy włączone, Okna Tabel będą się pokazywać z zakładką danych, zamiast z zakładką struktury. + + + + Open Table Windows with the data tab for start + Otwieraj Okna Tabeli z zakładką danych na początek + + + + View windows + Okna Widoków + + + + When enabled, View Windows will show up with the data tab, instead of the structure tab. + Gdy włączone, Okna Widoków będą się pokazywać z zakładką danych, zamiast z zakładką struktury. + + + + Open View Windows with the data tab for start + Otwieraj Okna Widoku z zakładką danych na początek + + + + Hide built-in plugins + Ukryj wtyczki wbudowane + + + + Current style: + Aktualny styl: + + + + Preview + Podgląd + + + + Enabled + Włączone + + + Column + Kolumna + + + + Disabled + Wyłączone + + + + + Language + Język + + + + Active formatter plugin + Aktywna wtyczka formatera + + + + SQL editor font + Czcionka edytora SQL + + + + Database list font + Czcionka listy baz danych + + + + Database list additional label font + Czcionka dodatkowych etykiety listy baz danych + + + + Data view font + Czcionka widoku danych + + + + Status field font + Czcionka pola statusu + + + + SQL editor colors + Kolory edytora SQL + + + + Current line background + Tło bieżącej linii + + + + <p>SQL strings are enclosed with single quote characters.</p> + <p>Łańcuchy znaków SQL są zamknięte pomiędzy znakami apostrofu.</p> + + + + String foreground + Czcionka łańcucha znaków + + + + <p>Bind parameters are placeholders for values yet to be provided by the user. They have one of the forms:</p><ul><li>:param_name</li><li>$param_name</li><li>@param_name</li><li>?</li></ul> + <b>Parametry wiążące to wyrażenia zastępcze dla wartości, które mają być dopiero dostarczone przez użytkownika. Mają one jedną z form: </p><ul><li>:nazwa_parametru</li><li>$nazwa_parametru</li><li>@nazwa_parametru</li><li>?</li></ul> + + + + Bind parameter foreground + Czcionka parametru wiążącego + + + + Highlighted parenthesis background + Tło podświetlonych nawiasów + + + + <p>BLOB values are binary values represented as hexadecimal numbers, like:</p><ul><li>X'12B4'</li><li>x'46A2F4'</li></ul> + <p>Wartości BLOB są wartościami binarnymi, reprezentowanymi jako liczby heksadecymalne, jak np:</p><ul><li>X'12B4'</li><li>x'46A2F4'</li></ul> + + + + BLOB value foreground + + + + + Regular foreground + Standardowa czcionka + + + + Line numbers area background + Tło obszaru numerów linii + + + + Keyword foreground + Czcionka słowa kluczowego + + + + Number foreground + Czcionka liczby + + + + Comment foreground + Czcionka komentarza + + + + <p>Valid objects are name of tables, indexes, triggers, or views that exist in the SQLite database.</p> + <p>Poprawne obiekty to nazwy tabel, indekstów, wyzwalaczy i widoków, które istnieją w basie SQLite.</p> + + + + Valid objects foreground + Czcionka poprawnych obiektów + + + + Data view colors + Kolory widoku danych + + + + <p>Any data changes will be outlined with this color, until they're commited to the database.</p> + <p>Jakakolwiek zmiana danych będzie obrysowana tym kolorem, dopóki nie zostanie zatwierdzona do bazy danych.</p> + + + + Uncommited data outline color + Kolor obrysu niezatwierdzonych danych + + + + <p>In case of error while commiting data changes, the problematic cell will be outlined with this color.</p> + <p>W przypadku błędu podczas zatwierdzania zmian danych, komórka będąca przyczyną problemu zostanie obrysowana tym kolorem.</p> + + + + Commit error outline color + Kolor obrysu błędu zatwierdzania + + + + NULL value foreground + Kolor czcionki wartości NULL + + + + Deleted row background + Tło wiersza usuniętego + + + + Database list colors + Kolory listy baz danych + + + + <p>Additional labels are those which tell you SQLite version, number of objects deeper in the tree, etc.</p> + <p>Dodatkowe etykiety to te, które mówią o wersji SQLite, liczbie obiektów w głębszych częściach drzewa, itp.</p> + + + + Additional labels foreground + Czcionka dodatkowych etykiet + + + + Status field colors + Kolory pola statusu + + + + Information message foreground + Czcionka wiadomości informującej + + + + Warning message foreground + Czcionka wiadomości ostrzegającej + + + + Error message foreground + Czcionka wiadomości błędu + + + + Description: + plugin details + Opis: + + + + Category: + plugin details + Kategoria: + + + + Version: + plugin details + Wersja: + + + + Author: + plugin details + Autor: + + + + Internal name: + plugin details + Nazwa wewnętrzna: + + + + Dependencies: + plugin details + Zależności: + + + + Conflicts: + plugin details + Konflikty: + + + + Plugin details + Szczegóły wtyczki + + + + Plugins are loaded/unloaded immediately when checked/unchecked, but modified list of plugins to load at startup is not saved until you commit the whole configuration dialog. + Wtyczki są ładowane/wyładowywane natychmiast po zaznaczeniu/odznaczeniu, ale zmodyfikowana lista wtyczek, które należy załadować przy starcie nie jest zapisana, dopóki nie zatwierdzisz całego okna configuracji. + + + + %1 (built-in) + plugins manager in configuration dialog + %1 (wbudowany) + + + + Details + Szczegóły + + + + No plugins in this category. + Brak wtyczek w tej kategorii. + + + + Add new data type + Dodaj nowy typ danych + + + + Rename selected data type + Zmień nazwę wybranego typu danych + + + + Delete selected data type + Usuń wybrany typ danych + + + + Help for configuring data type editors + Pomoc w konfiguracji edytorów typów danych + + + + ConstraintCheckPanel + + + The condition + Warunek + + + + Named constraint: + Ograniczenie nazwane: + + + + On conflict + W razie konfliktu + + + + Enter a valid condition. + Wprowadź poprawny warunek. + + + + Enter a name of the constraint. + Wprowadź nazwę ograniczenia. + + + + ConstraintDialog + + + New constraint + constraint dialog + Nowe ograniczenie + + + + Create + constraint dialog + Utwórz + + + + Edit constraint + dialog window + Edytuj ograniczenie + + + + Apply + constraint dialog + Zastosuj + + + + Primary key + table constraints + Klucz główny + + + + Foreign key + table constraints + Klucz obcy + + + + Unique + table constraints + Wartości unikalne + + + + Not NULL + table constraints + Niepuste + + + + Check + table constraints + Warunek + + + + Collate + table constraints + Zestawienie + + + + Default + table constraints + Wartość domyślna + + + + ConstraintTabModel + + + Table + table constraints + Tabela + + + + Column (%1) + table constraints + Kolumna (%1) + + + + Scope + table constraints + Zakres + + + + Type + table constraints + Typ + + + + Details + table constraints + Szczegóły + + + + Name + table constraints + Nazwa + + + + DataView + + + Filter data + data view + Filtruj dane + + + + Grid view + Widok siatki + + + + Form view + Widok formularza + + + + Refresh table data + data view + Odśwież dane tabeli + + + + First page + data view + Pierwsza strona + + + + Previous page + data view + Poprzednia strona + + + + Next page + data view + Następna strona + + + + Last page + data view + Ostatnia strona + + + + Apply filter + data view + Zastosuj filtr + + + + Commit changes for selected cells + data view + Zatwierdź zmiany dla wybranych komórek + + + + Rollback changes for selected cells + data view + Wycofaj zmiany dla wybranych komórek + + + + Show grid view of results + sql editor + Pokaż widok siatki dla wyników + + + + Show form view of results + sql editor + Pokaż widok formularza dla wyników + + + + Filter by text + data view + Filtruj po tekście + + + + Filter by the Regular Expression + data view + Filtruj używając Wyrażeń Regularnych + + + + Filter by SQL expression + data view + Filtruj używając wyrażenia SQL + + + + Tabs on top + data view + Karty na górze + + + + Tabs at bottom + data view + Karty na dole + + + + Total number of rows is being counted. +Browsing other pages will be possible after the row counting is done. + Całkowita liczba wierszy jest liczona. +Przeglądanie pozostałych stron będzie możliwe kiedy liczenie wierszy zostanie zakończone. + + + + Row: %1 + Wiersz: %1 + + + + DbConverterDialog + + + Source database + Źródłowa baza danych + + + + Source database version: + Wersja źródłowej bazy: + + + + Target database + Docelowa baza danych + + + + Target version: + Wersja docelowej bazy: + + + + This is the file that will be created as a result of the conversion. + To jest plik, który będzie stworzony jako wynik konwersji. + + + + Target file: + Docelowy plik: + + + + Name of the new database: + Nazwa nowej bazy: + + + + This is the name that the converted database will be added to SQLiteStudio with. + To jest nazwa z jaką skonwertowana baza będzie dodana do SQLiteStudio. + + + + Convert database + Konwertuj bazę danych + + + + Select source database + Wybierz źródłową bazę danych + + + + Enter valid and writable file path. + Wprowadź poprawną ścieżkę do pliku, do której masz prawo zapisywać. + + + + Entered file exists and will be overwritten. + Podany plik istnieje i zostanie nadpisany. + + + + Enter a not empty, unique name (as in the list of databases on the left). + Wprowadź niepustą, unikalną nazwę (w kontekście listy baz danych po lewej). + + + + No valid target dialect available. Conversion not possible. + Nie ma dostępnego poprawnego docelowego dialektu. Konwersja nie jest możliwa. + + + + Select valid target dialect. + Wybierz poprawny docelowy dialekt. + + + + Database %1 has been successfully converted and now is available under new name: %2 + Baza danych %1 została przekonwertowana pomyślnie i jest teraz dostępna pod nazwą: %2 + + + + SQL statements conversion + Konwersja zapytań SQL + + + + Following error occurred while converting SQL statements to the target SQLite version: + Następujące błędy wystąpiły podczas konwersji zapytań SQL do docelowej wersji SQLite: + + + + Would you like to ignore those errors and proceed? + Czy chcesz zignorować te błędy i kontynuować? + + + + DbDialog + + + Database + Baza danych + + + + Database driver + Sterownik bazy danych + + + + Name + Nazwa + + + + Type + Typ + + + + Browse for database file on local computer + Przeglądaj w poszukiwaniu pliku bazy danych na lokalnym komputerze + + + + File + Plik + + + + Generate name basing on file path + Generuj nazwę bazując na ścieżce do pliku + + + + Permanent + Trwała + + + + <p>Enable this if you want the database to be stored in configuration file and restored every time SQLiteStudio is started.</p> + aasfd + <p>Włącz to, jeśli chcesz aby baza danych była przechowywana w pliku konfiguracji i przywracana za każdym razem, gdy startuje SQLiteStudio.</p> + + + + Test database connection + Testuj połączenie z bazą + + + + Browse + Przeglądaj + + + + The name will be auto-generated + Nazwa będzie generowana automatycznie + + + + Type the name + Wprowadź nazwę + + + + DbObjectDialogs + + + Delete table + Usuń tabelę + + + + Are you sure you want to delete table %1? + Czy na pewno chcesz usunąć tabelę %1? + + + + Delete index + Usuń indeks + + + + Are you sure you want to delete index %1? + Czy na pewno chcesz usunąć indeks %1? + + + + Delete trigger + Usuń wyzwalacz + + + + Are you sure you want to delete trigger %1? + Czy na pewno chcesz usunąć wyzwalacz %1? + + + + Delete view + Usuń widok + + + + Are you sure you want to delete view %1? + Czy na pewno chcesz usunąć widok %1? + + + + Error while dropping %1: %2 + Błąd podczas porzucania %1: %2 + + + + DbTree + + + Databases + Bazy danych + + + + Filter by name + Filtruj po nazwie + + + + Copy + Kopiuj + + + + Paste + Wklej + + + + Select all + Zaznacz wszystko + + + + Create a group + Utwórz grupę + + + + Delete the group + Usuń grupę + + + + Rename the group + Zmień nazwę grupy + + + + Add a database + Dodaj bazę danych + + + + Edit the database + Edytuj bazę danych + + + + Remove the database + Usuń bazę danych + + + + Connect to the database + Połącz z bazą danych + + + + Disconnect from the database + Rozłącz się z bazą danych + + + + Import + Importuj + + + + Export the database + Eksportuj bazę danych + + + + Convert database type + Konwertuj typ bazy danych + + + + Vacuum + Odkurz + + + + Integrity check + Sprawdź spójność + + + + Create a table + Utwórz tabelę + + + + Edit the table + Edytuj tabelę + + + + Entry with name %1 already exists in group %2. + Pozycja o nazwie %1 istnieje już w grupie %2. + + + Drop the table + Porzuć tabelę + + + + Export the table + Eksportuj tabelę + + + + Import into the table + Importuj do tabeli + + + + Populate table + Zaludnij tabelę + + + + Create similar table + Utwórz podobną tabelę + + + + Create an index + Utwórz indeks + + + + Edit the index + Edytuj indeks + + + Drop the index + Porzuć indeks + + + + Create a trigger + Utwórz wyzwalacz + + + + Edit the trigger + Edytuj wyzwalacz + + + Drop the trigger + Porzuć wyzwalacz + + + + Create a view + Utwórz widok + + + + Edit the view + Edytuj widok + + + Drop the view + Porzuć widok + + + + Add a column + Dodaj kolumnę + + + + Edit the column + Edytuj kolumnę + + + + Delete the column + Usuń kolumnę + + + + Delete selected items + Usuń wybrane elementy + + + + Clear filter + Wyczyść filtr + + + + Refresh all database schemas + Odśwież schematy wszystkich baz danych + + + + Refresh selected database schema + Odśwież schemat wybranej bazy danych + + + + Delete the table + Usuń tabelę + + + + Reset autoincrement sequence + Wyzeruj sekwencję autoinkrementacji + + + + Delete the index + Usuń indeks + + + + Delete the trigger + Usuń wyzwalacz + + + + Delete the view + Usuń widok + + + + + Database + Baza danych + + + + Grouping + Grupowanie + + + + + Create group + Utwórz grupę + + + + Group name + Nazwa grupy + + + + Delete group + Usuń grupę + + + + Are you sure you want to delete group %1? +All objects from this group will be moved to parent group. + Czy na pewno chcesz usunąć grupę %1? +Wszystkie obiekty z tej grupy zostaną przeniesione do nadrzędnej grupy. + + + + Delete database + Usuń bazę danych + + + + Are you sure you want to delete database '%1'? + Czy na pewno chcesz usunąć bazę danych '%1'? + + + + + Cannot import, because no import plugin is loaded. + Nie można zaimportować, ponieważ żadna wtyczka importu nie została załadowana. + + + + + Cannot export, because no export plugin is loaded. + Nie można wyeksportować, ponieważ żadna wtyczka eksportu nie została załadowana. + + + + Error while executing VACUUM on the database %1: %2 + Błąd podczas wykonywania VACUUM na bazie danych %1: %2 + + + + VACUUM execution finished successfully. + Wykonanie VACUUM przebiegło pomyślnie. + + + + Integrity check (%1) + Sprawdzanie spójności (%1) + + + + Reset autoincrement + Wyzeruj autoinkrementację + + + + Are you sure you want to reset autoincrement value for table '%1'? + Czy na pewno chcesz wyzerować wartość autoinkrementacji dla tabeli '%1'? + + + + An error occurred while trying to reset autoincrement value for table '%1': %2 + Wystąpił błąd podczas próby wyzerowania wartości autoinkrementacji dla tabeli '%1': %2 + + + + Autoincrement value for table '%1' has been reset successfly. + Wartość autoinkrementacji dla tabeli '%1' została pomyślnie wyzerowana. + + + + Following objects will be deleted: %1. + Następujące obiekty zostaną usunięte: %1 + + + + Following databases will be removed from list: %1. + Następujące bazy danych zostaną usunięte z listy: %1 + + + + Remainig objects from deleted group will be moved in place where the group used to be. + Pozostałe obiekty z usuniętej grupy będą przeniesione w miejsce, gdzie dotychczas była ta grupa. + + + + %1<br><br>Are you sure you want to continue? + %1<br><br>Czy na pewno chcesz kontynuować? + + + + Delete objects + Usuń obiekty + + + + DbTreeItemDelegate + + + error + dbtree labels + błąd + + + + (system table) + database tree label + (tabela systemowa) + + + + (virtual) + virtual table label + (wirtualna) + + + + (system index) + database tree label + (indeks systemowy) + + + + DbTreeModel + + + Database: %1 + dbtree tooltip + Baza danych: %1 + + + + Version: + dbtree tooltip + Wersja: + + + + File size: + dbtree tooltip + Rozmiar pliku: + + + + Encoding: + dbtree tooltip + Kodowanie: + + + + Error details: + dbtree tooltip + Szczegóły błędu: + + + + Table : %1 + dbtree tooltip + Tablela: : %1 + + + + Columns (%1): + dbtree tooltip + Kolumny (%1): + + + + Indexes (%1): + dbtree tooltip + Indeksy (%1): + + + + Triggers (%1): + dbtree tooltip + Wyzwalacze (%1): + + + + Copy + Kopiuj + + + + Move + Przenieś + + + + Include data + Również dane + + + + Include indexes + Również indeksy + + + + Include triggers + Również wyzwalacze + + + + Abort + Przerwij + + + + Referenced tables + Tabele powiązane + + + + Do you want to include following referenced tables as well: +%1 + Czy chcesz zawrzeć również powiązane tabele: +%1 + + + + Name conflict + Konflikt nazwy + + + + Following object already exists in the target database. +Please enter new, unique name, or press '%1' to abort the operation: + Następująy obiekt istnieje już w docelowej bazie danych. +Proszę podać nową, unikalną nazwę, lub nacisnąć '%1', aby przerwać operację. + + + + SQL statements conversion + Konwersja zapytań SQL + + + + Following error occurred while converting SQL statements to the target SQLite version: + Następujące błędy wystąpiły podczas konwersji zapytań SQL do docelowej wersji SQLite: + + + + Would you like to ignore those errors and proceed? + Czy chcesz zignorować te błędy i kontynuować? + + + + DdlHistoryWindow + + + Filter by database: + Filtruj po bazie danych: + + + + -- Queries executed on database %1 (%2) +-- Date and time of execution: %3 +%4 + -- Zapytania wykonane na bazie %1 (%2) +-- Data i godzina wykonania: %3 +%4 + + + + DDL history + Historia DDL + + + + DdlPreviewDialog + + + Queries to be executed + Zapytania do wykonania + + + + Don't show again + Nie pokazuj więcej + + + + DebugConsole + + + SQLiteStudio Debug Console + Konsola Debugowania SQLiteStudio + + + + EditorWindow + + + Query + Zapytanie + + + + History + Historia + + + + Results in the separate tab + Wyniki w osobnej karcie + + + + Results below the query + Wyniki pod zapytaniem + + + + + SQL editor %1 + Edytor SQL %1 + + + + Results + Wyniki + + + + Execute query + Wykonaj zapytanie + + + + Explain query + Wytłumacz zapytanie + + + + Clear execution history + sql editor + Wymaż historię zapytań + + + + Export results + sql editor + Wyeksportuj wyniki + + + + Create view from query + sql editor + Utwórz widok z zapytania + + + + Previous database + Poprzednia baza danych + + + + Next database + Następna baza danych + + + + Show next tab + sql editor + Pokaż następną kartę + + + + Show previous tab + sql editor + Pokaż poprzednią kartę + + + + Focus results below + sql editor + Aktywuj wyniki poniżej + + + + Focus SQL editor above + sql editor + Aktywuj edytor SQL powyżej + + + + Active database (%1/%2) + Aktywna baza danych (%1/%2) + + + + Query finished in %1 second(s). Rows affected: %2 + Zapytanie ukończone w %1 sekund(y). Liczba przetworzonych wierszy: %2 + + + + Query finished in %1 second(s). + Zapytanie ukończone w %1 sekund(y). + + + Query finished in %2 second(s). + Zapytanie ukończone w %2 sekund(y). + + + + Clear execution history + Wymaż historię zapytań + + + + Are you sure you want to erase the entire SQL execution history? This cannot be undone. + Czy na pewno chcesz wymazać całą historię zapytań SQL? Tego nie można odwrócić. + + + + Cannot export, because no export plugin is loaded. + Nie można wyeksportować, ponieważ żadna wtyczka eksportu nie została załadowana. + + + + No database selected in the SQL editor. Cannot create a view for unknown database. + Nie wybrano bazdy danych w edytorze SQL. Nie można utworzyć widoku dla nieznanej bazy. + + + + Editor window "%1" has uncommited data. + Okno edytora "%1" ma niezatwierdzone dane. + + + + ErrorsConfirmDialog + + + Errors + Błędy + + + + Following errors occured: + Wystąpiły następujące błędy: + + + + Would you like to proceed? + Czy chcesz kontynuować? + + + + ExportDialog + + + Export + Eksportuj + + + + What do you want to export? + Co chcesz eksportować? + + + + A database + Bazę danych + + + + A single table + Pojedynczą tabelę + + + + Query results + Wyniki zapytania + + + + Table to export + Tabela do wyeksportowania + + + + Database + Baza danych + + + + Table + Tabela + + + + Options + Opcje + + + + When this option is unchecked, then only table DDL (CREATE TABLE statement) is exported. + Gdy ta opcja jest odznaczona, to tylko DDL tabeli (zapytanie CREATE TABLE) jest eksportowane. + + + + Export table data + Eksportuj dane tabeli + + + + Export table indexes + Eksportuj indeksy tabeli + + + + Export table triggers + Eksportuj wyzwalacze tabeli + + + + Note, that exporting table indexes and triggers may be unsupported by some output formats. + Zwróć uwagę, że eksportowanie indeksów i wyzwalaczy tabeli może nie być obsługiwane przez niektóre formaty wyjściowe. + + + + Select database objects to export + Wybierz obiekty bazy danych do eksportu + + + + Export data from tables + Eksportuj dane z tabel + + + + Select all + Zaznacz wszystko + + + + Deselect all + Odznacz wszystko + + + + + Database: + Baza danych: + + + + Query to export results for + Zapytanie dla wyników do eksportu + + + + Query to be executed for results: + Zapytanie, które należy wykonać dla wyników: + + + + Export format and options + Format eksportu i opcje + + + + Export format + Format eksportu + + + + Output + Wyjście + + + + Exported file path + Ścieżka do wyeksportowanego pliku + + + + Clipboard + Schowek + + + + File + Plik + + + + Exported text encoding: + Kodowanie wyeksportowanego tekstu: + + + + Export format options + Opcje formatu eksportowania + + + + Cancel + Anuluj + + + + + + Select database to export. + Wybierz bazę do eksportu. + + + + Select table to export. + Wybierz tabelę do eksportu. + + + + Enter valid query to export. + Wprowadź poprawne zapytanie do eksportu. + + + + Select at least one object to export. + Wybierz przynajmniej jeden obiekt do eksportu. + + + + You must provide a file name to export to. + Musisz podać nazwę pliku do którego należy wyeksportować. + + + + Path you provided is an existing directory. You cannot overwrite it. + Ścieżka którą podałeś jest istniejącym katalogiem. Nie można go nadpisać. + + + + The directory '%1' does not exist. + Katalog '%1' nie istnieje. + + + + The file '%1' exists and will be overwritten. + Plik '%1' istnieje i zostanie nadpisany. + + + + All files (*) + Wszystkie pliki (*) + + + + Pick file to export to + Wybierz plik do eksportu + + + + Internal error during export. This is a bug. Please report it. + Wystąpił wewnętrzny błąd podczas eksportu. To jest błąd programu. Proszę to zgłosić. + + + + FontEdit + + + Choose font + font configuration + Wybierz czcionkę + + + + Form + + + Active SQL formatter plugin + Aktywna wtyczka formatera SQL + + + + FormView + + + Commit row + form view + Zatwierdź wiersz + + + + Rollback row + form view + Wycofaj wiersz + + + + First row + form view + Pierwszy wiersz + + + + Previous row + form view + Poprzedni wiersz + + + + Next row + form view + Następny wiersz + + + + Last row + form view + Ostatni wiersz + + + + Insert new row + form view + Wstaw nowy wiersz + + + + Delete current row + form view + Usuń bieżący wiersz + + + + FunctionsEditor + + + Filter funtions + Filtruj funkcje + + + + Function name: + Nazwa funkcji: + + + + Implementation language: + Język implementacji: + + + + Type: + Typ: + + + + Input arguments + Argumenty wejściowe + + + + Undefined + Niezdefiniowane + + + + Databases + Bazy danych + + + + Register in all databases + Zarejestruj we wszystkich bazach danych + + + + Register in following databases: + Zarejestruj w następujących bazach danych: + + + + Initialization code: + Kod inicjalizacji: + + + + + Function implementation code: + Kod implementacji funkcji: + + + + Final step implementation code: + Kod implementacji ostatniego kroku: + + + + SQL function editor + Edytor funkcji SQL + + + + Commit all function changes + Zatwierdź zmiany we wszystkich funkcjach + + + + Rollback all function changes + Wycofaj zmiany we wszystkich funkcjach + + + + Create new function + Utwórz nową funkcję + + + + Delete selected function + Usuń wybraną funkcję + + + + Custom SQL functions manual + Podręcznik własnych funkcji SQL + + + + Add function argument + Dodaj argument funkcji + + + + Rename function argument + Zmień nazwę argumentu funkcji + + + + Delete function argument + Usuń argument funkcji + + + + Move function argument up + Przesuń argument funkcji w górę + + + + Move function argument down + Przesuń argument funkcji w dół + + + + Scalar + Skalarna + + + + Aggregate + Agregacyjna + + + + Enter a non-empty, unique name of the function. + Wprowadź niepustą, unikalną nazwę funkcji + + + + Pick the implementation language. + Wybierz język implementacji. + + + + Per step code: + Kod pojedynczego kroku: + + + + Enter a non-empty implementation code. + Wprowadź niepusty kod implementacji. + + + + argument + new function argument name in function editor window + argument + + + + Functions editor window has uncommited modifications. + Okno edytora funkcji ma niezatwierdzone zmiany. + + + + ImportDialog + + + Import data + Importuj dane + + + + Table to import to + Tabela do której należy importować + + + + Table + Tabela + + + + Database + Baza danych + + + + Data source to import from + Źródło danych z którego należy importować + + + + Data source type + Typ źródła danych + + + + Options + OOpcje + + + + Input file: + Plik wejściowy: + + + + Text encoding: + Kodowanie tekstu: + + + + Data source options + Opcje źródła danych + + + + Cancel + Anuluj + + + + If you type table name that doesn't exist, it will be created. + Jeśli wpiszesz nazwę tabeli, która nie istnieje, to zostanie ona stworzona. + + + + Enter the table name + Wprowadź nazwę tabeli + + + + Select import plugin. + Wybierz wtyczkę importu + + + + You must provide a file to import from. + Musisz podać plik z którego należy zaimportować. + + + + The file '%1' does not exist. + Plik '%1' nie istnieje. + + + + Path you provided is a directory. A regular file is required. + Ścieżka którą podałeś jest katalogiem. Wymagany jest zwykły plik. + + + + Pick file to import from + Wybierz plik do importu + + + + IndexDialog + + + + Index + Indeks + + + + On table: + Na tabeli: + + + + Index name: + Nazwa indeksu: + + + + Partial index condition + Warunek indeksu częściowego: + + + + Unique index + Indeks unikalny + + + + Column + Kolumna + + + + Collation + Zestawienie + + + + Sort + Sortowanie + + + + DDL + DDL + + + + Tried to open index dialog for closed or inexisting database. + Próbowano otworzyć okno indeksu dla zamkniętej lub nieistniejącej bazy. + + + + Could not process index %1 correctly. Unable to open an index dialog. + Nie udało się przetworzyć poprawnie indeksu %1. Nie można otworzyć okna indeksu. + + + + Pick the table for the index. + Wybierz tabelę dla indeksu. + + + + Select at least one column. + Zaznacz przynajmniej jedną kolumnę. + + + + Enter a valid condition. + Wprowadź poprawny warunek. + + + + default + index dialog + domyślne + + + + Sort order + table constraints + Kierunek sortowania + + + + + Error + index dialog + Błąd + + + + Cannot create unique index, because values in selected columns are not unique. Would you like to execute SELECT query to see problematic values? + Nie można utworzyć indeksu, ponieważ wartości w wybranych kolumnach nie są unikalne. Czy chcesz wykonać zapytanie SELECT, aby zobaczyć wartości stwarzające problem? + + + + An error occurred while executing SQL statements: +%1 + Wystąpił błąd podczas wykonywania zapytań SQL: +%1 + + + + LanguageDialog + + + Language + Język + + + + Please choose language: + Proszę wybrać język: + + + + MainWindow + + + Database toolbar + Pasek narzędzi baz danych + + + + Structure toolbar + Pasek narzędzi struktury + + + + Tools + Narzędzia + + + + Window list + Lista okien + + + + View toolbar + Pasek narzędzi widoku + + + + Configuration widgets + Kontrolki konfiguracji + + + + Syntax highlighting engines + Silniki podświetlania składni + + + + Data editors + Edytory danych + + + + Running in debug mode. Press %1 or use 'Help / Open debug console' menu entry to open the debug console. + Uruchomiono tryb debugowania. Wciśnij %1 lub wybierz menu 'Pomoc / Otwórz konsolę debugowania' aby otworzyć konsolę debugowania. + + + + Running in debug mode. Debug messages are printed to the standard output. + Uruchomiono tryb debugowania. Wiadomości debugujące są wyświetlane na standardowym wyjściu. + + + + You need to restart application to make the language change take effect. + Należy zrestartować aplikację, aby nastąpiła zmiana języka. + + + + Open SQL editor + Otwórz edytor SQL + + + + Open DDL history + Otwórz historię DDL + + + + Open SQL functions editor + Otwórz edytor funkcji SQL + + + + Open collations editor + Otwórz edytor zestawień + + + + Import + Importuj + + + + Export + Eksportuj + + + + Open configuration dialog + Otwórz okno konfiguracji + + + + Tile windows + Ustaw okna w płytki + + + + Tile windows horizontally + Ustaw okno poziomo + + + + Tile windows vertically + Ustaw okna pionowo + + + + Cascade windows + Ustaw okna caskadowo + + + + Next window + Następne okno + + + + Previous window + Poprzednie okno + + + + Hide status field + Ukryj pole statusu + + + + Close selected window + Zamknij wybrane okno + + + + Close all windows but selected + Zamknij wszystkie okna, oprócz wybranego + + + + Close all windows + Zamknij wszystkie okna + + + + Restore recently closed window + Przywróć ostatnio zamknięte okno + + + + Rename selected window + Zmień nazwę wybranego okna + + + + Open Debug Console + Otwórz Konsolę Debugowania + + + + Report a bug + Zgłoś błąd + + + + Propose a new feature + Zgłoś pomysł + + + + About + O programie + + + + Licenses + Licencje + + + + Open home page + Otwórz stronę domową + + + + Open forum page + Otwórz stronę forum + + + + User Manual + Podręcznik Użytkownika + + + + SQLite documentation + Dokumentacja SQLite + + + + Report history + Historia zgłoszeń + + + + Check for updates + Sprawdź aktualizacje + + + + Database + menubar + Baza danych + + + + Structure + menubar + Struktura + + + + View + menubar + Widok + + + + Window list + menubar view menu + Lista okien + + + + Tools + menubar + Narzędzia + + + + Help + Pomoc + + + + Could not set style: %1 + main window + Nie udało się ustawić stylu: %1 + + + + Cannot export, because no export plugin is loaded. + Nie można wyeksportować, ponieważ żadna wtyczka eksportu nie została załadowana. + + + + Cannot import, because no import plugin is loaded. + Nie można zaimportować, ponieważ żadna wtyczka importu nie została załadowana. + + + + Rename window + Zmień nazwę okna + + + + Enter new name for the window: + Wprowadź nową nazwę dla okna: + + + + New updates are available. <a href="%1">Click here for details</a>. + Nowe aktualizacje są dostępne: <a href="%1">Kliknij aby poznać szczegóły</a>. + + + + You're running the most recent version. No updates are available. + Uruchomiona jest najnowsza wersja. Nie ma dostępnych aktualizacji. + + + + Database passed in command line parameters (%1) has been temporarily added to the list under name: %2 + Baza danych podana w linii poleceń (%1) jest tymczasowo dodana do listy pod nazwą: %2 + + + + Could not add database %1 to list. + Nie udało się dodać bazy danych %1 do listy. + + + + MdiWindow + + + Uncommited changes + Niezatwierdzone dane + + + + Close anyway + Zamknij mimo to + + + + Don't close + Nie zamykaj + + + + MultiEditor + + + Null value + multieditor + Wartość null + + + + Configure editors for this data type + Skonfiguruj edytory dla tego typu danych + + + + Data editor plugin '%1' not loaded, while it is defined for editing '%1' data type. + Wtyczka edytora danych '%1' nie jest załadowana, podczas gdy jest ona zdefiniowana do edycji typu danych '%1'. + + + + Deleted + multieditor + Usunięto + + + + Read only + multieditor + Tylko do odczytu + + + + MultiEditorBool + + + Boolean + Logiczna + + + + MultiEditorDate + + + Date + Data + + + + MultiEditorDateTime + + + Date & time + Data i czas + + + + MultiEditorHex + + + Hex + Heks + + + + MultiEditorNumeric + + Number + Liczba + + + + Number + numeric multi editor tab name + Liczba + + + + MultiEditorText + + + Text + Tekst + + + + Tab changes focus + Tabulator zmienia aktywność + + + + Cut + Wytnij + + + + Copy + Kopiuj + + + + Paste + Wklej + + + + Delete + Usuń + + + + Undo + Cofnij + + + + Redo + Przywróć + + + + MultiEditorTime + + + Time + Czas + + + + NewConstraintDialog + + + New constraint + Nowe ograniczenie + + + + + Primary Key + new constraint dialog + Klucz główny + + + + + Foreign Key + new constraint dialog + Klucz obcy + + + + + Unique + new constraint dialog + Wartości unikalne + + + + + Check + new constraint dialog + Warunek + + + + Not NULL + new constraint dialog + Niepuste + + + + Collate + new constraint dialog + Zestawienie + + + + Default + new constraint dialog + Wartość domyślna + + + + NewVersionDialog + + + SQLiteStudio updates + Aktualizacje SQLiteStudio + + + + New updates are available! + Dostępne są nowe aktualizacje! + + + + Component + Komponent + + + + Current version + Obecna wersja + + + + Update version + Wersja aktualizacji + + + + Check for updates on startup + Sprawdzaj aktualizacje na starcie + + + + Update to new version! + Aktualizuj do nowej wersji! + + + + The update will be automatically downloaded and installed. This will also restart application at the end. + Aktualizacja będzie pobrana i zainstalowana automatycznie. Spowoduje to również na końcu restart aplikacji. + + + + Not now. + Nie teraz. + + + + Don't install the update and close this window. + Nie instaluj aktualizacji i zamknij to okno. + + + + PopulateConfigDialog + + + Populating configuration + Konfiguracja zaludniania + + + + Configuring <b>%1</b> for column <b>%2</b> + Konfigurowanie <b>%1</b> dla kolumny <b>%2</b> + + + + PopulateDialog + + + Populate table + Zaludnij tabelę + + + + Database + Baza danych + + + + Table + Tabela + + + + Columns + Kolumny + + + + Number of rows to populate: + Liczba wierszy do zaludnienia: + + + + Populate + populate dialog button + Zaludnij + + + + Configure + Konfiguruj + + + + Populating configuration for this column is invalid or incomplete. + Konfiguracja zaludniania dla tej kolumny jest niepoprawna lub niekompletna. + + + + Select database with table to populate + Wybierz bazę danych z tabelą do zaludnienia + + + + Select table to populate + Wybierz tabelę do zaludnienia + + + + You have to select at least one column. + Musisz zaznaczyć przynajmniej jedną kolumnę. + + + + QObject + + + The query execution mechanism had problems with extracting ROWID's properly. This might be a bug in the application. You may want to report this. + Mechanizm wykonywania zapytań miał problemy z wyciągnięciem własności ROWID. To może być błąd aplikacji. Możesz to zgłosić. + + + + Requested column is a result of SQL expression, instead of a simple column selection. Such columns cannot be edited. + Ta kolumna jest wynikiem wyrażenia SQL, a nie zwykłej selekcji kolumny. Takie kolumny nie mogą być edytowane. + + + + Requested column belongs to restricted SQLite table. Those tables cannot be edited directly. + Ta kolumna należy do systemowej tabeli SQLite. Te tabele nie mogą być edytowane bezpośrednio. + + + + Cannot edit columns that are result of compound %1 statements (one that includes %2, %3 or %4 keywords). + Nie można edytować kolumn, które są wynikiem złożonego zapytania %1 (tego, które zawiera słowo kluczowe %2, %3, lub %4). + + + + Cannot edit results of query other than %1. + Nie można edytować wyników zapytania innego niż %1. + + + + Cannot edit columns that are result of aggregated %1 statements. + Nie można edytować kolumn, które są wynikiem zapytania agregacyjnego %1. + + + + Cannot edit columns that are result of %1 statement. + Nie można edytować kolumn, które są wynikiem zapytania %1. + + + + Cannot edit columns that are result of common table expression statement (%1). + Nie można edytować kolumn, które są wynikiem zapytania ze wspólnym wyrażeniem tabeli (%1). + + + + + + + on conflict: %1 + data view tooltip + w razie konfliktu: %1 + + + + references table %1, column %2 + data view tooltip + odwołuje się do tabeli %1, kolumny %2 + + + + condition: %1 + data view tooltip + warunek: %1 + + + + collation name: %1 + data view tooltip + nazwa zestawienia: %1 + + + + Data grid view + Widok siatki danych + + + + Copy cell(s) contents to clipboard + Skopiuj zawartość komórek do schowka. + + + + Paste cell(s) contents from clipboard + Wklej zawartość komórkek ze schowka. + + + + Set empty value to selected cell(s) + Ustaw pustą wartość dla wybranych komórek + + + + Set NULL value to selected cell(s) + Ustaw wartość NULL dla wybranych komórek + + + + Commit changes to cell(s) contents + Zatwierdź zmiany dla zawartości komórek + + + + Rollback changes to cell(s) contents + Wycofaj zmiany dla zawartości komórek + + + + Delete selected data row + Usuń wybrane wiersze danych + + + + Insert new data row + Wstaw nowy wiersz danych + + + + Open contents of selected cell in a separate editor + Otwórz zawartość wybranej komórki w osobnym edytorze + + + + Total pages available: %1 + Liczba dostępnych stron: %1 + + + + Total rows loaded: %1 + Liczba załadowanych wierszy: %1 + + + + Data view (both grid and form) + Widok danych (zarówno siatki i formularza) + + + + Refresh data + Odśwież dane + + + + Switch to grid view of the data + Przełącz do widoku siatki danych + + + + Switch to form view of the data + Przełącz do widoku formularza danych + + + + Database list + Lista baz + + + + Delete selected item + Usuń zaznaczony element + + + + Clear filter contents + Wyczyść zawartość filtra + + + + Refresh schema + Odśwież schemat + + + + Refresh all schemas + Odśwież wszystkie schematy + + + + Add database + Dodaj bazę danych + + + + Select all items + Zaznacz wszystkie elementy + + + + Copy selected item(s) + Kopiuj zaznaczone elementy + + + + + + Paste from clipboard + Wklej ze schowka + + + + Tables + Tabele + + + + Indexes + Indeksy + + + + Triggers + Wyzwalacze + + + + Views + Widoki + + + + Columns + Kolumny + + + + Data form view + Widok formularza danych + + + + Commit changes for current row + Zatawierdź zmiany dla bieżącego wiersza + + + + Rollback changes for current row + Wycofaj zmiany dla bieżącego wiersza + + + + Go to first row on current page + Przejdź do pierwszego wiersza na bieżącej stronie + + + + Go to next row + Przejdź do następnego wiersza + + + + Go to previous row + Przejdź do poprzedniego wiersza + + + + Go to last row on current page + Przejdź do ostatniego wiersza na bieżącej stronie + + + + Insert new row + Wstaw nowy wiersz + + + + Delete current row + Usuń bieżący wiersz + + + + Main window + Okno główne + + + + Open SQL editor + Otwórz edytor SQL + + + + Previous window + Poprzednie okno + + + + Next window + Następne okno + + + + Hide status area + Ukryj pole statusu + + + + Open configuration dialog + Otwórz okno konfiguracji + + + + Open Debug Console + Otwórz Konsolę Debugowania + + + + Cell text value editor + Edytor tekstowy wartości komórki + + + + + Cut selected text + Wytnij wybrany tekst + + + + + Copy selected text + Skopiuj wybrany tekst + + + + + Delete selected text + Usuń wybrany tekst + + + + + Undo + Cofnij + + + + + Redo + Przywróć + + + + SQL editor input field + Pole wprowadzania edytora SQL + + + + Select whole editor contents + Zaznacz całą zawartość edytora + + + + Save contents into a file + Zapisz zawartość do pliku + + + + Load contents from a file + Wczytaj zawartość z pliku + + + + Find in text + Znajdź w tekście + + + + Find next + Znajdź następny + + + + Find previous + Znajdź poprzedni + + + + Replace in text + Zmień w tekście + + + + Delete current line + Usuń bieżącą linię + + + + Request code assistant + Wywołaj asystenta kodu + + + + Format contents + Formatuj zawartość + + + + Move selected block of text one line down + Przenieś wybrany blok tekstu o jedną linię w dół + + + + Move selected block of text one line up + Przenieś wybrany blok tekstu o jedną linię w górę + + + + Copy selected block of text and paste it a line below + Skopiuj wybrany blok tekstu i wklej go poniżej + + + + Copy selected block of text and paste it a line above + Skopiuj wybrany blok tekstu i wklej go powyżej + + + + All SQLite databases + Wszystkie bazy danych SQLite + + + + All files + Wszystkie pliki + + + + Database file + Plik bazy danych + + + + Reports history window + Okno history zgłoszeń + + + + Delete selected entry + Usuń wybraną pozycję + + + + SQL editor window + Okno edytora SQL + + + + Execute query + Wykonaj zapytanie + + + + Execute "%1" query + Wykonaj zapytanie "%1" + + + + Switch current working database to previous on the list + Zmień roboczą bazę danych na poprzednią z listy + + + + Switch current working database to next on the list + Zmień roboczą bazę danych na następną z listy + + + + Go to next editor tab + Przejdź do następnej karty edytora + + + + Go to previous editor tab + Przejdź do poprzedniej karty edytora + + + + Move keyboard input focus to the results view below + Przenieś aktywność klawiatury do widoku wyników poniżej + + + + Move keyboard input focus to the SQL editor above + Przenieś aktywność klawiatury do edytora SQL powyżej + + + + Table window + Okno tabeli + + + + Refresh table structure + Odśwież strukturę tabeli + + + + Add new column + Dodaj nową kolumnę + + + + Edit selected column + Edytuj wybraną kolumnę + + + + Delete selected column + Usuń wybraną kolumnę + + + + Export table data + Eksportuj dane tabeli + + + + Import data to the table + Importuj dane do tabeli + + + + Add new table constraint + Dodaj nowe ograniczenie tabeli + + + + Edit selected table constraint + Edytuj wybrane ograniczenie tabeli + + + + Delete selected table constraint + Usuń wybrane ograniczenie tabeli + + + + Refresh table index list + Odśwież listę indeksów tabeli + + + + Add new index + Dodaj nowy indeks + + + + Edit selected index + Edytuj wybrany indeks + + + + Delete selected index + Usuń wybrany indeks + + + + Refresh table trigger list + Odśwież listę wyzwalaczy tabeli + + + + + Add new trigger + Dodaj nowy wyzwalacz + + + + + Edit selected trigger + Edytuj wybrany wyzwalacz + + + + + Delete selected trigger + Usuń wybrany wyzwalacz + + + + + Go to next tab + Przejdź do następnej karty + + + + + Go to previous tab + Przejdź do poprzedniej karty + + + + A view window + Okno widoku + + + + Refresh view trigger list + Odśwież listę wizwalaczy widoku + + + + QuitConfirmDialog + + + Uncommited changes + Niezatwierdzone dane + + + + Are you sure you want to quit the application? + +Following items are pending: + Czy na pewno chcesz zamknąć aplikację? + +Następujące elementy są w toku: + + + + SearchTextDialog + + + Find or replace + Znajdź lub zastąp + + + + Find: + Znajdź: + + + + Case sensitive + Uwzględniaj wielkość liter + + + + Search backwards + Szukaj wstecz + + + + Regular expression matching + Dopasowywanie wyrażeniem regularnym + + + + Replace && +find next + Zastąp i +znajdź następny + + + + Replace with: + Zastąp: + + + + Replace all + Zastąp wszystkie + + + + Find + Znajdź + + + + SortDialog + + + Sort by columns + Sortuj wg. kolumn + + + + + Column + Kolumna + + + + + Order + Kierunek + + + + Sort by: %1 + Sortuj po: %1 + + + + Move column up + Przesuń kolumnę w górę + + + + Move column down + Przesuń kolumnę w dół + + + + SqlEditor + + + Cut + sql editor + Wytnij + + + + Copy + sql editor + Kopiuj + + + + Paste + sql editor + Wklej + + + + Delete + sql editor + Usuń + + + + Select all + sql editor + Zaznacz wszystko + + + + Undo + sql editor + Cofnij + + + + Redo + sql editor + Przywróć + + + + Complete + sql editor + Dopełnij + + + + Format SQL + sql editor + Formatuj SQL + + + + Save SQL to file + sql editor + Zapisz SQL do pliku + + + + Load SQL from file + sql editor + Wczytaj SQL z pliku + + + + Delete line + sql editor + Usuń linię + + + + Move block down + sql editor + Przesuń blok w dół + + + + Move block up + sql editor + Przesuń blok w górę + + + + Copy block down + sql editor + Skopiuj blok w dół + + + + Copy up down + sql editor + Skopiuj blok w górę + + + + Find + sql editor + Znajdź + + + + Find next + sql editor + Znajdź następny + + + + Find previous + sql editor + Znajdź poprzedni + + + + Replace + sql editor + Zastąp + + + + Syntax completion can be used only when a valid database is set for the SQL editor. + Dopełnianie składni może być użyte tylko wtedy, gdy poprawna baza danych jest ustawiona w edytorze SQL. + + + + Contents of the SQL editor are huge, so errors detecting and existing objects highlighting are temporarily disabled. + Zawartość edytora SQL jest ogromna, więc sprawdzanie błędów i podświetlanie istniejących obiektów zostało tymczasowo wyłączone. + + + + Save to file + Zapisz do pliku + + + + Could not open file '%1' for writing: %2 + Nie udało się otworzyć pliku '%1' do zapisu: %2 + + + + SQL scripts (*.sql);;All files (*) + Skrypty SQL (*.sql);;Wszystkie pliki (*) + + + + Open file + Otwórz plik + + + + Could not open file '%1' for reading: %2 + Nie udało się otworzyć pliku '%1' do odczytu: %2 + + + + Reached the end of document. Hit the find again to restart the search. + Osiągnięto koniec dokumentu. Wciśnij szukanie ponownie, aby zrestartować szukanie. + + + + SqlQueryItem + + + Column: + data view tooltip + Kolumna: + + + + Data type: + data view + Typ danych: + + + + Table: + data view tooltip + Tabela: + + + + Constraints: + data view tooltip + Ograniczenie: + + + + This cell is not editable, because: %1 + Tej komórki nie można edytować, ponieważ: %1 + + + + Cannot load the data for a cell that refers to the already closed database. + Nie można załadować danych dla komórki, która odwołuje się do zamkniętej już bazy danych. + + + + SqlQueryItemDelegate + + + + Cannot edit this cell. Details: %2 + Nie można edytować tej komórki. Szczegóły: %2 + + + + The row is marked for deletion. + Wiersz jest zaznaczony do usunięcia. + + + + SqlQueryModel + + + + Only one query can be executed simultaneously. + Tylko jedno zapytanie może być wykonywane w danym momencie. + + + + Uncommited data + Niezatwierdzone dane + + + + There are uncommited data changes. Do you want to proceed anyway? All uncommited changes will be lost. + Niektóre zmiany w danych nie zostały zatwierdzone. Czy na pewno chcesz kontynuować? Wszystkie niezatwierdzone zmiany zostaną utracone. + + + + Cannot commit the data for a cell that refers to the already closed database. + Nie można zatwierdzić danych dla komórki, która odnosi się do zamkniętej już bazy danych. + + + + Could not begin transaction on the database. Details: %1 + Nie udało się rozpocząć transakcji na bazie danych. Szczegóły: %1 + + + + An error occurred while commiting the transaction: %1 + Wystąpił błąd podczas zatwierdzania transakcji: %1 + + + + An error occurred while rolling back the transaction: %1 + Wystąpił błąd podczas wycofywania transakcji: %1 + + + + Tried to commit a cell which is not editable (yet modified and waiting for commit)! This is a bug. Please report it. + Próbowano zatwierdzić komórkę, której nie można edytować (a mimo to została zmodyfikowana i czeka na zatwierdzenie)! To jest błąd. Proszę to zgłosić. + + + + An error occurred while commiting the data: %1 + Wystąpił błąd podczas zatwierdzania danych: %1 + + + + + Error while executing SQL query on database '%1': %2 + Błąd podczas wykonywania zapytania SQL na bazie '%1': %2 + + + Error while executing SQL query: %1 + Błąd podczas wykonywania zapytania SQL: %1 + + + + Error while loading query results: %1 + Błąd podczas wczytywania wyników zapytania: %1 + + + + Insert multiple rows + Wstaw wiele wierszy + + + + Number of rows to insert: + Liczba wierszy do wstawienia: + + + + SqlQueryView + + + Copy + Kopiuj + + + + Copy as... + Kopiuj jako... + + + + Paste + Wklej + + + + Paste as... + Wklej jako... + + + + Set NULL values + Ustaw wartości NULL + + + + Erase values + Wymaż wartości + + + + Edit value in editor + Edytuj wartość w edytorze + + + + Commit + Zatwierdź + + + + Rollback + Wycofaj + + + + Commit selected cells + Zatwierdź zaznaczone komórki + + + + Rollback selected cells + Wycofaj zaznaczone komórki + + + + Define columns to sort by + Zdefiniuj kolumny po których sortować + + + + Remove custom sorting + Wycofaj własne sortowanie + + + + Insert row + Wstaw wiersz + + + + Insert multiple rows + Wstaw wiele wierszy + + + + Delete selected row + Usuń zaznaczony wiersz + + + + Edit value + Edytuj wartość + + + + SqlTableModel + + + Error while commiting new row: %1 + Błąd podczas zatwierdzania nowego wiersza: %1 + + + + Error while deleting row from table %1: %2 + Błąd podczas usuwania wiersza z tabeli %1: %2 + + + + StatusField + + + Status + Status + + + + Copy + Kopiuj + + + + Clear + Wyczyść + + + + TableConstraintsModel + + + Type + table constraints + Typ + + + + Details + table constraints + Szczegóły + + + + Name + table constraints + Nazwa + + + + TableForeignKeyPanel + + + Foreign table: + Tabela obca: + + + + SQLite 2 does not support foreign keys officially, +but it's okay to use them anyway. + SQLite 2 oficjalnie nie obsługuje kluczy obcych, +ale można ich używać. + + + + Columns + Kolumny + + + + Local column + Kolumna lokalna + + + + Foreign column + Kolumna obca + + + + Reactions + Reakcje + + + + Deferred foreign key + Klucz obcy odroczony + + + + Named constraint + Nazwane ograniczenie + + + + Constraint name + Nazwa ograniczenia + + + + Pick the foreign column. + Wybierz kolumnę obcą + + + + Pick the foreign table. + Wybierz tabelę obcą + + + + Select at least one foreign column. + Wybierz przynajmnie jedną kolumnę obcą. + + + + Enter a name of the constraint. + Wprowadź nazwę ograniczenia. + + + + Foreign column + table constraints + Kolumna obca + + + + TablePrimaryKeyAndUniquePanel + + + Columns + Kolumny + + + + Column + Kolumna + + + + Collation + Zestawienie + + + + Sort + Sortowanie + + + + Valid only for a single column with INTEGER data type + Dozwolone tylko dla jednej kolumny o typie danych INTEGER + + + + Autoincrement + Autoinkrementacja + + + + Named constraint + Nazwane ograniczenie + + + + Constraint name + Nazwa ograniczenia + + + + On conflict + W razie konfliktu + + + + Collate + table constraints + Zestawienie + + + + Sort order + table constraints + Kierunek sortowania + + + + Select at least one column. + Zaznacz przynajmniej jedną kolumnę. + + + + Enter a name of the constraint. + Wprowadź nazwę ograniczenia. + + + + TableStructureModel + + + Name + table structure columns + Nazwa + + + + Data type + table structure columns + Typ danych + + + + Default value + table structure columns + Domyślna wartość + + + + TableWindow + + + Structure + Struktura + + + + Table name: + Nazwa tabeli: + + + + Data + Dane + + + + Constraints + Ograniczenia + + + + Indexes + Indeksy + + + + Triggers + Wyzwalacze + + + + DDL + DDL + + + + Export table + table window + Eksportuj tabelę + + + + Import data to table + table window + Importuj do tabeli + + + + Populate table + table window + Zaludnij tabelę + + + + Refresh structure + table window + Odśwież strukturę + + + + Commit structure changes + table window + Zatwierdź zmiany w strukturze + + + + Rollback structure changes + table window + Wycofaj zmiany w strukturze + + + + Add column + table window + Dodaj kolumnę + + + + Edit column + table window + Edytuj kolumnę + + + + + Delete column + table window + Usuń kolumnę + + + + Move column up + table window + Przesuń kolumnę w górę + + + + Move column down + table window + Przesuń kolumnę w dół + + + + Create similar table + table window + Utwórz podobną tabelę + + + + Reset autoincrement value + table window + Wyzeruj wartość autoinkrementacji + + + + Add table constraint + table window + Dodaj ograniczenie tabeli + + + + Edit table constraint + table window + Edytuj ograniczenie tabeli + + + + Delete table constraint + table window + Usuń ograniczenie tabeli + + + + Move table constraint up + table window + Przesuń ograniczenie tabeli w górę + + + + Move table constraint down + table window + Przesuń ograniczenie tabeli w dół + + + + Add table primary key + table window + Dodaj klucz główny tabeli + + + + Add table foreign key + table window + Dodaj klucz obcy tabeli + + + + Add table unique constraint + table window + Dodaj ograniczenie unikalnych wartości tabeli + + + + Add table check constraint + table window + Dodaj ograniczenie warunkiem tabeli + + + + Refresh index list + table window + Odśwież listę indeksów + + + + Create index + table window + Utwórz indeks + + + + Edit index + table window + Edytuj indeks + + + + Delete index + table window + Usuń indeks + + + + Refresh trigger list + table window + Odśwież listę wyzwalaczy + + + + Create trigger + table window + Utwórz wyzwalacz + + + + Edit trigger + table window + Edytuj wyzwalacz + + + + Delete trigger + table window + Usuń wyzwalacz + + + + Are you sure you want to delete column '%1'? + table window + Czy na pewno chcesz usunąć kolumnę '%1'? + + + + Following problems will take place while modifying the table. +Would you like to proceed? + table window + Następujące problemy wystąpią podczas modyfikacji tabeli. +Czy chcesz kontynuować? + + + + Table modification + table window + Modyfikacja tabeli + + + + Could not load data for table %1. Error details: %2 + Nie udało się załadować danych dla tabeli %1. Szczegóły błędu: %2 + + + + Could not process the %1 table correctly. Unable to open a table window. + Nie udało się przetworzyć poprawnie tabeli %1. Nie można otworzyć okna tabeli. + + + + Could not restore window, because database %1 could not be resolved. + Nie można przywrócić okna, ponieważ nie znaleziono bazy danych %1. + + + + Could not restore window, because the table %1 doesn't exist in the database %2. + Nie można przywrócić okna, ponieważ tabela %1 już nie jestnieje w bazie danych %2. + + + + + New table %1 + Nowa tabela %1 + + + + Could not commit table structure. Error message: %1 + table window + Nie udało się zatwierdzić struktury tabeli. Treść błędu: %1 + + + + Reset autoincrement + Wyzeruj autoinkrementację + + + + Are you sure you want to reset autoincrement value for table '%1'? + Czy na pewno chcesz wyzerować wartość autoinkrementacji dla tabeli '%1'? + + + + An error occurred while trying to reset autoincrement value for table '%1': %2 + Wystąpił błąd podczas próby wyzerowania wartości autoinkrementacji dla tabeli '%1': %2 + + + + Autoincrement value for table '%1' has been reset successfly. + Wartość autoinkrementacji dla tabeli '%1' została pomyślnie wyzerowana. + + + + Empty name + Pusta nazwa + + + + A blank name for the table is allowed in SQLite, but it is not recommended. +Are you sure you want to create a table with blank name? + Pusta nazwa dla tabeli jest dozwolona w SQLite, ale nie jest zalecana. +Czy na pewno chcesz utworzyć tabelę o pustej nazwie? + + + + Cannot create a table without at least one column. + Nie można utworzyć tabeli bez przynajmniej jednej kolumny. + + + + Cannot create table %1, if it has no primary key defined. Either uncheck the %2, or define a primary key. + Nie można utworzyć tabeli %1, jeśli nie ma zdefiniowanego klucza głównego. Albo udznacz %2, albo zdefiniuj klucz główny. + + + + Cannot use autoincrement for primary key when %1 clause is used. Either uncheck the %2, or the autoincrement in a primary key. + Nie można użyć autoinkrementacji dla klucza głównego, kiedy klauzula %1 jest użyta. Albo odnacz %2, albo autonkrementację w kluczu głównym. + + + + Are you sure you want to delete table constraint '%1'? + table window + Czy na pewno chcesz usunąć ograniczenie tabeli '%1'? + + + + Delete constraint + table window + Usuń ograniczenie + + + + Cannot export, because no export plugin is loaded. + Nie można wyeksportować, ponieważ żadna wtyczka eksportu nie została załadowana. + + + + Cannot import, because no import plugin is loaded. + Nie można zaimportować, ponieważ żadna wtyczka importu nie została załadowana. + + + + Uncommited changes + Niezatwierdzone dane + + + + There are uncommited structure modifications. You cannot browse or edit data until you have table structure settled. +Do you want to commit the structure, or do you want to go back to the structure tab? + Zmiany w strukturze nie zostały zatwierdzone. Nie można przeglądać, ani edytować danych, dopóki struktura tabeli nie zostanie ustalona. +Czy chcesz zatwierdzić strukturę, czy jednak chcesz wrócić do karty struktury? + + + + Go back to structure tab + Wróć do karty struktury + + + + Commit modifications and browse data. + Zatwierdź modyfikacje i przeglądaj dane. + + + + Name + table window indexes + Nazwa + + + + Unique + table window indexes + Wartości unikalne + + + + Columns + table window indexes + Kolumny + + + + Partial index condition + table window indexes + Warunek indeksu częściowego: + + + + Name + table window triggers + Nazwa + + + + Event + table window triggers + Zdarzenie + + + + Condition + table window triggers + Warunek + + + + Details + table window triggers + Szczegóły + + + + Table window "%1" has uncommited structure modifications and data. + Okno tabeli "%1" ma niezatwierdzone modyfikacje struktury i danych. + + + + Table window "%1" has uncommited data. + Okno tabeli "%1" ma niezatwierdzone dane. + + + + Table window "%1" has uncommited structure modifications. + Okno tabeli "%1" ma niezatwierdzone modyfikacje struktury. + + + + TriggerColumnsDialog + + + Trigger columns + Kolumny wyzwalacza + + + + Triggering columns: + Kolumny wyzwalające: + + + + TriggerDialog + + + + Trigger + Wyzwalacz + + + + On table: + Na tabeli: + + + + Action: + Akcja: + + + + + <p>SQL condition that will be evaluated before the actual trigger code. In case the condition returns false, the trigger will not be fired for that row.</p> + <p>Warunek SQL, który będzie wykonany przed właściwym kodem wyzwalacza. W przypadku gdy warunek zwróci fałsz, wyzwalacz nie zostanie uruchomiony dla tego wiersza.</p> + + + + Pre-condition: + Warunek wstępny: + + + + The scope is still not fully supported by the SQLite database. + Zakres wciąż nie jest w pełni obsługiwany przez bazy danych SQLite. + + + + Trigger name: + Nazwa wyzwalacza: + + + + When: + Kiedy: + + + + List of columns for UPDATE OF action. + Lista kolumn dla akcji UPDATE OF. + + + + Scope: + Zakres: + + + + Code: + Kod: + + + + Trigger statements to be executed. + Zapytania wyzwalacz do wykonania. + + + + DDL + DDL + + + + On view: + Na widoku: + + + + Could not process trigger %1 correctly. Unable to open a trigger dialog. + Nie udało się przetworzyć poprawnie wyzwalacza %1. Nie można otworzyć okna wyzwalacza. + + + + Enter a valid condition. + Wprowadź poprawny warunek. + + + + Enter a valid trigger code. + Wprowadź poprawny kod wyzwalacza. + + + + Error + trigger dialog + Błąd + + + + An error occurred while executing SQL statements: +%1 + Wystąpił błąd podczas wykonywania zapytań SQL: +%1 + + + + VersionConvertSummaryDialog + + + Database version convert + Konwersja bazy danych + + + + Following changes to the SQL statements will be made: + Dokonane będą następujące zmiany w zapytaniach SQL: + + + + Before + Przed + + + + After + Po + + + + ViewWindow + + + Query + Zapytanie + + + + View name: + Nazwa widoku: + + + + Data + Dane + + + + Triggers + Wyzwalacze + + + + DDL + DDL + + + + Could not restore window, because database %1 could not be resolved. + Nie można przywrócić okna, ponieważ nie znaleziono bazy danych %1. + + + + Could not restore window, because database %1 could not be open. + Nie można przywrócić okna, ponieważ nie udało się otworzyć bazy danych %1. + + + + Could not restore window, because the view %1 doesn't exist in the database %2. + Nie można przywrócić okna, ponieważ widok %1 już nie jestnieje w bazie danych %2. + + + + + New view %1 + Nowy widok %1 + + + + Refresh the view + view window + Odśwież widok + + + + Commit the view changes + view window + Zatwierdź zmiany w widoku + + + + Rollback the view changes + view window + Wycofaj zmiany w widoku + + + + Refresh trigger list + view window + Odśwież listę wyzwalaczy + + + + Create new trigger + view window + Utwórz nowy wyzwalacz + + + + Edit selected trigger + view window + Edytuj wybrany wyzwalacz + + + + Delete selected trigger + view window + Usuń wybrany wyzwalacz + + + + View window "%1" has uncommited structure modifications and data. + Okno widoku "%1" ma niezatwierdzone modyfikacje struktury i danych. + + + + View window "%1" has uncommited data. + Okno widoku "%1" ma niezatwierdzone dane. + + + + View window "%1" has uncommited structure modifications. + Okno widoku "%1" ma niezatwierdzone modyfikacje struktury. + + + + Could not load data for view %1. Error details: %2 + Nie udało się załadować danych dla widoku %1. Szczegóły błędu: %2 + + + + Uncommited changes + Niezatwierdzone dane + + + + There are uncommited structure modifications. You cannot browse or edit data until you have the view structure settled. +Do you want to commit the structure, or do you want to go back to the structure tab? + Zmiany w strukturze nie zostały zatwierdzone. Nie można przeglądać, ani edytować danych, dopóki struktura widoku nie zostanie ustalona. +Czy chcesz zatwierdzić strukturę, czy jednak chcesz wrócić do karty struktury? + + + + Go back to structure tab + Wróć do karty struktury + + + + Commit modifications and browse data. + Zatwierdź modyfikacje i przeglądaj dane. + + + + Could not commit view changes. Error message: %1 + view window + Nie udało się zatwierdzić widoku. Treść błędu: %1 + + + + Name + view window triggers + Nazwa + + + + Instead of + view window triggers + Zamiast + + + + Condition + view window triggers + Warunek + + + + Details + table window triggers + Szczegóły + + + + Could not process the %1 view correctly. Unable to open a view window. + Nie udało się przetworzyć poprawnie widoku %1. Nie można otworzyć okna widoku. + + + + Empty name + Pusta nazwa + + + + A blank name for the view is allowed in SQLite, but it is not recommended. +Are you sure you want to create a view with blank name? + Pusta nazwa dla widoku jest dozwolona w SQLite, ale nie jest zalecana. +Czy na pewno chcesz utworzyć widok o pustej nazwie? + + + + The SELECT statement could not be parsed. Please correct the query and retry. +Details: %1 + Zapytanie SELECT nie mogło być poprawnie przeanalizowane. Proszę poprawić zapytanie i spróbować ponownie. +Szczegóły: %1 + + + + The view could not be modified due to internal SQLiteStudio error. Please report this! + Widok nie mógł być zmodyfikowany w związku z wewnętrznym błędem SQLiteStudio. Proszę to zgłosić! + + + + The view code could not be parsed properly for execution. This is a SQLiteStudio's bug. Please report it. + Kod widok nie mógł być poprawnie przeanalizowany. To jest błąd SQLiteStudio Proszę to zgłosić! + + + + Following problems will take place while modifying the view. +Would you like to proceed? + view window + Następujące problemy wystąpią podczas modyfikacji widoku. +Czy chcesz kontynuować? + + + + View modification + view window + Modyfikacja widoku + + + + WidgetCover + + + Interrupt + Przerwij + + + diff --git a/SQLiteStudio3/guiSQLiteStudio/uiconfig.h b/SQLiteStudio3/guiSQLiteStudio/uiconfig.h index 608ce47..e6cfea2 100644 --- a/SQLiteStudio3/guiSQLiteStudio/uiconfig.h +++ b/SQLiteStudio3/guiSQLiteStudio/uiconfig.h @@ -80,6 +80,7 @@ CFG_CATEGORIES(Ui, CFG_ENTRY(Cfg::DataEditorsOrder, DataEditorsOrder, Cfg::DataEditorsOrder()) CFG_ENTRY(QString, FileDialogLastPath, QString()) CFG_ENTRY(int, MaxInitialColumnWith, 600) + CFG_ENTRY(bool, LanguageAsked, false) ) ) diff --git a/SQLiteStudio3/guiSQLiteStudio/windows/bugreporthistorywindow.ui b/SQLiteStudio3/guiSQLiteStudio/windows/bugreporthistorywindow.ui index 3218822..2211ec2 100644 --- a/SQLiteStudio3/guiSQLiteStudio/windows/bugreporthistorywindow.ui +++ b/SQLiteStudio3/guiSQLiteStudio/windows/bugreporthistorywindow.ui @@ -11,7 +11,7 @@ - Form + Form diff --git a/SQLiteStudio3/guiSQLiteStudio/windows/collationseditor.ui b/SQLiteStudio3/guiSQLiteStudio/windows/collationseditor.ui index 635ae59..98e7ddb 100644 --- a/SQLiteStudio3/guiSQLiteStudio/windows/collationseditor.ui +++ b/SQLiteStudio3/guiSQLiteStudio/windows/collationseditor.ui @@ -11,7 +11,7 @@ - Form + Form diff --git a/SQLiteStudio3/guiSQLiteStudio/windows/ddlhistorywindow.ui b/SQLiteStudio3/guiSQLiteStudio/windows/ddlhistorywindow.ui index 6591198..33cdb66 100644 --- a/SQLiteStudio3/guiSQLiteStudio/windows/ddlhistorywindow.ui +++ b/SQLiteStudio3/guiSQLiteStudio/windows/ddlhistorywindow.ui @@ -11,7 +11,7 @@ - Form + Form diff --git a/SQLiteStudio3/guiSQLiteStudio/windows/editorwindow.cpp b/SQLiteStudio3/guiSQLiteStudio/windows/editorwindow.cpp index 7856a5e..590a2fd 100644 --- a/SQLiteStudio3/guiSQLiteStudio/windows/editorwindow.cpp +++ b/SQLiteStudio3/guiSQLiteStudio/windows/editorwindow.cpp @@ -17,13 +17,13 @@ #include "parser/lexer.h" #include "common/utils_sql.h" #include "parser/parser.h" +#include "dbobjectdialogs.h" +#include "dialogs/exportdialog.h" #include #include #include #include #include -#include -#include CFG_KEYS_DEFINE(EditorWindow) EditorWindow::ResultsDisplayMode EditorWindow::resultsDisplayMode; @@ -94,6 +94,10 @@ void EditorWindow::init() initActions(); updateShortcutTips(); + Db* treeSelectedDb = DBTREE->getSelectedOpenDb(); + if (treeSelectedDb) + dbCombo->setCurrentIndex(dbComboModel->getIndexForDb(treeSelectedDb)); + Db* currentDb = getCurrentDb(); resultsModel->setDb(currentDb); ui->sqlEdit->setDb(currentDb); @@ -484,7 +488,16 @@ void EditorWindow::executionSuccessful() { double secs = ((double)resultsModel->getExecutionTime()) / 1000; QString time = QString::number(secs, 'f', 3); - notifyInfo(tr("Query finished in %2 second(s).").arg(time)); + + if (resultsModel->wasDataModifyingQuery()) + { + QString rowsAffected = QString::number(resultsModel->getTotalRowsAffected()); + notifyInfo(tr("Query finished in %1 second(s). Rows affected: %2").arg(time, rowsAffected)); + } + else + { + notifyInfo(tr("Query finished in %1 second(s).").arg(time)); + } lastQueryHistoryId = CFG->addSqlHistory(resultsModel->getQuery(), resultsModel->getDb()->getName(), resultsModel->getExecutionTime(), 0); diff --git a/SQLiteStudio3/guiSQLiteStudio/windows/editorwindow.h b/SQLiteStudio3/guiSQLiteStudio/windows/editorwindow.h index 0052a74..4666386 100644 --- a/SQLiteStudio3/guiSQLiteStudio/windows/editorwindow.h +++ b/SQLiteStudio3/guiSQLiteStudio/windows/editorwindow.h @@ -25,7 +25,7 @@ class SqlEditor; CFG_KEY_LIST(EditorWindow, QObject::tr("SQL editor window"), CFG_KEY_ENTRY(EXEC_QUERY, Qt::Key_F9, QObject::tr("Execute query")) - CFG_KEY_ENTRY(EXPLAIN_QUERY, Qt::Key_F8, QObject::tr("Execute \"EXPLAIN\" query")) + CFG_KEY_ENTRY(EXPLAIN_QUERY, Qt::Key_F8, QObject::tr("Execute \"%1\" query").arg("EXPLAIN")) CFG_KEY_ENTRY(PREV_DB, Qt::CTRL + Qt::Key_Up, QObject::tr("Switch current working database to previous on the list")) CFG_KEY_ENTRY(NEXT_DB, Qt::CTRL + Qt::Key_Down, QObject::tr("Switch current working database to next on the list")) CFG_KEY_ENTRY(SHOW_NEXT_TAB, Qt::ALT + Qt::Key_Right, QObject::tr("Go to next editor tab")) diff --git a/SQLiteStudio3/guiSQLiteStudio/windows/editorwindow.ui b/SQLiteStudio3/guiSQLiteStudio/windows/editorwindow.ui index b0d598b..51d5503 100644 --- a/SQLiteStudio3/guiSQLiteStudio/windows/editorwindow.ui +++ b/SQLiteStudio3/guiSQLiteStudio/windows/editorwindow.ui @@ -11,10 +11,19 @@ - SQL editor + SQL editor - + + 0 + + + 0 + + + 0 + + 0 @@ -42,7 +51,16 @@ - + + 0 + + + 0 + + + 0 + + 0 @@ -59,7 +77,16 @@ - + + 0 + + + 0 + + + 0 + + 0 @@ -115,6 +142,11 @@ + + SqlView + QPlainTextEdit +
sqlview.h
+
DataView QTabWidget @@ -126,11 +158,6 @@ QPlainTextEdit
sqleditor.h
- - SqlView - QPlainTextEdit -
sqlview.h
-
diff --git a/SQLiteStudio3/guiSQLiteStudio/windows/functionseditor.ui b/SQLiteStudio3/guiSQLiteStudio/windows/functionseditor.ui index d5d5015..45d291d 100644 --- a/SQLiteStudio3/guiSQLiteStudio/windows/functionseditor.ui +++ b/SQLiteStudio3/guiSQLiteStudio/windows/functionseditor.ui @@ -11,7 +11,7 @@ - Form + Form diff --git a/SQLiteStudio3/guiSQLiteStudio/windows/tablewindow.cpp b/SQLiteStudio3/guiSQLiteStudio/windows/tablewindow.cpp index 56accd0..1b47433 100644 --- a/SQLiteStudio3/guiSQLiteStudio/windows/tablewindow.cpp +++ b/SQLiteStudio3/guiSQLiteStudio/windows/tablewindow.cpp @@ -208,6 +208,7 @@ void TableWindow::createStructureActions() ui->structureToolBar->addAction(actionMap[POPULATE]); ui->structureToolBar->addSeparator(); createAction(CREATE_SIMILAR, ICONS.TABLE_CREATE_SIMILAR, tr("Create similar table", "table window"), this, SLOT(createSimilarTable()), ui->structureToolBar); + createAction(RESET_AUTOINCREMENT, ICONS.RESET_AUTOINCREMENT, tr("Reset autoincrement value", "table window"), this, SLOT(resetAutoincrement()), ui->structureToolBar); // Table constraints createAction(ADD_TABLE_CONSTRAINT, ICONS.TABLE_CONSTRAINT_ADD, tr("Add table constraint", "table window"), this, SLOT(addConstraint()), ui->tableConstraintsToolbar, ui->tableConstraintsView); @@ -834,6 +835,24 @@ void TableWindow::rollbackStructure() updateStructureCommitState(); updateStructureToolbarState(); updateTableConstraintsToolbarState(); + updateDdlTab(); +} + +void TableWindow::resetAutoincrement() +{ + if (!existingTable) + return; + + QMessageBox::StandardButton btn = QMessageBox::question(this, tr("Reset autoincrement"), tr("Are you sure you want to reset autoincrement value for table '%1'?") + .arg(table)); + if (btn != QMessageBox::Yes) + return; + + SqlQueryPtr res = db->exec("DELETE FROM sqlite_sequence WHERE name = ?;", {table}); + if (res->isError()) + notifyError(tr("An error occurred while trying to reset autoincrement value for table '%1': %2").arg(table, res->getErrorText())); + else + notifyInfo(tr("Autoincrement value for table '%1' has been reset successfly.").arg(table)); } void TableWindow::addColumn() @@ -947,15 +966,15 @@ bool TableWindow::validate(bool skipWarning) if (!hasPk) { - notifyError(tr("Cannot create table without ROWID, if it has no PRIMARY KEY defined." - " Either uncheck the WITHOUT ROWID, or define a PRIMARY KEY.")); + notifyError(tr("Cannot create table %1, if it has no primary key defined." + " Either uncheck the %2, or define a primary key.").arg("WITHOUT ROWID", "WITHOUT ROWID")); return false; } if (isPkAutoIncr) { - notifyError(tr("Cannot use AUTOINCREMENT for PRIMARY KEY when WITHOUT ROWID clause is used." - " Either uncheck the WITHOUT ROWID, or the AUTOINCREMENT in a PRIMARY KEY.")); + notifyError(tr("Cannot use autoincrement for primary key when %1 clause is used." + " Either uncheck the %2, or the autoincrement in a primary key.").arg("WITHOUT ROWID", "WITHOUT ROWID")); return false; } } @@ -1023,9 +1042,12 @@ void TableWindow::applyInitialTab() void TableWindow::updateDdlTab() { - CodeFormatter* formatter = SQLITESTUDIO->getCodeFormatter(); createTable->rebuildTokens(); - ui->ddlEdit->setPlainText(formatter->format("sql", createTable->detokenize(), db)); + QString ddl = createTable->detokenize(); + if (createTable->columns.size() > 0) + ddl = SQLITESTUDIO->getCodeFormatter()->format("sql", ddl, db); + + ui->ddlEdit->setPlainText(ddl); } void TableWindow::updateNewTableState() @@ -1037,6 +1059,7 @@ void TableWindow::updateNewTableState() actionMap[IMPORT]->setEnabled(existingTable); actionMap[POPULATE]->setEnabled(existingTable); actionMap[CREATE_SIMILAR]->setEnabled(existingTable); + actionMap[RESET_AUTOINCREMENT]->setEnabled(existingTable); actionMap[REFRESH_STRUCTURE]->setEnabled(existingTable); } diff --git a/SQLiteStudio3/guiSQLiteStudio/windows/tablewindow.h b/SQLiteStudio3/guiSQLiteStudio/windows/tablewindow.h index b0ee1e3..54d544f 100644 --- a/SQLiteStudio3/guiSQLiteStudio/windows/tablewindow.h +++ b/SQLiteStudio3/guiSQLiteStudio/windows/tablewindow.h @@ -79,6 +79,7 @@ class GUI_API_EXPORT TableWindow : public MdiChild IMPORT, POPULATE, CREATE_SIMILAR, + RESET_AUTOINCREMENT, // Indexes tab REFRESH_INDEXES, ADD_INDEX, @@ -189,6 +190,7 @@ class GUI_API_EXPORT TableWindow : public MdiChild void changesSuccessfullyCommited(); void changesFailedToCommit(int errorCode, const QString& errorText); void rollbackStructure(); + void resetAutoincrement(); void editColumn(); void delColumn(); void moveColumnUp(); diff --git a/SQLiteStudio3/guiSQLiteStudio/windows/tablewindow.ui b/SQLiteStudio3/guiSQLiteStudio/windows/tablewindow.ui index 8c46443..f1fe409 100644 --- a/SQLiteStudio3/guiSQLiteStudio/windows/tablewindow.ui +++ b/SQLiteStudio3/guiSQLiteStudio/windows/tablewindow.ui @@ -11,7 +11,7 @@ - Form + Form @@ -74,7 +74,7 @@ - WITHOUT ROWID + WITHOUT ROWID diff --git a/SQLiteStudio3/guiSQLiteStudio/windows/viewwindow.cpp b/SQLiteStudio3/guiSQLiteStudio/windows/viewwindow.cpp index a37f387..a699801 100644 --- a/SQLiteStudio3/guiSQLiteStudio/windows/viewwindow.cpp +++ b/SQLiteStudio3/guiSQLiteStudio/windows/viewwindow.cpp @@ -284,9 +284,9 @@ void ViewWindow::createTriggersTabActions() { createAction(REFRESH_TRIGGERS, ICONS.RELOAD, tr("Refresh trigger list", "view window"), this, SLOT(refreshTriggers()), ui->triggersToolbar, ui->triggersList); ui->triggersToolbar->addSeparator(); - createAction(ADD_TRIGGER, ICONS.TRIGGER_ADD, tr("Create new triger", "view window"), this, SLOT(addTrigger()), ui->triggersToolbar, ui->triggersList); - createAction(EDIT_TRIGGER, ICONS.TRIGGER_EDIT, tr("Edit selected triger", "view window"), this, SLOT(editTrigger()), ui->triggersToolbar, ui->triggersList); - createAction(DEL_TRIGGER, ICONS.TRIGGER_DEL, tr("Delete selected triger", "view window"), this, SLOT(deleteTrigger()), ui->triggersToolbar, ui->triggersList); + createAction(ADD_TRIGGER, ICONS.TRIGGER_ADD, tr("Create new trigger", "view window"), this, SLOT(addTrigger()), ui->triggersToolbar, ui->triggersList); + createAction(EDIT_TRIGGER, ICONS.TRIGGER_EDIT, tr("Edit selected trigger", "view window"), this, SLOT(editTrigger()), ui->triggersToolbar, ui->triggersList); + createAction(DEL_TRIGGER, ICONS.TRIGGER_DEL, tr("Delete selected trigger", "view window"), this, SLOT(deleteTrigger()), ui->triggersToolbar, ui->triggersList); } QString ViewWindow::getView() const { diff --git a/SQLiteStudio3/guiSQLiteStudio/windows/viewwindow.ui b/SQLiteStudio3/guiSQLiteStudio/windows/viewwindow.ui index 734a265..94f5ea7 100644 --- a/SQLiteStudio3/guiSQLiteStudio/windows/viewwindow.ui +++ b/SQLiteStudio3/guiSQLiteStudio/windows/viewwindow.ui @@ -11,10 +11,19 @@ - Form + Form - + + 0 + + + 0 + + + 0 + + 0 @@ -33,7 +42,16 @@ - + + 0 + + + 0 + + + 0 + + 0 @@ -115,6 +133,11 @@ + + SqlView + QPlainTextEdit +
sqlview.h
+
DataView QTabWidget @@ -126,11 +149,6 @@ QPlainTextEdit
sqleditor.h
- - SqlView - QPlainTextEdit -
sqlview.h
-
diff --git a/SQLiteStudio3/lang.tcl b/SQLiteStudio3/lang.tcl new file mode 100755 index 0000000..fd6b3d0 --- /dev/null +++ b/SQLiteStudio3/lang.tcl @@ -0,0 +1,114 @@ +#!/usr/bin/env tclsh + +proc usage {} { + puts "$::argv0 (add|remove) " + puts "$::argv0 (update|release)" +} + +lassign $argv op lang + +if {$::tcl_platform(platform) == "windows"} { + set ERR_NULL "2>NUL" +} else { + set ERR_NULL "2>/dev/null" +} + +switch -- $op { + "update" - "release" { + if {$argc != 1} { + usage + exit 1 + } + + set files [list] + foreach p [list coreSQLiteStudio guiSQLiteStudio sqlitestudio sqlitestudiocli] { + lappend files $p/$p.pro + } + + foreach d [glob -directory ../Plugins -tails -nocomplain *] { + if {![file isdirectory ../Plugins/$d]} continue + lappend files ../Plugins/$d/$d.pro + } + + foreach f $files { + catch { + if {$op == "update"} { + exec lupdate $f + } else { + exec lrelease $f $::ERR_NULL + } + } res + if {$op == "release"} { + puts $res + } else { + foreach line [split $res \n] { + if {[string first Q_OBJECT $line] > -1} { + puts $line + } + if {[regexp -- {^.*\w+\.ts.*$} $line]} { + puts -nonewline [lindex [regexp -inline -- {^.*"([\w\/\\\.]+\.ts)".*$} $line] 1] + puts -nonewline ": " + } + if {[regexp -- {^.*\d+[^\d]+\(\d+[^\d]+\d+.*\).*$} $line]} { + puts -nonewline [lindex [regexp -inline -- {\S+.*} $line] 0] + set new [lindex [regexp -inline -- {^.*\d+[^\d]+(\d+)[^\d]+\d+.*$} $line] 1] + if {$new > 0} { + puts -nonewline " <- !!!!!!!!!!!" + } + puts "" + } + } + } + } + } + "add" - "remove" { + if {$argc != 2} { + usage + exit 1 + } + + foreach p [list coreSQLiteStudio guiSQLiteStudio sqlitestudio sqlitestudiocli] { + set fd [open $p/$p.pro r] + set data [read $fd] + close $fd + + set ts "translations/${p}_$lang.ts" + if {$op == "add"} { + set data [string map [list "TRANSLATIONS += " "TRANSLATIONS += $ts \\\n\t\t"] $data] + } else { + regsub -- "$ts\\s*(\\\\)?\n\\s*" $data "" data + } + + set fd [open $p/$p.pro w+] + puts $fd $data + close $fd + + puts "Updated $p.pro" + } + + foreach d [glob -directory ../Plugins -tails -nocomplain *] { + if {![file isdirectory ../Plugins/$d]} continue + + set fd [open ../Plugins/$d/$d.pro r] + set data [read $fd] + close $fd + + set ts "${p}_$lang.ts" + if {$op == "add"} { + set data [string map [list "TRANSLATIONS += " "TRANSLATIONS += $ts \\\n\t\t"] $data] + } else { + regsub -- "$ts\\s*(\\\\)?\n\\s*" $data "" data + } + + set fd [open ../Plugins/$p/$p.pro w+] + puts $fd $data + close $fd + + puts "Updated $d.pro" + } + } + default { + usage + } +} + diff --git a/SQLiteStudio3/sqlitestudio/main.cpp b/SQLiteStudio3/sqlitestudio/main.cpp index b2d7b94..a5f297b 100644 --- a/SQLiteStudio3/sqlitestudio/main.cpp +++ b/SQLiteStudio3/sqlitestudio/main.cpp @@ -22,6 +22,8 @@ #include "coreSQLiteStudio_global.h" #include "log.h" #include "qio.h" +#include "translations.h" +#include "dialogs/languagedialog.h" #include "services/pluginmanager.h" #include #include @@ -46,7 +48,7 @@ QString uiHandleCmdLineArgs() QCommandLineOption lemonDebugOption("debug-lemon", QObject::tr("Enables Lemon parser debug messages for SQL code assistant.")); QCommandLineOption sqlDebugOption("debug-sql", QObject::tr("Enables debugging of every single SQL query being sent to any database.")); QCommandLineOption sqlDebugDbNameOption("debug-sql-db", QObject::tr("Limits SQL query messages to only the given ."), QObject::tr("database")); - QCommandLineOption listPluginsOption("list-plugins", QObject::tr("Lists plugins installed in the SQLiteStudio end exists.")); + QCommandLineOption listPluginsOption("list-plugins", QObject::tr("Lists plugins installed in the SQLiteStudio and quits.")); parser.addOption(debugOption); parser.addOption(debugStdOutOption); parser.addOption(lemonDebugOption); @@ -104,6 +106,7 @@ int main(int argc, char *argv[]) SqlQueryModelColumn::initMeta(); SqlQueryModel::staticInit(); + SQLITESTUDIO->setInitialTranslationFiles({"coreSQLiteStudio", "guiSQLiteStudio", "sqlitestudio"}); SQLITESTUDIO->init(a.arguments(), true); IconManager::getInstance()->init(); DbTree::staticInit(); @@ -130,6 +133,21 @@ int main(int argc, char *argv[]) IconManager::getInstance()->rescanResources(); + if (!CFG_UI.General.LanguageAsked.get()) + { + CFG_UI.General.LanguageAsked.set(true); + QMap langs = getAvailableLanguages(); + + LanguageDialog dialog; + dialog.setLanguages(langs); + dialog.setSelectedLang(CFG_CORE.General.Language.getDefultValue().toString()); + if (dialog.exec() == QDialog::Accepted) + CFG_CORE.General.Language.set(dialog.getSelectedLang()); + + QProcess::startDetached(a.applicationFilePath(), QStringList()); + return 0; + } + MainWindow::getInstance()->restoreSession(); MainWindow::getInstance()->show(); diff --git a/SQLiteStudio3/sqlitestudio/sqlitestudio.pro b/SQLiteStudio3/sqlitestudio/sqlitestudio.pro index 3293122..d1528aa 100644 --- a/SQLiteStudio3/sqlitestudio/sqlitestudio.pro +++ b/SQLiteStudio3/sqlitestudio/sqlitestudio.pro @@ -1,51 +1,56 @@ -#------------------------------------------------- -# -# Project created by QtCreator 2014-09-06T00:39:26 -# -#------------------------------------------------- - -QT += core gui - -greaterThan(QT_MAJOR_VERSION, 4): QT += widgets - -include($$PWD/../dirs.pri) -include($$PWD/../utils.pri) - -OBJECTS_DIR = $$OBJECTS_DIR/sqlitestudio -MOC_DIR = $$MOC_DIR/sqlitestudio -UI_DIR = $$UI_DIR/sqlitestudio - -linux: { - TARGET = sqlitestudio -} -!linux: { - TARGET = SQLiteStudio -} -TEMPLATE = app - -CONFIG += c++11 -QMAKE_CXXFLAGS += -pedantic -linux|portable { - QMAKE_LFLAGS += -Wl,-rpath,./lib -} - -LIBS += -lcoreSQLiteStudio -lguiSQLiteStudio - -SOURCES += main.cpp - -win32: { - RC_FILE = windows.rc -} - -macx: { - ICON = ../guiSQLiteStudio/img/sqlitestudio.icns -} - -OTHER_FILES += \ - windows.rc \ - SQLiteStudio.exe.manifest - -unix: { - target.path = $$BINDIR - INSTALLS += target -} +#------------------------------------------------- +# +# Project created by QtCreator 2014-09-06T00:39:26 +# +#------------------------------------------------- + +QT += core gui + +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +include($$PWD/../dirs.pri) +include($$PWD/../utils.pri) + +OBJECTS_DIR = $$OBJECTS_DIR/sqlitestudio +MOC_DIR = $$MOC_DIR/sqlitestudio +UI_DIR = $$UI_DIR/sqlitestudio + +linux: { + TARGET = sqlitestudio +} +!linux: { + TARGET = SQLiteStudio +} +TEMPLATE = app + +CONFIG += c++11 +QMAKE_CXXFLAGS += -pedantic +linux|portable { + QMAKE_LFLAGS += -Wl,-rpath,./lib +} + +LIBS += -lcoreSQLiteStudio -lguiSQLiteStudio + +SOURCES += main.cpp + +TRANSLATIONS += translations/sqlitestudio_pl.ts + +win32: { + RC_FILE = windows.rc +} + +macx: { + ICON = ../guiSQLiteStudio/img/sqlitestudio.icns +} + +OTHER_FILES += \ + windows.rc \ + SQLiteStudio.exe.manifest + +unix: { + target.path = $$BINDIR + INSTALLS += target +} + +RESOURCES += \ + sqlitestudio.qrc diff --git a/SQLiteStudio3/sqlitestudio/sqlitestudio.qrc b/SQLiteStudio3/sqlitestudio/sqlitestudio.qrc new file mode 100644 index 0000000..5cc74d2 --- /dev/null +++ b/SQLiteStudio3/sqlitestudio/sqlitestudio.qrc @@ -0,0 +1,5 @@ + + + translations/sqlitestudio_pl.qm + + diff --git a/SQLiteStudio3/sqlitestudio/translations/sqlitestudio_pl.qm b/SQLiteStudio3/sqlitestudio/translations/sqlitestudio_pl.qm new file mode 100644 index 0000000..610ec3f Binary files /dev/null and b/SQLiteStudio3/sqlitestudio/translations/sqlitestudio_pl.qm differ diff --git a/SQLiteStudio3/sqlitestudio/translations/sqlitestudio_pl.ts b/SQLiteStudio3/sqlitestudio/translations/sqlitestudio_pl.ts new file mode 100644 index 0000000..cc2f9ca --- /dev/null +++ b/SQLiteStudio3/sqlitestudio/translations/sqlitestudio_pl.ts @@ -0,0 +1,51 @@ + + + + + QObject + + GUI interface to SQLiteStudio, a SQLite manager. + Interfejs graficzny dla SQLiteStudio, menadżera SQLite. + + + Enables debug messages in console (accessible with F12). + Włącza wiadomości debugujące w konsoli (dostępnej przez F12). + + + Redirects debug messages into standard output (forces debug mode). + Przekierowuje wiadomości debugujące na standardowe wyjście (wymusza tryb debugujący). + + + Enables Lemon parser debug messages for SQL code assistant. + Włącza wiadomości debugujące analizatora Lemon dla asystenta kodu SQL. + + + Enables debugging of every single SQL query being sent to any database. + Włacza debugowanie każdego pojedynczego zapytania SQL, wykonywanego na dowolnej bazie danych. + + + Limits SQL query messages to only the given <database>. + Ogranicze wiadomości zapytań SQL do podanej <bazy danych>. + + + database + baza danych + + + file + plik + + + Database file to open + Baza danych do otwarcia + + + Error + Błąd + + + Lists plugins installed in the SQLiteStudio and quits. + Wypisuje listę zainstalowanych w SQLiteStudio wtyczek i wychodzi. + + + diff --git a/SQLiteStudio3/sqlitestudiocli/commands/clicommandadd.h b/SQLiteStudio3/sqlitestudiocli/commands/clicommandadd.h index ae09ee1..313be2d 100644 --- a/SQLiteStudio3/sqlitestudiocli/commands/clicommandadd.h +++ b/SQLiteStudio3/sqlitestudiocli/commands/clicommandadd.h @@ -5,6 +5,8 @@ class CliCommandAdd : public CliCommand { + Q_OBJECT + public: void execute(); QString shortHelp() const; diff --git a/SQLiteStudio3/sqlitestudiocli/commands/clicommandcd.cpp b/SQLiteStudio3/sqlitestudiocli/commands/clicommandcd.cpp index 0ca6cb6..14e91d5 100644 --- a/SQLiteStudio3/sqlitestudiocli/commands/clicommandcd.cpp +++ b/SQLiteStudio3/sqlitestudiocli/commands/clicommandcd.cpp @@ -14,7 +14,7 @@ void CliCommandCd::execute() QString CliCommandCd::shortHelp() const { - return tr("changes current workind directory"); + return tr("changes current working directory"); } QString CliCommandCd::fullHelp() const diff --git a/SQLiteStudio3/sqlitestudiocli/commands/clicommandcd.h b/SQLiteStudio3/sqlitestudiocli/commands/clicommandcd.h index 4cfabc9..44d5e23 100644 --- a/SQLiteStudio3/sqlitestudiocli/commands/clicommandcd.h +++ b/SQLiteStudio3/sqlitestudiocli/commands/clicommandcd.h @@ -5,6 +5,8 @@ class CliCommandCd : public CliCommand { + Q_OBJECT + public: void execute(); QString shortHelp() const; diff --git a/SQLiteStudio3/sqlitestudiocli/commands/clicommandclose.h b/SQLiteStudio3/sqlitestudiocli/commands/clicommandclose.h index 04fbbeb..40dcba6 100644 --- a/SQLiteStudio3/sqlitestudiocli/commands/clicommandclose.h +++ b/SQLiteStudio3/sqlitestudiocli/commands/clicommandclose.h @@ -5,6 +5,8 @@ class CliCommandClose : public CliCommand { + Q_OBJECT + public: void execute(); QString shortHelp() const; diff --git a/SQLiteStudio3/sqlitestudiocli/commands/clicommanddblist.cpp b/SQLiteStudio3/sqlitestudiocli/commands/clicommanddblist.cpp index cbc16b6..35f9c47 100644 --- a/SQLiteStudio3/sqlitestudiocli/commands/clicommanddblist.cpp +++ b/SQLiteStudio3/sqlitestudiocli/commands/clicommanddblist.cpp @@ -58,7 +58,7 @@ void CliCommandDbList::execute() msg = pad(name, maxNameLength, ' '); msg += "|"; - msg += pad((open ? tr("Open") : tr("Closed")), connStateLength, ' '); + msg += pad((open ? tr("Open", "CLI connection state column") : tr("Closed", "CLI connection state column")), connStateLength, ' '); msg += "|"; msg += path; println(msg); @@ -74,9 +74,9 @@ QString CliCommandDbList::fullHelp() const { return tr( "Prints list of databases registered in the SQLiteStudio. Each database on the list can be in open or closed state " - "and .dblist tells you that. The current working database (aka default database) is also marked on the list with '*' at the start of its name. " - "See help for %1 command to learn about the default database." - ).arg(cmdName("use")); + "and %1 tells you that. The current working database (aka default database) is also marked on the list with '*' at the start of its name. " + "See help for %2 command to learn about the default database." + ).arg(cmdName("dblist"), cmdName("use")); } void CliCommandDbList::defineSyntax() diff --git a/SQLiteStudio3/sqlitestudiocli/commands/clicommanddblist.h b/SQLiteStudio3/sqlitestudiocli/commands/clicommanddblist.h index ecbaa6f..ee5d73f 100644 --- a/SQLiteStudio3/sqlitestudiocli/commands/clicommanddblist.h +++ b/SQLiteStudio3/sqlitestudiocli/commands/clicommanddblist.h @@ -5,6 +5,8 @@ class CliCommandDbList : public CliCommand { + Q_OBJECT + public: void execute(); QString shortHelp() const; diff --git a/SQLiteStudio3/sqlitestudiocli/commands/clicommanddesc.h b/SQLiteStudio3/sqlitestudiocli/commands/clicommanddesc.h index ee52c30..46876df 100644 --- a/SQLiteStudio3/sqlitestudiocli/commands/clicommanddesc.h +++ b/SQLiteStudio3/sqlitestudiocli/commands/clicommanddesc.h @@ -5,6 +5,8 @@ class CliCommandDesc : public CliCommand { + Q_OBJECT + public: CliCommandDesc(); void execute(); diff --git a/SQLiteStudio3/sqlitestudiocli/commands/clicommanddir.h b/SQLiteStudio3/sqlitestudiocli/commands/clicommanddir.h index 8aa5ccc..150b85d 100644 --- a/SQLiteStudio3/sqlitestudiocli/commands/clicommanddir.h +++ b/SQLiteStudio3/sqlitestudiocli/commands/clicommanddir.h @@ -5,6 +5,8 @@ class CliCommandDir : public CliCommand { + Q_OBJECT + public: void execute(); QString shortHelp() const; diff --git a/SQLiteStudio3/sqlitestudiocli/commands/clicommandexit.h b/SQLiteStudio3/sqlitestudiocli/commands/clicommandexit.h index dc061bb..7b63e09 100644 --- a/SQLiteStudio3/sqlitestudiocli/commands/clicommandexit.h +++ b/SQLiteStudio3/sqlitestudiocli/commands/clicommandexit.h @@ -5,6 +5,8 @@ class CliCommandExit : public CliCommand { + Q_OBJECT + public: void execute(); QString shortHelp() const; diff --git a/SQLiteStudio3/sqlitestudiocli/commands/clicommandhelp.h b/SQLiteStudio3/sqlitestudiocli/commands/clicommandhelp.h index c12c588..4fff7a6 100644 --- a/SQLiteStudio3/sqlitestudiocli/commands/clicommandhelp.h +++ b/SQLiteStudio3/sqlitestudiocli/commands/clicommandhelp.h @@ -5,6 +5,8 @@ class CliCommandHelp : public CliCommand { + Q_OBJECT + public: void execute(); QString shortHelp() const; diff --git a/SQLiteStudio3/sqlitestudiocli/commands/clicommandhistory.cpp b/SQLiteStudio3/sqlitestudiocli/commands/clicommandhistory.cpp index fd2a494..7d08846 100644 --- a/SQLiteStudio3/sqlitestudiocli/commands/clicommandhistory.cpp +++ b/SQLiteStudio3/sqlitestudiocli/commands/clicommandhistory.cpp @@ -46,7 +46,7 @@ QString CliCommandHistory::fullHelp() const "Every history entry is separated with a horizontal line, so multiline entries are easier to read.\n" "\n" "When the -c or --clear option is passed, then the history gets erased.\n" - "When the -l or --limit option is passed, it sets the new history entries limit. It requires an additional argument" + "When the -l or --limit option is passed, it sets the new history entries limit. It requires an additional argument " "saying how many entries do you want the history to be limited to.\n" "Use -ql or --querylimit option to see the current limit value." ); diff --git a/SQLiteStudio3/sqlitestudiocli/commands/clicommandhistory.h b/SQLiteStudio3/sqlitestudiocli/commands/clicommandhistory.h index f2e07d0..41c6f88 100644 --- a/SQLiteStudio3/sqlitestudiocli/commands/clicommandhistory.h +++ b/SQLiteStudio3/sqlitestudiocli/commands/clicommandhistory.h @@ -5,6 +5,8 @@ class CliCommandHistory : public CliCommand { + Q_OBJECT + public: void execute(); QString shortHelp() const; diff --git a/SQLiteStudio3/sqlitestudiocli/commands/clicommandmode.h b/SQLiteStudio3/sqlitestudiocli/commands/clicommandmode.h index 2b087d3..30725f9 100644 --- a/SQLiteStudio3/sqlitestudiocli/commands/clicommandmode.h +++ b/SQLiteStudio3/sqlitestudiocli/commands/clicommandmode.h @@ -5,6 +5,8 @@ class CliCommandMode : public CliCommand { + Q_OBJECT + public: void execute(); QString shortHelp() const; diff --git a/SQLiteStudio3/sqlitestudiocli/commands/clicommandnullvalue.h b/SQLiteStudio3/sqlitestudiocli/commands/clicommandnullvalue.h index 4ac4699..1950ec0 100644 --- a/SQLiteStudio3/sqlitestudiocli/commands/clicommandnullvalue.h +++ b/SQLiteStudio3/sqlitestudiocli/commands/clicommandnullvalue.h @@ -5,6 +5,8 @@ class CliCommandNullValue : public CliCommand { + Q_OBJECT + public: void execute(); QString shortHelp() const; diff --git a/SQLiteStudio3/sqlitestudiocli/commands/clicommandopen.h b/SQLiteStudio3/sqlitestudiocli/commands/clicommandopen.h index e66f574..cd76158 100644 --- a/SQLiteStudio3/sqlitestudiocli/commands/clicommandopen.h +++ b/SQLiteStudio3/sqlitestudiocli/commands/clicommandopen.h @@ -5,6 +5,8 @@ class CliCommandOpen : public CliCommand { + Q_OBJECT + public: void execute(); QString shortHelp() const; diff --git a/SQLiteStudio3/sqlitestudiocli/commands/clicommandpwd.h b/SQLiteStudio3/sqlitestudiocli/commands/clicommandpwd.h index 3568ce1..55afe48 100644 --- a/SQLiteStudio3/sqlitestudiocli/commands/clicommandpwd.h +++ b/SQLiteStudio3/sqlitestudiocli/commands/clicommandpwd.h @@ -5,6 +5,8 @@ class CliCommandPwd : public CliCommand { + Q_OBJECT + public: void execute(); QString shortHelp() const; diff --git a/SQLiteStudio3/sqlitestudiocli/commands/clicommandremove.h b/SQLiteStudio3/sqlitestudiocli/commands/clicommandremove.h index f4b5402..7ecd7b5 100644 --- a/SQLiteStudio3/sqlitestudiocli/commands/clicommandremove.h +++ b/SQLiteStudio3/sqlitestudiocli/commands/clicommandremove.h @@ -5,6 +5,8 @@ class CliCommandRemove : public CliCommand { + Q_OBJECT + public: void execute(); QString shortHelp() const; diff --git a/SQLiteStudio3/sqlitestudiocli/commands/clicommandtables.cpp b/SQLiteStudio3/sqlitestudiocli/commands/clicommandtables.cpp index 9a6b325..f5a9708 100644 --- a/SQLiteStudio3/sqlitestudiocli/commands/clicommandtables.cpp +++ b/SQLiteStudio3/sqlitestudiocli/commands/clicommandtables.cpp @@ -12,7 +12,7 @@ void CliCommandTables::execute() db = DBLIST->getByName(syntax.getArgument(DB_NAME)); if (!db) { - println(tr("No such database: %1. Use .dblist to see list of known databases.").arg(syntax.getArgument(DB_NAME))); + println(tr("No such database: %1. Use %2 to see list of known databases.").arg(syntax.getArgument(DB_NAME), cmdName("dblist"))); return; } } diff --git a/SQLiteStudio3/sqlitestudiocli/commands/clicommandtables.h b/SQLiteStudio3/sqlitestudiocli/commands/clicommandtables.h index 68ae314..cc4d908 100644 --- a/SQLiteStudio3/sqlitestudiocli/commands/clicommandtables.h +++ b/SQLiteStudio3/sqlitestudiocli/commands/clicommandtables.h @@ -5,6 +5,8 @@ class CliCommandTables : public CliCommand { + Q_OBJECT + public: void execute(); QString shortHelp() const; diff --git a/SQLiteStudio3/sqlitestudiocli/commands/clicommandtree.h b/SQLiteStudio3/sqlitestudiocli/commands/clicommandtree.h index 815d781..3085593 100644 --- a/SQLiteStudio3/sqlitestudiocli/commands/clicommandtree.h +++ b/SQLiteStudio3/sqlitestudiocli/commands/clicommandtree.h @@ -7,6 +7,8 @@ class CliCommandTree : public CliCommand { + Q_OBJECT + public: void execute(); QString shortHelp() const; diff --git a/SQLiteStudio3/sqlitestudiocli/commands/clicommanduse.h b/SQLiteStudio3/sqlitestudiocli/commands/clicommanduse.h index 9a8f280..4211256 100644 --- a/SQLiteStudio3/sqlitestudiocli/commands/clicommanduse.h +++ b/SQLiteStudio3/sqlitestudiocli/commands/clicommanduse.h @@ -5,6 +5,8 @@ class CliCommandUse : public CliCommand { + Q_OBJECT + public: void execute(); QString shortHelp() const; diff --git a/SQLiteStudio3/sqlitestudiocli/main.cpp b/SQLiteStudio3/sqlitestudiocli/main.cpp index 118e3f6..cd10de3 100644 --- a/SQLiteStudio3/sqlitestudiocli/main.cpp +++ b/SQLiteStudio3/sqlitestudiocli/main.cpp @@ -25,7 +25,7 @@ QString cliHandleCmdLineArgs() QCommandLineOption debugOption({"d", "debug"}, QObject::tr("Enables debug messages on standard error output.")); QCommandLineOption lemonDebugOption("debug-lemon", QObject::tr("Enables Lemon parser debug messages for SQL code assistant.")); - QCommandLineOption listPluginsOption("list-plugins", QObject::tr("Lists plugins installed in the SQLiteStudio end exists.")); + QCommandLineOption listPluginsOption("list-plugins", QObject::tr("Lists plugins installed in the SQLiteStudio and quits.")); parser.addOption(debugOption); parser.addOption(lemonDebugOption); parser.addOption(listPluginsOption); @@ -67,6 +67,7 @@ int main(int argc, char *argv[]) CliResultsDisplay::staticInit(); initCliUtils(); + SQLITESTUDIO->setInitialTranslationFiles({"coreSQLiteStudio", "sqlitestudiocli"}); SQLITESTUDIO->init(a.arguments(), false); SQLITESTUDIO->initPlugins(); diff --git a/SQLiteStudio3/sqlitestudiocli/sqlitestudiocli.pro b/SQLiteStudio3/sqlitestudiocli/sqlitestudiocli.pro index 2fcf30a..09cb2b9 100644 --- a/SQLiteStudio3/sqlitestudiocli/sqlitestudiocli.pro +++ b/SQLiteStudio3/sqlitestudiocli/sqlitestudiocli.pro @@ -1,101 +1,106 @@ -#------------------------------------------------- -# -# Project created by QtCreator 2013-02-28T23:21:43 -# -#------------------------------------------------- - -include($$PWD/../dirs.pri) - -OBJECTS_DIR = $$OBJECTS_DIR/sqlitestudiocli -MOC_DIR = $$MOC_DIR/sqlitestudiocli -UI_DIR = $$UI_DIR/sqlitestudiocli - -QT += core -QT -= gui - -TARGET = sqlitestudiocli -CONFIG += console -CONFIG -= app_bundle - -TEMPLATE = app - -CONFIG += c++11 -QMAKE_CXXFLAGS += -pedantic -linux|portable { - QMAKE_LFLAGS += -Wl,-rpath,./lib -} - -SOURCES += main.cpp \ - cli.cpp \ - commands/clicommand.cpp \ - commands/clicommandfactory.cpp \ - commands/clicommandadd.cpp \ - commands/clicommandremove.cpp \ - commands/clicommandexit.cpp \ - commands/clicommanddblist.cpp \ - commands/clicommanduse.cpp \ - commands/clicommandopen.cpp \ - commands/clicommandclose.cpp \ - commands/clicommandsql.cpp \ - clicommandexecutor.cpp \ - cli_config.cpp \ - commands/clicommandhelp.cpp \ - cliutils.cpp \ - commands/clicommandtables.cpp \ - climsghandler.cpp \ - commands/clicommandmode.cpp \ - commands/clicommandnullvalue.cpp \ - commands/clicommandhistory.cpp \ - commands/clicommanddir.cpp \ - commands/clicommandpwd.cpp \ - commands/clicommandcd.cpp \ - clicommandsyntax.cpp \ - commands/clicommandtree.cpp \ - clicompleter.cpp \ - commands/clicommanddesc.cpp - -LIBS += -lcoreSQLiteStudio - -win32: { - INCLUDEPATH += $$PWD/../../../include - LIBS += -L$$PWD/../../../lib -ledit_static -} - -unix: { - LIBS += -lreadline -ltermcap -} - -HEADERS += \ - cli.h \ - commands/clicommand.h \ - commands/clicommandfactory.h \ - commands/clicommandadd.h \ - commands/clicommandremove.h \ - commands/clicommandexit.h \ - commands/clicommanddblist.h \ - commands/clicommanduse.h \ - commands/clicommandopen.h \ - commands/clicommandclose.h \ - commands/clicommandsql.h \ - cli_config.h \ - clicommandexecutor.h \ - commands/clicommandhelp.h \ - cliutils.h \ - commands/clicommandtables.h \ - climsghandler.h \ - commands/clicommandmode.h \ - commands/clicommandnullvalue.h \ - commands/clicommandhistory.h \ - commands/clicommanddir.h \ - commands/clicommandpwd.h \ - commands/clicommandcd.h \ - clicommandsyntax.h \ - commands/clicommandtree.h \ - clicompleter.h \ - commands/clicommanddesc.h - -unix: { - target.path = $$BINDIR - INSTALLS += target -} - +#------------------------------------------------- +# +# Project created by QtCreator 2013-02-28T23:21:43 +# +#------------------------------------------------- + +include($$PWD/../dirs.pri) + +OBJECTS_DIR = $$OBJECTS_DIR/sqlitestudiocli +MOC_DIR = $$MOC_DIR/sqlitestudiocli +UI_DIR = $$UI_DIR/sqlitestudiocli + +QT += core +QT -= gui + +TARGET = sqlitestudiocli +CONFIG += console +CONFIG -= app_bundle + +TEMPLATE = app + +CONFIG += c++11 +QMAKE_CXXFLAGS += -pedantic +linux|portable { + QMAKE_LFLAGS += -Wl,-rpath,./lib +} + +TRANSLATIONS += translations/sqlitestudiocli_pl.ts + +SOURCES += main.cpp \ + cli.cpp \ + commands/clicommand.cpp \ + commands/clicommandfactory.cpp \ + commands/clicommandadd.cpp \ + commands/clicommandremove.cpp \ + commands/clicommandexit.cpp \ + commands/clicommanddblist.cpp \ + commands/clicommanduse.cpp \ + commands/clicommandopen.cpp \ + commands/clicommandclose.cpp \ + commands/clicommandsql.cpp \ + clicommandexecutor.cpp \ + cli_config.cpp \ + commands/clicommandhelp.cpp \ + cliutils.cpp \ + commands/clicommandtables.cpp \ + climsghandler.cpp \ + commands/clicommandmode.cpp \ + commands/clicommandnullvalue.cpp \ + commands/clicommandhistory.cpp \ + commands/clicommanddir.cpp \ + commands/clicommandpwd.cpp \ + commands/clicommandcd.cpp \ + clicommandsyntax.cpp \ + commands/clicommandtree.cpp \ + clicompleter.cpp \ + commands/clicommanddesc.cpp + +LIBS += -lcoreSQLiteStudio + +win32: { + INCLUDEPATH += $$PWD/../../../include + LIBS += -L$$PWD/../../../lib -ledit_static +} + +unix: { + LIBS += -lreadline -ltermcap +} + +HEADERS += \ + cli.h \ + commands/clicommand.h \ + commands/clicommandfactory.h \ + commands/clicommandadd.h \ + commands/clicommandremove.h \ + commands/clicommandexit.h \ + commands/clicommanddblist.h \ + commands/clicommanduse.h \ + commands/clicommandopen.h \ + commands/clicommandclose.h \ + commands/clicommandsql.h \ + cli_config.h \ + clicommandexecutor.h \ + commands/clicommandhelp.h \ + cliutils.h \ + commands/clicommandtables.h \ + climsghandler.h \ + commands/clicommandmode.h \ + commands/clicommandnullvalue.h \ + commands/clicommandhistory.h \ + commands/clicommanddir.h \ + commands/clicommandpwd.h \ + commands/clicommandcd.h \ + clicommandsyntax.h \ + commands/clicommandtree.h \ + clicompleter.h \ + commands/clicommanddesc.h + +unix: { + target.path = $$BINDIR + INSTALLS += target +} + +RESOURCES += \ + sqlitestudiocli.qrc + diff --git a/SQLiteStudio3/sqlitestudiocli/sqlitestudiocli.qrc b/SQLiteStudio3/sqlitestudiocli/sqlitestudiocli.qrc new file mode 100644 index 0000000..ac0cb93 --- /dev/null +++ b/SQLiteStudio3/sqlitestudiocli/sqlitestudiocli.qrc @@ -0,0 +1,5 @@ + + + translations/sqlitestudiocli_pl.qm + + diff --git a/SQLiteStudio3/sqlitestudiocli/translations/sqlitestudiocli_pl.qm b/SQLiteStudio3/sqlitestudiocli/translations/sqlitestudiocli_pl.qm new file mode 100644 index 0000000..b438a02 Binary files /dev/null and b/SQLiteStudio3/sqlitestudiocli/translations/sqlitestudiocli_pl.qm differ diff --git a/SQLiteStudio3/sqlitestudiocli/translations/sqlitestudiocli_pl.ts b/SQLiteStudio3/sqlitestudiocli/translations/sqlitestudiocli_pl.ts new file mode 100644 index 0000000..dda9aac --- /dev/null +++ b/SQLiteStudio3/sqlitestudiocli/translations/sqlitestudiocli_pl.ts @@ -0,0 +1,642 @@ + + + + + CLI + + Current database: %1 + Bieżąca baza danych: %1 + + + No current working database is set. + Nie ustawiono bieżącej bazy danych. + + + Type %1 for help + Wpisz %1, aby uzyskać pomoc. + + + Could not add database %1 to list. + Nie udało się dodać bazy danych %1 do listy. + + + closed + zamknięta + + + + CliCommand + + Usage: %1%2 + Sposób użycia: %1%2 + + + + CliCommandAdd + + Could not add database %1 to list. + Nie udało się dodać bazy danych %1 do listy. + + + Database added: %1 + Baza danych dodana: %1 + + + adds new database to the list + dodaje bazę danych do listy + + + Adds given database pointed by <path> with given <name> to list the databases list. The <name> is just a symbolic name that you can later refer to. Just pick any unique name. For list of databases already on the list use %1 command. + Dodaje bazę danych wskazaną przez <ścieżkę> z daną <nazwą> do listy baz danych. <nazwa> jest tylko symboliczną nazwą, do której możesz się potem odwoływać. Po prostu wybierz dowolną, unikalną nazwę. Aby wypisać listę baz danych, które są już na liście, użyj polecenia %1. + + + name + CLI command syntax + nazwa + + + path + CLI command syntax + ścieżka + + + + CliCommandCd + + Changed directory to: %1 + Zmieniono katalog na: %1 + + + Could not change directory to: %1 + Nie udało się zmienić katalogu na: %1 + + + Very similar command to 'cd' known from Unix systems and Windows. It requires a <path> argument to be passed, therefore calling %1 will always cause a change of the directory. To learn what's the current working directory use %2 command and to list contents of the current working directory use %3 command. + Bardzo podobne polecenie do 'cd' znanego z systemów Unixowych i Windowsa. Wymaga <ścieżki> jako argumentu, stąd wywołanie %1 zawsze spowoduje zmianę katalogu. Aby poznać jaki jest bieżący katalog, użyj polecenia %2, a żeby wypisać listę zawartości bieżącego katalogu użyj polecenia %3. + + + path + CLI command syntax + ścieżka + + + changes current working directory + zmienia bieżący katalog + + + + CliCommandClose + + Cannot call %1 when no database is set to be current. Specify current database with %2 command or pass database name to %3. + Nie można wywołać %1, gdy żadna z baz nie jest ustawiona jako bieżąca. Okreś bieżącą bazę używając polecenia %2, lub podaj nazwę bazy do %3. + + + Connection to database %1 closed. + Połączenie z bazą %1 zostało zamknięte. + + + No such database: %1. Use %2 to see list of known databases. + Nie znaleziono bazy danych: %1. Użyj %2 aby zonaczyć listę znanych baz danych. + + + closes given (or current) database + zamyka daną (lub bieżącą) bazę danych + + + Closes database connection. If the database was already closed, nothing happens. If <name> is provided, it should be name of the database to close (as printed by %1 command). The the <name> is not provided, then current working database is closed (see help for %2 for details). + Zamyka połączenie z bazą danych. Jeśli baza danych była już zamknięta, nic się nie stanie. Jeśli <nazwa> jest podana, to powinna ona być nazwą bazy danych do zamknięcia (wg. tego jak wyświetla ją polecenie %1). Gdy <nazwa> nie jest podana, to bieżąca baza danych zostanie zamknięta (więcej szczegółów w pomocy dla %2). + + + name + CLI command syntax + nazwa + + + + CliCommandDbList + + No current working database defined. + Nie określono bieżącej bazy danych. + + + Databases: + Bazy danych: + + + Name + CLI db name column + Nazwa + + + Open + CLI connection state column + Otwarta + + + Closed + CLI connection state column + Zamknięta + + + Connection + CLI connection state column + Połączenie + + + Database file path + Ścieżka do pliku bazy danych + + + prints list of registered databases + wypisuje listę zarejestrowanych baz danych + + + Prints list of databases registered in the SQLiteStudio. Each database on the list can be in open or closed state and %1 tells you that. The current working database (aka default database) is also marked on the list with '*' at the start of its name. See help for %2 command to learn about the default database. + Wypisuje listę zarejestrowanych w SQLiteStudio baz danych. Każda baza danych na liście może być otwarta, lub zamknięta i %1 o tym mówi. Bieżąca baza danych (nazywana również domyślną bazą danych) jest również zaznaczona na liście znakiem '*' na początku swojej nazwy. Zobacz pomoc dla polecenia %2, żeby dowiedzieć się więcej o domyślnej bazie danych. + + + + CliCommandDesc + + shows details about the table + pokazuje szczegóły o tabeli + + + table + tabela + + + + CliCommandDir + + lists directories and files in current working directory + wypisuje listę katalogów i plików w bieżącym katalogu + + + This is very similar to 'dir' command known from Windows and 'ls' command from Unix systems. + +You can pass <pattern> with wildcard characters to filter output. + To jest polecenie bardzo podobne do 'dir' znanego z systemu Windows, oraz 'ls' znanego z systemów Unixowych. + +Możesz podać <wzorzec> ze znakami maskującymi, aby filtrować wynik. + + + pattern + wzorzec + + + + CliCommandExit + + quits the application + zamyka aplikację + + + Quits the application. Settings are stored in configuration file and will be restored on next startup. + Zamyka aplikację. Ustawienia są zapisywane w pliku konfiguracyjnym i zostaną przywrócone przy następnym starcie. + + + + CliCommandHelp + + shows this help message + pokazuje tą treść pomocy + + + Use %1 to learn about certain commands supported by the command line interface (CLI) of the SQLiteStudio. +To see list of supported commands, type %2 without any arguments. + +When passing <command> name, you can skip special prefix character ('%3'). + +You can always execute any command with exactly single '--help' option to see help for that command. It's an alternative for typing: %1 <command>. + Używaj %1 aby poznać poszczególne polecenia obsługiwane przez interfejs linii poleceń (CLI) SQLiteStudio. +Aby zobaczyć listę obsługiwanych poleceń, wpisz %2 bez żadnych argumentów. + +Kiedy podaje się nazwę <polecenia>, można pominąć specjalny znak przedrostka ('%3'). + +Zawsze możesz wywołać dowolne polecenie z dokładnie jedną opcją '--help', aby zobaczyć pomoc dla tego polecenia. Jest to alternatywa dla wpisywania: %1 <polecenie>. + + + command + CLI command syntax + polecenie + + + No such command: %1 + Nie ma takiego polecenia: %1 + + + Type '%1' for list of available commands. + Wpisz '%1' aby poznać listę dostępnych poleceń. + + + Usage: %1%2 + Sposób użycia: %1%2 + + + Aliases: %1 + Aliasy: %1 + + + + CliCommandHistory + + Current history limit is set to: %1 + Bieżący limit historii jest ustawiony na: %1 + + + prints history or erases it + wyświetla historię lub ją kasuje + + + number + liczba + + + Console history erased. + Historia konsoli skasowana. + + + Invalid number: %1 + Niepoprawna liczba: %1 + + + History limit set to %1 + Limit historii ustawiono na %1 + + + When no argument was passed, this command prints command line history. Every history entry is separated with a horizontal line, so multiline entries are easier to read. + +When the -c or --clear option is passed, then the history gets erased. +When the -l or --limit option is passed, it sets the new history entries limit. It requires an additional argument saying how many entries do you want the history to be limited to. +Use -ql or --querylimit option to see the current limit value. + Gdy nie poda się żadnego argumentu, to polecenie wyświetla historię linii poleceń. Każdy wpis w historii jest oddzielony linią poziomą, żeby łatwiej było czytać więcej wpisów. + +Kiedy poda się opcję -c lub --clear, to historia jest kasowana. +Kiedy poda się opcję -l lub --limit, to ustawiany jest nowy limit na historii. Wymaga to podania dodatkowego argumentu, mówiącego o tym, ile ma być wpisów przechowywanych w historii. +Użyj opcji -ql lub --querylimit, aby poznać aktualną wartość limitu. + + + + CliCommandMode + + Current results printing mode: %1 + Aktualny tryb wyświetlania wyników: %1 + + + Invalid results printing mode: %1 + Niepoprawny tryb wyświetlania wyników: %1 + + + New results printing mode: %1 + Nowy tryb wyświetlania wyników: %1 + + + tells or changes the query results format + wyświetla lub zmienia format wyników zapytania + + + When called without argument, tells the current output format for a query results. When the <mode> is passed, the mode is changed to the given one. Supported modes are: +- CLASSIC - columns are separated by a comma, not aligned, +- FIXED - columns have equal and fixed width, they always fit into terminal window width, but the data in columns can be cut off, +- COLUMNS - like FIXED, but smarter (do not use with huge result sets, see details below), +- ROW - each column from the row is displayed in new line, so the full data is displayed. + +The CLASSIC mode is recommended if you want to see all the data, but you don't want to waste lines for each column. Each row will display full data for every column, but this also means, that columns will not be aligned to each other in next rows. The CLASSIC mode also doesn't respect the width of your terminal (console) window, so if values in columns are wider than the window, the row will be continued in next lines. + +The FIXED mode is recommended if you want a readable output and you don't care about long data values. Columns will be aligned, making the output a nice table. The width of columns is calculated from width of the console window and a number of columns. + +The COLUMNS mode is similar to FIXED mode, except it tries to be smart and make columns with shorter values more thin, while columns with longer values get more space. First to shrink are columns with longest headers (so the header names are to be cut off as first), then columns with the longest values are shrinked, up to the moment when all columns fit into terminal window. +ATTENTION! The COLUMNS mode reads all the results from the query at once in order to evaluate column widhts, therefore it is dangerous to use this mode when working with huge result sets. Keep in mind that this mode will load entire result set into memory. + +The ROW mode is recommended if you need to see whole values and you don't expect many rows to be displayed, because this mode displays a line of output per each column, so you'll get 10 lines for single row with 10 columns, then if you have 10 of such rows, you will get 100 lines of output (+1 extra line per each row, to separate rows from each other). + Jeśli nie poda się argumentu, wyświetla aktualny format wyjściowy dla wyników zapytania. Kiedy poda się <tryb>, to jest on zmieniany na podany tryb. +Obsługiwane tryby to: +- CLASSIC - kolumny są oddzielone przecinkiem, bez wyrównania, +- FIXED - kolumny mają równą i ustaloną szerokość, zawsze mieszczą się w oknie terminala, ale dane w kolumnach mogą być ucięte, +- COLUMNS - taki jak FIXED, ale sprytniejszy (nie używać z ogromnymi wynikami zapytań, szczegóły poniżej), +- ROW - każda kolumna w wierszu jest wyświetlana w osobnej linii, więc pełne dane są wyświetlane. + +Tryb CLASSIC jest zalecane, jeśli chcesz widzieć wszystkie dane, ale nie chcesz marnować linii na każdą kolumnę. Każdy wiersz wyświetli całe dane dla każdej kolumny, ale oznacza to również, że kolumny nie będą wyrównane do siebie względem kolejnych wierszy. Tryb CLASSIC również nie patrzy na szerokość okna terminala (konsoli), więc jeśli wartości w kolumnach są szersze niż okno, to wiersz będzie kontynuowany w następnej linii. + +Tryb FIXED jest zalecany, jeśli chcesz czytelny wynik i nie przejmujesz się zbyt długimi danymi. Kolumny będą wyrównane, otrzymując ładną tabelę. Szerokość kolumn jest obliczana dzieląc szerokość okna konsoli przez liczbę kolumn. + +Tryb COLUMNS jest podobny do trybu FIXED, z tą różnicą, że póbuje być sprytny i szerokość kolumn zawierających krótsze dane jest mniejsza, niż kolumn z dłuższymi danymi. Pierwsze w kolejności odchudzane są kolumny z najdłuższymi nagłówkami (więc nazwy nagłówków są pierwsze w kolejce do obcięcia), następnie kolumny z najdłuższymi wartościami, aż do momentu, kiedy wszystkie kolumny mieszczą się w oknie terminala. +UWAGA! Tryb COLUMNS od razu odczytuje wszystkie dane z wyników zapytania, aby określić szerokość kolumn, więc jest to niebezpieczne, gdy pracuje się z ogromnymi zestawami danych w wynikach. Miej na uwadze, że ten tryb wczyta wszystkie dane do pamięci na raz. + +Tryb ROW jest zalecane, kiedy musisz widzieć całe wartości i nie spodziewasz się wielu wierszy do wyświetlenia, ponieważ ten tryb wyświetla linię dla każdej kolumny, więc dostaniesz 10 linii dla jednego wiersza z 10 kolumnami, następnie będziesz miał 10 takich wierszy, więc skończysz ze 100 liniami wyjścia (+1 dodatkowa dla każdego wiersza danych, aby oddzielić je od siebie). + + + + CliCommandNullValue + + Current NULL representation string: %1 + Aktualny łańcuch reprezentujący wartość NULL: %1 + + + tells or changes the NULL representation string + wyświetla lub zmienia łąńcuch reprezentujący wartość NULL + + + If no argument was passed, it tells what's the current NULL value representation (that is - what is printed in place of NULL values in query results). If the argument is given, then it's used as a new string to be used for NULL representation. + Jeśli nie poda się argumentu, to wyświetlana jest aktualna reprezentacja wartości NULL (to znaczy to, co jest wyświetlane zamiast wartości NULL w wynikach zapytań). Jeśli podano argument, to staje się on nową reprezentacją wartości NULL. + + + + CliCommandOpen + + Cannot call %1 when no database is set to be current. Specify current database with %2 command or pass database name to %3. + Nie można wywołać %1, gdy żadna z baz nie jest ustawiona jako bieżąca. Okreś bieżącą bazę używając polecenia %2, lub podaj nazwę bazy do %3. + + + Could not add database %1 to list. + Nie udało się dodać bazy danych %1 do listy. + + + File %1 doesn't exist in %2. Cannot open inexisting database with %3 command. To create a new database, use %4 command. + + + + Database %1 has been open and set as the current working database. + + + + opens database connection + otwiera połączenie z bazą + + + Opens connection to the database. If no additional argument was passed, then the connection is open to the current default database (see help for %1 for details). However if an argument was passed, it can be either <name> of the registered database to open, or it can be <path> to the database file to open. In the second case, the <path> gets registered on the list with a generated name, but only for the period of current application session. After restarting application such database is not restored on the list. + Otwiera połączenie do bazy. Jeśli nie podano dodatkowych argumentów, to połączenie jest nawiązywane z domyślną bazą (więcej szczegółów w pomocy dla polecenia %1). Natomiast gdy poda się argument, to może to być albo <nazwa> zarejestrowanej bazy danych do otwarcia, lub może to być <ścieżka> do pliku bazy danych do otwarcia. W drugim przypadku <ścieżka> zostanie zarejestrowana na liście baz danych z wygenerowaną nazwą, ale tylko na czas aktualnej sesji aplikacji. Po restarcie aplikacji taka baza danych nie jest przywracana na listę. + + + name + CLI command syntax + nazwa + + + path + CLI command syntax + ścieżka + + + + CliCommandPwd + + prints the current working directory + wypisuje bieżący katalog + + + This is the same as 'pwd' command on Unix systems and 'cd' command without arguments on Windows. It prints current working directory. You can change the current working directory with %1 command and you can also list contents of the current working directory with %2 command. + Jest to polecenie podobne do 'pwd' znanego z sytemów Unixowych oraz polecenia 'cd' bez argumentów dla systemów Windows. Wypisuje bieżący katalog. Możesz zmienić bieżący katalog za pomocą polecenia %1, oraz możesz wypisać zawartość bieżącego katalogu za pomocą polecenia %2. + + + + CliCommandRemove + + No such database: %1 + Nie ma takiej bazy danych: %1 + + + Database removed: %1 + Baza danych usunięta: %1 + + + New current database set: + Nowa domyślna baza danych: + + + removes database from the list + usuwa bazę danych z listy + + + Removes <name> database from the list of registered databases. If the database was not on the list (see %1 command), then error message is printed and nothing more happens. + Usuwa <nazwaną> bazę danych z listy zarejestrowanych baz danych. Jeśli baza nie była na liście (patrz - polecenie %1), to zostanie wyświetlony komunikat błędu i nic się nie stanie. + + + name + CLI command syntax + nazwa + + + + CliCommandSql + + No working database is set. +Call %1 command to set working database. +Call %2 to see list of all databases. + Nie wybrano domyślnej bazy danych. +Użyj polecenia %1, aby ustawić domyślną bazę danych. +Użyj polecenie %2, aby wypisać listę wszystkich baz. + + + Database is not open. + Baz danych nie jest otwarta. + + + executes SQL query + wykonuje zapytanie SQL + + + This command is executed every time you enter SQL query in command prompt. It executes the query on the current working database (see help for %1 for details). There's no sense in executing this command explicitly. Instead just type the SQL query in the command prompt, without any command prefixed. + To polecenie jest wywoływane za każdym razem, kiedy wpisujesz zapytanie SQL w linii poleceń. Wykonuje ono zapytanie na bieżącej bazie danych (więcej szczegółów w pomocy dla %1). Nie ma sensu wywoływanie tego polecenia bezpośrednio. Zamiast tego po prostu wpisuj zapytania SQL w linii poleceń, bez polecenia poprzedzającego. + + + sql + CLI command syntax + sql + + + Too many columns to display in %1 mode. + Zbyt wiele kolumn, aby wyświetlić w trybie %1. + + + Row %1 + Wiersz %1 + + + Query execution error: %1 + Błąd wykonywania zapytania: %1 + + + + CliCommandTables + + Cannot call %1 when no database is set to be current. Specify current database with %2 command or pass database name to %3. + Nie można wywołać %1, gdy żadna z baz nie jest ustawiona jako bieżąca. Okreś bieżącą bazę używając polecenia %2, lub podaj nazwę bazy do %3. + + + Database %1 is closed. + Baza danych %1 jest zamknięta. + + + Database + Baza danych + + + Table + Tabela + + + prints list of tables in the database + wypisuje listę tabel w bazie danych + + + Prints list of tables in given <database> or in the current working database. Note, that the <database> should be the name of the registered database (see %1). The output list includes all tables from any other databases attached to the queried database. +When the -s option is given, then system tables are also listed. + Wypisuje listę tabel w danej <bazie danych> lub w bieżącej bazie danych. <baza danych> powinna być nazwą zarejestrowanej bazy danych (patrz %1). List wyjściowa zawiera wszystkie tabele ze wszystkich baz dołączonych do odpytywanej bazy. Gdy podana jest opcja -s, to również systemowe tabele pojawią się na liście. + + + database + CLI command syntax + baza danych + + + No such database: %1. Use %2 to see list of known databases. + Nie znaleziono bazy danych: %1. Użyj %2 aby zonaczyć listę znanych baz danych. + + + + CliCommandTree + + No current working database is selected. Use %1 to define one and then run %2. + Nie wybrano bieżącej bazy danych. Użyj %1 aby taką zdefiniować i wtedy uruchom %2. + + + Tables + Tabele + + + Views + Widoki + + + Columns + Kolumny + + + Indexes + Indeksy + + + Triggers + Wyzwalacze + + + prints all objects in the database as a tree + wypisuje wszystkie obiekty w bazie danych w postaci drzewa + + + Prints all objects (tables, indexes, triggers and views) that are in the database as a tree. The tree is very similar to the one that you can see in GUI client of the SQLiteStudio. +When -c option is given, then also columns will be listed under each table. +When -s option is given, then also system objects will be printed (sqlite_* tables, autoincrement indexes, etc). +The database argument is optional and if provided, then only given database will be printed. This is not a registered database name, but instead it's an internal SQLite database name, like 'main', 'temp', or any attached database name. To print tree for other registered database, call %1 first to switch the working database, and then use %2 command. + Wypisuje wszystkie obiekty (tabele, indeksy, wyzwalacze i widoki) znajdujące się w bazie danych w postaci drzewa. Drzewo to jest podobne do tego, które można zobaczyć w interfejsie graficznym SQLiteStudio. +Kiedy poda się opcję -c, to pod każdą tabelą wylistowane zostaną kolumny. +Kiedy poda się opcję -s, to również obiekty systemowe będą wypisane (tabele sqlite_*, indeksy autoinkrementacji, itp). +Argument bazy danych jest opcjonalny i gdy się go poda, to tylko ta baza zostanie wypisana. Nie jest to nazwa zarejestrowanej nazwy, ale nazwa wewnętrzna bazy SQLite, jak np 'main', 'temp', lub dowolna nazwa dołączonej bazy. Aby wypisać drzewo dla innej zarejestrowanej bazy, użyj najpierw %1, aby zmienić bieżącą bazę danych i wtedy użyj polecenia %2. + + + + CliCommandUse + + No current database selected. + Bieżąca baza danych nie jest wybrana. + + + Current database: %1 + Bieżąca baza danych: %1 + + + No such database: %1 + Nie ma takiej bazy danych: %1 + + + changes default working database + zmienia domyślną bazę danych + + + Changes current working database to <name>. If the <name> database is not registered in the application, then the error message is printed and no change is made. + +What is current working database? +When you type a SQL query to be executed, it is executed on the default database, which is also known as the current working database. Most of database-related commands can also work using default database, if no database was provided in their arguments. The current database is always identified by command line prompt. The default database is always defined (unless there is no database on the list at all). + +The default database can be selected in various ways: +- using %1 command, +- by passing database file name to the application startup parameters, +- by passing registered database name to the application startup parameters, +- by restoring previously selected default database from saved configuration, +- or when default database was not selected by any of the above, then first database from the registered databases list becomes the default one. + Zmienia domyślną bazę danych na <nazwaną>. Jeśli <nazwana> baza danych nie jest zarejestrowana w aplikacji, to wyświetlony zostanie komunikat błędu i żadne zmiany nie nastąpią. + +Czym jest domyślna baza danych? +Kiedy piszesz zapytanie SQL do wykonania, jest ono wykonywane na domyślnej bazie danych, która jest również nazywana bieżącą bazą danych. Większość poleceń związanych z bazą danych może pracować z użyciem domyślnej bazy danych, jeśli nie poda się bazy w ich argumentach. Bieżąca baza danych jest zawsze widoczna w wierszu poleceń. Domyślna baza danych jest zawsze zdefiniowana (z wyjątkiem, gdy nie ma żadnej bazy na liście). + +Domyślna baza danych może być wybrana na kilka sposobów: +- używając polecenia %1, +- podając plik bazy danych jako parametr do uruchomienia aplikacji, +- podając nazwę zarejestrowanej bazy danych jako parametr do uruchomienia aplikacji, +- lub gdy domyślna baza nie została wybrana przez żadne z powyższych, to pierwsza baza z listy zarejestrowanych baz stanie się domyślną. + + + name + CLI command syntax + nazwa + + + + QObject + + Insufficient number of arguments. + Niewystarająca liczba arugmentów. + + + Too many arguments. + Za dużo argumentów. + + + Invalid argument value: %1. +Expected one of: %2 + Niepoprawna wartość argumentu: %1. +Oczekiwano jednej z: %2 + + + Unknown option: %1 + CLI command syntax + Nieznana opcja: %1 + + + Option %1 requires an argument. + CLI command syntax + Opcja %1 wymaga argumentu. + + + string + CLI command syntax + łańcuch + + + Command line interface to SQLiteStudio, a SQLite manager. + Interfejs linii poleceń dla SQLiteStudio, menażera SQLite. + + + Enables debug messages on standard error output. + Włącza wiadomości debugujące na standardowym wyjściu błędów. + + + Enables Lemon parser debug messages for SQL code assistant. + Włącza wiadomości debugujące analizatora Lemon dla asystenta kodu SQL. + + + file + plik + + + Database file to open + Baza danych do otwarcia + + + Lists plugins installed in the SQLiteStudio and quits. + Wypisuje listę zainstalowanych w SQLiteStudio wtyczek i wychodzi. + + + -- cgit v1.2.3