Commit Graph

639 Commits

Author SHA1 Message Date
Martin Kleusberg
05c8a153ba EditTableDialog: Make it possible again to delete default value
Commit c29702a1b9 fixed the handling of
default values and added a check to enforce quote characters when they
are needed. This check wasn't prepare for empty default values (i.e. no
default value) and would add quote characters in this case, too. This is
fixed by this commit.

See issue #133.
2014-10-16 16:38:10 +02:00
Martin Kleusberg
280d5c1773 plot: Use default location from preferences dialog when saving picture 2014-10-15 19:53:06 +02:00
Martin Kleusberg
19baeb2a7a grammar: Fix double quote characters as used for escaping one
SQL allows you to use two quote characters instead of just one in order
to escape them. Example: ['aa''bb'] is read as [aa'bb]. Add detection
for these doubled quote characters to our grammar parser.

See issue #128.
2014-10-15 19:29:19 +02:00
Martin Kleusberg
a0f22a1ddb SqlExecutionArea: Use log font size for execution result
Use the same configurable font size as for the SQL log pane for the
result view of the SQL execution area tabs in the main window.

See issue #131.
2014-10-15 18:46:20 +02:00
Martin Kleusberg
5d20d97e24 MainWindow: Improve saving of project files
When saving a project file make sure it's got the right file ending.
Also add it to the list of recently opened files.

Use the default location from the preferences dialog for initialising
the file dialogs for loading and saving project files.
2014-10-15 13:44:52 +02:00
Martin Kleusberg
ff5cf3e63d MainWindow: Add project files to list of recently opened files
When opening a project file add it to the list of recently opened files
instead of the database file associated with it.
2014-10-15 13:38:32 +02:00
Martin Kleusberg
b841025bae tests: Add test to check escaping quotes by using two of them 2014-10-15 12:57:37 +02:00
Martin Kleusberg
c29702a1b9 EditTableDialog: Fix handling of default values
Fix the handling of default values in the Edit Table dialog by doing two
things: First, change the sqlb::Field class so that it doesn't put quotes
around any default values no matter what. This breaks for example NULL
default values but also causes invalid syntax if the default value is
already in quotes. Secondly, change the Edit Table dialog itself to
double check if the user should've put quotes around their default value
but hasn't. In this case add them automatically.

See issues #64 and #126.
2014-10-15 12:45:43 +02:00
Martin Kleusberg
63eaf01988 MainWindow: Automatically resize Schema column in DB Structure tab
Automatically resize the Schema column in the Database Structure tab of
the main window to fit its contents.

See issue #113.
2014-10-12 17:46:50 +02:00
Martin Kleusberg
eb8e801b57 Make it possible to jump between filters by pressing the tab key
Allow jumping between the filter input fields by pressing Tab and
Shift+Tab.

See issue #106.
2014-10-11 15:45:30 +02:00
Peinthor Rene
017715510f edittabledlg: don't react on textchanged
On every text change in the type combobox a renamecolumn was triggered
2014-10-10 18:47:04 +02:00
Peinthor Rene
f38c3f13ca csvexport: produce more rfc4180 complaint csv files 2014-10-06 20:59:09 +02:00
Peinthor Rene
62d72e6a9e csvexport: use CRLF as specified in RFC4180 2014-10-06 20:40:26 +02:00
Martin Kleusberg
ae199112a5 MainWindow: Make sure the filters are applied before getting the row num
First apply the new filter values and only when that is done get the
number of rows in the current view. This fixes the issue that, when
changing a filter, the number of rows shown under the table view is that
of the last results, not the current.

See issue #122.
2014-10-06 15:23:55 +02:00
Peinthor Rene
50731cd730 csvexport: streaming export to csv 2014-10-03 22:15:20 +02:00
Peinthor Rene
5713bc9a07 edittabledlg: allow custom types to be entered
also changed the default key shortcut to CTRL+ENTER
2014-09-27 09:51:20 +02:00
Justin Clift
6195896a6f Merge pull request #101 from justinclift/renamev2
Renamed project to "DB Browser for SQLite"
2014-09-23 00:01:54 +01:00
Peinthor Rene
594ea38420 Fix insert on integer PK fields with not null
Moved the emptyinsertstmt into DBBrowserDB class
to be able to query the database for values.
2014-09-21 20:45:12 +02:00
Justin Clift
05207b0b9f Renamed project to "DB Browser for SQLite" 2014-09-21 11:14:39 +01:00
Peinthor Rene
c615e9ac46 filters: add missing file commit for 57d086fbf2 2014-09-19 20:54:12 +02:00
Peinthor Rene
57d086fbf2 filters: don't clear filters on refresh 2014-09-19 18:27:40 +02:00
Peinthor Rene
0031c0723f tests: fix tests to run without x server 2014-09-18 08:05:45 +02:00
Peinthor Rene
98ab683662 tests: fix tests to run without x server 2014-09-18 08:01:04 +02:00
Martin Kleusberg
847ad46424 Enable version check for MacOS X 2014-09-16 20:04:46 +02:00
Martin Kleusberg
b2532686a9 Fix build on Qt 4 (hopefully) after 6c52ac736 2014-09-16 19:41:07 +02:00
Martin Kleusberg
75487111ba Silence some warning
Closes #102.
2014-09-16 19:20:43 +02:00
Martin Kleusberg
6c52ac7368 Add menu item to allow attaching other databases
Add a new menu option which allows attaching other databases. Doing so
by running the SQL code by yourself using the Execute SQL tab won't work
because the SQL tab creates a restorepoint and attaching databases while
being in a transaction is not allowed.

Note that this commit misses quite a few features: In case of name
conflicts the UI may break, there is no way to tell which databases have
been attached and the attached databases are not stored in the project
files.

See issue #100.
2014-09-16 19:19:00 +02:00
Peinthor Rene
cf33f3054e sqlite: Allow opening of databases with custom collations 2014-09-13 20:43:32 +02:00
Martin Kleusberg
c7c7774031 CreateIndexDialog: Don't allow creating indices on views
Don't suggest views in the table field of the create index dialog but
only show actual tables. There is no such thing as indices for views.
2014-09-08 14:22:54 +02:00
Martin Kleusberg
c0d48604f8 Small optimisation when inserting rows 2014-09-07 12:32:16 +02:00
Peinthor Rene
be01724da8 importcsv: fix compile on clang 2014-09-05 19:59:14 +02:00
Martin Kleusberg
942b73aab0 csv: Make import a little faster
No need to update the progress window after each row. It's only really
visible for large files anyway where a single row doesn't matter that
much in terms of progress.

Also fix a compiler warning.
2014-09-05 15:00:52 +02:00
Peinthor Rene
12a85f42e1 importcsv: auto add null fields if they don't have the correct column count
Also improve the error message on import errors
2014-09-05 13:50:43 +02:00
Peinthor Rene
90b40568b6 importcsv: update preview if trim fields was toggled 2014-09-05 13:04:15 +02:00
Martin Kleusberg
572630197c Fix Table::emptyInsertStmt for NOT NULL fields with default value
See issue #97.
2014-09-04 20:50:15 +02:00
Peinthor Rene
9682d34ca7 execsql: use the correct statement length 2014-09-04 20:33:48 +02:00
Peinthor Rene
1f6fe11560 sqlitemodel: fix select statements with limit/offset using expressions 2014-09-04 19:46:11 +02:00
Peinthor Rene
dc3ca09e12 fix clang warnings 2014-09-04 19:07:12 +02:00
Peinthor Rene
9bef8a8f58 importcsv: Save last used settings and add a trim fields option 2014-09-03 08:28:30 +02:00
Peinthor Rene
04e08cb6d1 trans: add french translation to build process 2014-09-02 18:18:34 +02:00
Peinthor Rene
db74913d91 Merge pull request #92 from justinclift/french
Initial French translation from Michel VERET
2014-09-02 18:11:14 +02:00
Peinthor Rene
b2533f70bb qmake: add csvparser 2014-09-02 18:10:26 +02:00
Peinthor Rene
97e2025cc9 cvsparser: Newly implemented CSV Parser
Moved parser into it's own class
This parser now proper supports new lines in quoted text
and returns a QVector<QStringList> result.
2014-09-02 18:05:04 +02:00
Michel VERET
16caa9a42f Initial French translation 2014-09-02 13:57:23 +01:00
Martin Kleusberg
b87992c8fb Clean up the DBBrowserDB class a bit 2014-08-31 16:10:01 +02:00
Martin Kleusberg
03879d93f0 ImportCsvDialog: Allow other file encoding than UTF-8
Add a combobox and a text field for choosing a different encoding of the
input file than the default UTF-8.
2014-08-31 13:10:25 +02:00
Martin Kleusberg
cf62b78a1e Grammar: 'NOT' is not a valid column name 2014-08-31 12:30:37 +02:00
Martin Kleusberg
9b8a2e09ae Merge pull request #82 from manisandro/test_fixes
Test fixes
2014-08-31 12:19:42 +02:00
Justin Clift
d39ba2947b Renamed application to Database Browser for SQLite
Hopefully this will reduce the misdirected support calls to Hwaci :)
2014-08-27 23:14:16 +01:00
Sandro Mani
27b6bef37d Fix bad test 2014-08-27 19:04:38 +02:00