Commit Graph

2058 Commits

Author SHA1 Message Date
Martin Kleusberg
f60c059b87 Fix horizontal tiling in Execute SQL tab
See issue #380.
2017-10-13 10:40:31 +02:00
Martin Kleusberg
3c1c6af18b Fix crash on Windows
See issue #1169.
2017-10-12 17:44:52 +02:00
Justin Clift
c0b67ab4a8 Merge pull request #1168 from kehugter/master
Remove `activateWindow()` when EditDock is toggled
2017-10-12 15:22:26 +01:00
kehugter
c4c4cf62a2 Remove activateWindow() when EditDock is toggled
There's no need to set sqlitebrowser as active window when updating
the main application window. The `activateWindow()` call prevents
switching workspaces in GNOME and Cinnamon desktops.

Fixes #934
2017-10-11 22:54:06 +02:00
Martin Kleusberg
ce18198bbf Improve splitter in Execute SQL tab
Set a maximum height for the error area in the Execute SQL tab. This way
it doesn't occupy as much space by default.

Use two separate splitters instead of just one. This fixes the
horizontal tiling option.

See issue #380.
2017-10-11 19:06:54 +02:00
Martin Kleusberg
f4c27888f1 Fix editing data after multi-threaded loading 2017-10-11 10:50:58 +02:00
Martin Kleusberg
5ea6b1a76d Fix recordset label in Browse Data tab 2017-10-11 09:21:41 +02:00
Martin Kleusberg
60ae015fe9 Fix build error 2017-10-11 09:21:41 +02:00
Martin Kleusberg
bb4aeb6210 Fix warning 2017-10-11 09:21:41 +02:00
Martin Kleusberg
bfa2fda1ad Attempt to implement multi-threaded loading of data
This is mostly done by trial & error. Don't expect any miracles from
it.
2017-10-11 09:21:41 +02:00
Martin Kleusberg
6029e25bcc Store row columns in a vector instead of a list
This should speed things marginally up.
2017-10-08 20:06:49 +02:00
Martin Kleusberg
fd8960cd49 Fix double queries in Browse Data tab
This avoids querying the database twice when selecting a new table. It's
an easy fix which works in most circumstances (all except for views with
enabled view editing). It can always be improved if necessary.

See issue #1108.
2017-10-07 18:21:22 +02:00
Martin Kleusberg
d5e4fe9f66 Clean up code 2017-10-07 18:00:48 +02:00
Martin Kleusberg
c1aa7a34b4 Fix path comparison when checking for attached databases
See issue #1133.
2017-10-06 12:33:04 +02:00
Martin Kleusberg
eff92c2818 dbhub: Better validation in push dialog
This makes it more obvious to the user where the error in the input is
by just now allowing invalid characters.

It also prevents an annoying error message from popping up when entering
invalid database names and changing focus to another field afterwards.

See issue #1136.
2017-10-06 11:39:00 +02:00
Martin Kleusberg
8a7b662435 Fix crash when editing table after changing its schema
Fix a crash which happened when opening a table in the Edit Table dialog
for modification and changing its schema and then (without reopening the
dialog) change the schema again or doing some other modifications to the
table.

See issue #1131.
2017-10-06 00:04:06 +02:00
Martin Kleusberg
3e02420256 Escape new schema name when altering a table
When moving a table to another schema with a name which needs to be
escaped, this would have generated an error prior to this commit.
2017-10-05 23:50:47 +02:00
Martin Kleusberg
3d26c1154c Don't allow attaching the same database twice
See issue #1133.
2017-10-05 23:45:22 +02:00
Martin Kleusberg
59b39bbb95 Don't query foreign key settings repeatedly in Edit Table dialog
When changing the table name in the Edit Table dialog, don't query the
foreign key pragma for every key stroke.

See issue #1130.
2017-10-05 23:32:06 +02:00
Martin Kleusberg
b24894f4c3 Allow empty names for attached databases
An empty database name is not the same as pressing the cancel button
when attaching a database.

See issue #1132.
2017-10-05 23:23:36 +02:00
Martin Kleusberg
1cd93ed045 Suggest a schema name when attaching a database
See issue #1132.
2017-10-05 23:21:37 +02:00
Martin Kleusberg
a5ebcbb55c Also remember databases with no objects
When attaching a database that is empty, i.e. has no objects in it,
include it in the schema map, too.

See issue #1132.
2017-10-05 23:17:19 +02:00
Martin Kleusberg
a1855d8f75 dbhub: Don't allow invalid file or branch names in push dialog
See issue #1136.
2017-10-05 23:10:11 +02:00
Martin Kleusberg
5de8f73723 Use a more sophisticated method for detecting image data in Edit dialog
In the Edit Data dialog we check if the data contained in a cell is an
image. This check returned some false positives, so this commit adds
another more sophisticated check to work around that.

See issue #1138 and #1159.
2017-10-05 22:47:02 +02:00
Martin Kleusberg
24ee209bef dbhub: Use URL returned by server 2017-10-05 22:38:01 +02:00
Justin Clift
d73859736d dbhub: Use a fixed format string when transmitting last modified dates 2017-10-02 12:58:30 +01:00
Justin Clift
64b33413fb dbhub: Include TZ with lastmodified date sent to server 2017-10-02 00:05:12 +01:00
Martin Kleusberg
c692ae0de5 dbhub: When pushing a database, save the new commit id and/or the file
When pushing a local database to the remote server, the new commit id is
returned. Grab that id and insert it into the database of local
checkouts. If there already is an entry for the given file, update that
record. When doing an initial push of a database, also copy the source
database file to our checkout directory to avoid redownloading the file
upon first use.

