When editing a column of an existing table, this process might fail for
all sorts of reasons. Instead of printing an error message to stdout
this commit changes it to show a message box, so the user knows the
editing failed.
Adding a primary key to a table that didn't had a primary key before
would have added the column to the sqlb::Table::primaryKey::emptyFieldVector
variable (which is static!) instead of actually creating a new primary
key.
This way the primary key wouldn't be created as a new table constraint.
See issue #918.
Suppose you have this table:
CREATE TABLE `test` (
`a` INTEGER PRIMARY KEY AUTOINCREMENT,
`b` INTEGER
);
Editing this and removing the primary key would lead to this table
statement:
CREATE TABLE `test` (
`a` INTEGER,
`b` INTEGER,
PRIMARY KEY()
);
This is fixed by this commit, the invalid empty primary key line isn't
outputted anymore.
This adds a basic table of 12 colours which DB4S chooses from when new
plot graphs are added. This also introduces a pointer to this table of
colours which if moved forward each time a graph is added. This it's
less likely that two graphs have the same colour in one plot.
A better but more complex approach would be to find an algorithm to
generate new colours dynamicalls. See issue #816 for details.
Previously all savepoints were added to and deleted from
`savepointList`, so some savepoints could not be released, which lead to
warnings and errors, e.g. it was impossible to save database or to move
newly created row in 'Edit Table' window.
When trying to fetch a database don't load a hardcoded client
certificate but grab one from the certificate manager in the preferences
dialog.
Also add support for password protected private keys.
Note: Since this is all testing code on the front-end side, we just use
the first certificate in case multiple certificates are configured.
The fetch all data button in the plot area would load all data as if the
Browse Data tab was active even though the plot is based on a SQL query
in the EXecute SQL tab. That would lead to non-sensical results. With
this commit the button always load the correct data.
See issue #820.
Our key type here is a vector of fields and vectors aren't less than
comparable by default (and I have no idea how to implement a sane
operator<() for them). But because maps require less than comparability,
change the map to a hash which only requires an operator==() which a
vector should have by default.
No idea how this ever worked with a map?!
See issue #854.
Add a list of all configured client certificates to the preferences
dialog and show some information on them.
Add two button to the preferences dialog to add and remove client
certificates.
Copy configured client certificates to some safe place where they aren't
deleted by accident.
Change the remote code to expect certificate and private key in one
file. The path to this file is still hardcoded, now to client.cert.pem.
Remove the example client certificate as it's not up-to-date anymore
anyway.
Still missing: Option to use a configured client certificate from the
preferences dialog to authenticate.
Change the layout of the preferences dialog a bit.
Remove the server selection combo box from the preferences dialog as it
will probably never be required. The way we do logins using certificates
kind of makes this obsolete, I think.
Restructure the whole remote code a little bit. Also add helper
functions here and there.
Show a list of our the CA certificates built into the application in the
preferences dialog. This list is read only of course but still
informative as it tells the user which sites are supported ny DB4S.
SQLite version 3.15.0 introduced a new feature called row values. These
are basically vectors of values that can be used to simplify some
expressions.
For example instead of this
CREATE TABLE x(a int, b int, c int, CHECK(a=1 and b=2));
you could write this:
CREATE TABLE x(a int, b int, c int, CHECK((a,b) = (1,2)));
However, the new syntax wasn't supported by our grammar parser which
made it impossible to access or edit that table. This commit attempts to
fix this.
Previously we'd only ignore errors about a single self signed
certificate but apparently it's an entirely different matter to Qt or
OpenSSL if we're talking about a self signed certificate in a
certificate chain.
This adds basic support for fetching databases via HTTPS using client
certificates. You can include CA certificates to verify any responses
from a server. For now, one test CA certificate is included but it's
easy to add more.
It's also possible to authentify the client using a client certificate,
a client key and a password. As of this commit all three items are
hardcoded.
It's still possible to access any remote database via HTTP but if a
request URL starts with 'https' this new mechanism will be used.
All certificates, keys, and password included in here are taken from my
node.js test server repository. They will be replaced soon-ish.
This adds some initial support for opening remote files. You can enter a
URL and DB4S will try to download the file. When successful you'll be
able to specify a place and name to save the file under, and after
saving it locally to disk it'll be opened just like any local database
file.
See the included TODO comments for missing features. Most notably
missing is the HTTPS and certificate handling code. Also any support
for storing the remote source of a database is lacking.