This feature isn't explicitly available via the UI (yet) but should
prevent errors when the user is faster than the network connection, e.g.
when opening two directories very quickly.
In the Execute SQL tab we need to detect PRAGMA and VACUUM statements
before executing them in order to now execute them inside a transaction
which isn't supported by SQLite. If such a statement followed any other
statement however, the detection would fail, e.g.
pragma user_version=1; -- this works
pragma app_version=2; -- this fails
This should be fixed by this commit.
Some time ago we changed the Execute SQL tab to allow open SQL files
even if no database is loaded in order to provide an SQL editor without
needing a database.
If no database file is opened the Execute buttons were greyed out but
the F5/Ctrl+R shortcut would still work, causing an "out of memory"
error. That error doesn't cause any harm but is a bit confusing. So this
commit disables the keyboard shortcuts too.
When changing the client certificate we need to clear the authentication
and access cache of our Qt network access manager instance. If we don't
do so, Qt might decide to use the old certificate information which is
still in the cache for some recurring queries.
This improves the user experience for pushing database files. Before
this you had to type in the entire URL for pushing, e.g.:
https://db4s-beta.dbhub.io:5550/username/databasename
With this the host name as well as the user name is taken from the
currently active client certificate. So all you have to type in now is
the database name. And for this we make a sensible automatic suggestion
based on the name of the local file you're trying to push.
Note that while this makes pushing databases a lot easier, it still
doesn't implement proper version control or any extra code for handling
conflicts etc.
This commit removes the File -> Remote menu entirely. The only menu item
that was left was the Save to Remote item which is replaces by a button
in the remote dock.
The button is only enabled when a database file is opened and the user
has logged in using a certificate.
Clicking the button opens the same dialog and performs the same actions
as before. The only difference is that we don't use the first client
certificate - no matter which one it is - but instead use the client
certificate that was used for logging in.
Remove the browse mode ("Remote" / "Local") combo box from the remote
dock as it's currently not used for anything and probably won't be used
for the time being. So before it causes any confusion as to what it does
we should probably just get rid of it for now.
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.