This changes all the code to use the commit id of a database version
instead of a version number. This means changing the UI, the code for
the communication with dhhub.io, and the internal database for storing
information on downloaded databases.
The last step makes it necessary to delete that database file on your
system, so it will be recreated! Please do that :)
In the remote tab of the preferences dialog all items in the root ca and
the client cert table views were shown as disabled. The grey text made
them hard to read and the disabled look and feel could be confusing as
to what DB4S tries to tell you by doing that. It also made it hard to
select the entire row in the client cert table view when you wanted to
delete it. All this is fixed by this commit which 'enables' the items.
As per popular request, this adds support for setting PRAGMAs from the
Execute SQL tab. Since most PRAGMAs won't work inside a transaction we
make sure that we're not in one while the PRAGMA statement is executed.
If this means we need to commit any pending changes, the user get a
message box.
See issues #1021, #980, #966.
We're reading CSV files not all at once but in chunks. And when we're
encountering a \r char we're checking if it is followed by a \n char. So
far so good. But now it might happen that we're hitting a \r char that's
right at the end of the current buffer. In this case the lookahead check
isn't working as expected because there isn't more data available yet.
This commit fixes the issue by checking for these conditions and loading
an extra byte when needed.
See issue #1033.
When importing a CSV file into an existing table (i.e. a table where we
have a table schema), check the data type of a field before inserting
empty values. If it is an integer field, don't insert empty string like
we did before but 0 or NULL depending on the NOT NULL flag.
See issue #195.
Please note that this isn't perfect. The preview in the dialog doesn't
reflect these changes yet, it just show you the contents of the file as
is. It's a little tricky to change this and I somehow think it's better
the way it is now anyway. Also the import doesn't check for other
constraints like UNIQUE or CHECK which might cause trouble. But then
again it didn't do that before either.
When importing a CSV file and using the first row as the field names,
the row would be imported as the first data row again. It's now skipped
when the checkbox is set.
When importing a single CSV file the checkbox asking whether to import
into a single table or separate tables is hidden. However, the last set
values are loaded anyway when the dialog is opened. This means the
checkbox could be set, even though it's invisible. If it's set, however,
and we're importing a single CSV file this would mean that it's
impossible to manually set the table name to import into. This is fixed,
too.
Also this simplifies the code a bit and removed a large loop from the
import dialog code.
Allow opening new tabs, opening SQL files, and saving SQL files even
when no database is opened. Execution of SQL statements obviously is
still not allowed. But this should make it possible to use DB4S as a
simple SQL text editor if no better alternative is available on the
system.
Don't close SQL tabs when closing the databse.
When opening a database only close empty tabs, keep all non-empty tabs
opened. This should make sure that no SQL statements are accidentally
lost when opening a new database or simply closing the old one.
When opening a project file, close all tabs and load the new tabs from
the project file.
See issue #1035.
Don't allow removing expression columns by double clicking as this it
too error-prone. Instead require a button click for removal and only
start editing the expression when double clicking.
See issue #1012.
Add a context menu to all table view widgets in the program (Browse Data
tab and Execute SQL tab) which opens when right clicking a table item.
Currently the menu only allows you to copy and paste the selected
item(s).
Only activate the paste action when the current view is writable.
Browsing WITHOUT ROWID tables was broken since a couple of commits. An
error message would be printed to the console and all cells would stay
empty. This is fixed by this commit.
When pasting data into a cell of a view the application would have
crashed because it treats the view as a table (which it isn't). This is
fixed by this.
- Tweak input checker
- Preserve old file import as not to cause any unforeseen breaks
- Allow ignoring file name when importing multiple files to tables
- Mass toggle several files for import