Commit Graph

1676 Commits

Author SHA1 Message Date
lulol e215378476 Updated translation of rebuilt .ts 2017-01-12 00:41:10 +01:00
Justin Clift e4fdb8f05d lupdate run on sqlb_es_ES.ts
If this works as intended, we can do it for the other translations too
2017-01-11 21:53:52 +00:00
lulol bd0b8637e0 Corrects some typos and tildes (#924) 2017-01-10 12:33:13 +00:00
Martin Kleusberg 22b87847c0 grammar: Parse named primary keys in column constraints
Parse named primary keys correctly when they are in a column constraint,
not in a table constraint. E.g.

CREATE TABLE `a` (
	`x`	INTEGER CONSTRAINT c PRIMARY KEY,	-- Name 'c' here
	`y`	INTEGER,
);

See issue #741.
2017-01-08 20:42:34 +01:00
Martin Kleusberg 6740fc4d03 grammar: Fix parsing virtual tables 2017-01-08 16:32:41 +01:00
Martin Kleusberg 72b1d8f47e Clear edit dock after closing database
See issue #469.
2017-01-06 19:18:29 +01:00
Martin Kleusberg 35725b05e1 Replace ASCII art in pagination controls in Browse Data tab by icons 2017-01-06 19:00:15 +01:00
Martin Kleusberg d8983cb066 grammar: Support named foreign key constraints in the column definition
Previously the grammar parser would fail to extract and store the name
of a foreign key constraint in statements like these:

CREATE TABLE test(
    a int,
    b int CONSTRAINT this REFERENCES xy(id)	-- See the 'this' name
);

See issue #741.
2017-01-05 22:56:12 +01:00
Martin Kleusberg 94849fccf2 grammar: Parse columns with explicit NULL (un-)constraint correctly
Table definitions like these wouldn't work before:
CREATE TABLE test(
    a int NOT NULL,    -- This worked fine
    b int NULL         -- This didn't but does now.
);

See issue #741.
2017-01-05 22:41:51 +01:00
Martin Kleusberg 99a5d02925 Fix 'modifying table not supported' message
When our grammar parser doesn't fully understand a create table
statement yet, it'll set a flag to indicate the modifying this table
will result in errors: the nonunderstood parts will be removed from the
table while editing it.

The code for this feature, however, had a bug that was triggered by some
compilers (gcc in my case) because of an ambiguous function call. That
ambiguity and thus the resulting bug are fixed by this commit, making
sure the warning appears on all systems.

This was fun to debug...
2017-01-05 21:51:16 +01:00
Martin Kleusberg 01e68f0821 grammar: Add very, very basic support for virtual tables to the parser
This adds basic support for parsing CREATE VIRTUAL TABLE statements to
the grammar parser.

This doesn't mean that those tables are handled correctly at all.
Especially editing them and browsing them isn't working. But it didn't
work before this either.

See issue #917.
2017-01-05 21:42:02 +01:00
Martin Kleusberg 95a3f5cacf Allow (un)setting the WITHOUT ROWID flag for existing tables
When editing an existing table and changing the WITHOUT ROWID flag, this
modification is now actually applied to the table and saved.

See issue #51.
2017-01-05 19:24:14 +01:00
Martin Kleusberg d3ac0bdb81 Fix editing of foreign keys in Edit Table dialog
Fix a bug when removing a foreign key from a table.

Fix a bug when editing an existing foreign key on a table.

See issue #918.
2017-01-04 19:32:06 +01:00
Martin Kleusberg 63ba2c5059 Show message box when editing a table column fails
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.
2017-01-04 19:21:32 +01:00
Martin Kleusberg a40fe0b0ed Fix adding primary keys to tables in the Edit Table dialog
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.
2017-01-04 18:26:34 +01:00
Martin Kleusberg 31f73df721 Fix removal of primary keys when editing tables
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.
2017-01-04 18:13:47 +01:00
Martin Kleusberg f7a29ff541 Fix editing of primary and foreign keys for existing tables
See issues #872 and #918.
2017-01-04 17:54:59 +01:00
Martin Kleusberg e3cd04618e Fix typo in comment 2017-01-04 17:15:30 +01:00
Martin Kleusberg c782ab665f plot: Don't generate colours randomly
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.
2017-01-03 21:00:29 +01:00
Martin Kleusberg 876f25d341 Remove dead code
Please correct me if I'm wrong but I don't see how this if statement
would ever execute the else part.
2017-01-03 20:49:21 +01:00
Martin Kleusberg 3be39f2135 Show more items in tables combobox in Browse Data tab
See issue #867.
2017-01-03 20:31:58 +01:00
Vladislav Tronko c677872ba5 Make it possible to remove table constraints of specific type 2016-12-30 04:56:11 +02:00
Vladyslav 4bd899c54c Update TestRegex.cpp to fix Travis build 2016-12-29 21:06:02 +02:00
Vladislav Tronko 210916cfeb Use references instead of pointers where it's possible
In our case DDBrowserDB shares lifetime scope with MainWindow, so
there's no need to pass pointers back and forth.
2016-12-29 20:38:24 +02:00
Martin Kleusberg 5697e475b5 Add keyboard shortcut for browse table combo box
See issue #908.
2016-12-28 13:23:41 +01:00
Vladislav Tronko 70ff691f1a Fix bugged pagination (close #912) 2016-12-23 21:01:33 +02:00
Oleg Prutz c34cd22f43 Fix identaton (replace tabs with spaces)
This commit replaces tabs which were introduced in 17369b6 with spaces
2016-12-23 00:12:09 +03:00
Justin Clift fbbd8304bc Merge pull request #910 from prutz1311/master
Fix identaton (replace tabs with spaces)
2016-12-22 11:58:18 +00:00
Oleg Prutz 884ed66df8 Fix identaton (replace tabs with spaces)
This commit replaces tabs which were introduced in 17369b6 with spaces
2016-12-22 02:37:43 +03:00
Martin Kleusberg f62d78ce15 Apply changed font settings to edit dock without restart
See issue #894.
2016-12-19 19:43:28 +01:00
Martin Kleusberg 62bfeb03fa Make SQL status pane resizable in Execute SQL tab
See issue #906.
2016-12-19 18:34:04 +01:00
Martin Kleusberg d6c448591b Update translations for commit 94e009d137 2016-12-19 18:14:43 +01:00
Martin Kleusberg 94e009d137 Fix link to SQLite documentation in the user version pragma label
See issue #897.
2016-12-19 18:08:35 +01:00
Martin Kleusberg ab5f6cffa7 Reload pragma values when pressing F5/Ctrl+R
As suggested by Iulian here
https://github.com/sqlitebrowser/sqlitebrowser/commit/da7f472864c50af85b01907ab3a3762e98b6154e#commitcomment-19844983
2016-12-19 17:53:37 +01:00
Justin Clift e6a8f88255 Merge pull request #895 from prutz1311/master
Improve handling of SQLite savepoints (#878) (#836)
2016-12-10 11:41:34 +00:00
Oleg Prutz 2f45341570 Improve handling of SQLite savepoints (#878) (#836)
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.
2016-12-06 15:30:44 +03:00
Justin Clift 4ac931835d Merge pull request #890 from shanecb/master
Added a new format for displaying Apple NSDates to the Column Display Format Dialog
2016-11-30 02:39:17 +00:00
Shane Bielefeld 7e03d67c2b Added a new format for displaying Apple NSDates to the
ColumnDisplayFormatDialog
2016-11-28 17:56:47 -05:00
Oleg Prutz 17369b66a6 Fix hanging when deleting large number of records (#856) (#870) 2016-11-25 09:44:47 +00:00
Justin Clift c6f1373ba9 Trivial typo fix 2016-11-08 01:21:35 +00:00
Martin Kleusberg df5e604e6e dbhub: Add support for sending files
NOt perfect yet but a start.
2016-11-07 23:38:51 +01:00
Martin Kleusberg eeeec5f2fc dbhub: Use certificate manager to get client cert for authentication
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.
2016-11-06 14:50:27 +01:00
Martin Kleusberg 982e4c4d34 plot: Add row number as column to select for plot
See issue #820.
2016-11-04 18:48:21 +01:00
Martin Kleusberg 70a44971be plot: Fix fetch all data button for plots based on query data
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.
2016-11-04 18:17:26 +01:00
Martin Kleusberg f3dcf5a0c8 Store contraints in a hash structure instead of a map
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.
2016-11-04 18:02:59 +01:00
Martin Kleusberg 60e4cb758e dbhub: Add client certificate management
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.
2016-11-01 22:54:50 +01:00
Martin Kleusberg 02019e391b Fix cmake build
Also simplify the cmake file for the unit tests.
2016-11-01 20:31:43 +01:00
Martin Kleusberg ce1efcf645 dbhub: Update CA certificates 2016-11-01 20:03:14 +01:00
Martin Kleusberg 6283f97598 dbhub: Add list of CA certificates and restructure code
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.
2016-11-01 19:45:42 +01:00
Martin Kleusberg e9894b47fa grammar: Add support for row values
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.
2016-10-30 21:50:30 +01:00