This should eliminate all unnecessary database downloads, both after
doing the initial push and after committing a modified database.
2017-09-30 16:05:01 +02:00
Martin Kleusberg
8c0e4bfdaa dbhub: Send last modified date when pushing database
Also add some code for receiving the last modified data when fetching
but we're not yet able to set it.
2017-09-30 14:47:19 +02:00
Martin Kleusberg
f926a67dba dbhub: Add foce push option to push dialog 2017-09-30 14:07:18 +02:00
Martin Kleusberg
b2ddcdd470 dbhub: Only keep one record per checked out file
Instead of just adding and adding records to the local checkout
database, search for a previous checkout and update its record. This
avoids all sorts of problems in the rest of the code which always
assumed that there is only one record per file.
2017-09-30 13:35:40 +02:00
Martin Kleusberg
f18064f0ae dbhub: Change schema of local database
Also delete the upgrade mechanism that was put in place because it won't
be that easy anyway later on.
2017-09-30 13:02:18 +02:00
Martin Kleusberg
fef884a4e1 dbhub: Send last known commit id along with the database when pushing 2017-09-30 12:57:46 +02:00
Martin Kleusberg
8a540a2745 dbhub: Add column for branches to local database 2017-09-30 12:43:50 +02:00
Martin Kleusberg
34df190729 Silence some cmake warnings
See issues #635 and #1143.
2017-09-30 12:19:55 +02:00
Martin Kleusberg
1666bb5606 Improve speed of preview table for large fields in Import CSV dialog
See issue #720.
2017-09-29 23:21:39 +02:00
Martin Kleusberg
bbc4ad5b19 Don't reset the table name as easily in the Import CSV dialog
See issue #1072.
2017-09-29 23:08:39 +02:00
Martin Kleusberg
263f075d8d Add splitter to the Import CSV dialog
This adds a splitter between the CSV file list and the file preview in
the Import CSV dialog.

See issue #1072.
2017-09-27 21:27:34 +02:00
Martin Kleusberg
cbd5d15cf5 Add a way to cancel the entire CSV import
See issue #1121.
2017-09-27 20:59:30 +02:00
Martin Kleusberg
425bfa1e75 Improve 'Yes for all' button in CSV import dialog
See issue #1121.
2017-09-27 15:52:34 +02:00
Martin Kleusberg
d2185d234b csv: Don't ask whether to import into existing table every time
Add a 'Yes for all' button to the "There is already a table of
that name..." message box in the Import CSV dialog.

See issue #1121.
2017-09-27 14:18:38 +02:00
Martin Kleusberg
4dc5286596 dbhub: Fix possible crash
This fixes a crash that occurs if there is an error while fetching
something other than a database and no database has been downloaded
before, e.g. when getting the root directory listing fails.
2017-09-25 14:36:31 +02:00
Jiří Techet
18bcbf138f Fix extra spaces in type definitions with parentheses
At the moment space is inserted between all tokens from which a type
consists. This adds extra spaces to types like VARCHAR(5) which become
"VARCHAR ( 5 )" which causes problems in some applications.

This patch modifies the way tokens are concatenated for a type. It makes
sure that the extra space isn't inserted before "(" and ")" and also
after "(".
2017-09-22 20:10:09 +02:00
Justin Clift
c5e91976c8 Update currentrelease to 3.10.1 2017-09-20 18:54:48 +01:00
Justin Clift
efd8514107 Added 3.10.1 to README.md release history 2017-09-20 17:07:39 +01:00
Justin Clift
1723ba10b9 Add 3.10.1 to the issue reporting template 2017-09-20 16:59:32 +01:00
Martin Kleusberg
e3b9027bd0 Add missing include
See issue #1148.
2017-09-20 16:54:46 +02:00
Martin Kleusberg
8f82f26d4f Visual optimisation for the CSV import process
When importing multiple CSV files at once, remove each entry from the
list of CSV files as its import completes. This way people can see the
list shrink visibly onscreen.

Also don't close the window if there are still files left to be
imported. This allows the user to import unchecked files, too, probably
using different settings.

See issue #1072.
2017-09-19 21:43:30 +02:00
Jiří Techet
969d3e470a Fix custom type saving when only focus changes for user-entered type
At the moment when user types a custom type into the type combo box and
doesn't press enter, the entered type isn't used. This patch tries to fix
the problem by installing an event filter for the combo box and checking
when it loses focus - when it does, it performs type updates too.

On the way the patch also changes the signal used inside moveCurrentField()
from activated() to currentIndexChanged() to make it consistent with the
rest of the file.
2017-09-19 21:10:03 +02:00
Martin Kleusberg
2f304e0957 Add automatic data type detection to the CSV import
When importing a CSV file into a table that doesn't exist yet (i.e. that
is created during the import), try to guess the data type of each column
based on the first couple of rows. If it is all floats or mixed floats
and integers, set the data type to REAL; if it is all integers, set the
data type to INTEGER; if it is anything else, set the data type to TEXT.

See issue #1003.
2017-09-18 21:44:34 +02:00