Commit Graph

26 Commits

Author SHA1 Message Date
Martin Kleusberg
9582786237 Add dropping of URLs and text on the data browser view
See issue #441.
2015-12-19 19:02:38 +01:00
Martin Kleusberg
eaf6ff1565 Support text in different encoding in Browse Data tab
When browsing and editing a table in the Browse Data tab allow the user
to change the assumed encoding of the text in the table. We'll then try
to convert from this encoding to Unicode for display purposes and to
convert from Unicode to this encoding for editing purposes. This way the
UI and all tools will keep using Unicode while the database format is
still respected. I hope the amount conversions generated this way won't
affect the performance too much.

See issue #414.
2015-09-15 00:14:55 +02:00
Martin Kleusberg
7c1d237d9b Support alternative display formats in the Browse Data tab
This is a proof-of-concept or even a basic first implementation of a new
feature I'd like to have in DB4S which at the moment I call display
formats.

The idea here is to allow the user to change the data in the Browse Data
tab on a per column basis before displaying it. This means even though
the data is stored in format X in the database it can be shown in format
Y in the browser. This should be useful in cases where the original
format X is hard to read or just not useful in a particular case.

This first implementation allows the user to right click on the header
of a column and open a new dialog for setting the display format which
offers a (limited) list of pre-defined formats. The selected format is
then integrated into the SELECT statement which is sent to SQLite.

While it works, this draft implementation lacks a number of features.
Here are the most prominent ones I'm currently aware of:
* Data not editable (or only via the Edit Dialog) because it isn't
  transformed back yet.
* More display formats needed; maybe customizable ones, too.
* No indication in the UI for which columns a format has been set.
* Could _maybe_ be integrated into the import/export etc. for optional
  use.
2015-07-06 18:28:30 +02:00
Martin Kleusberg
39a49e33c2 Allow clicking cells with foreign key in order to jump to referenced cell
Add a tooltip to the database browser when you hover a cell with a
foreign key set in order to show the referenced table and column.

When clicking on such a cell while holding the Ctrl and Shift key (only
one of them won't work because they are for multiselection and Alt
doesn't do the trick on my system because it's just for grabbing and
moving the window) try to jump to the table and row which is referenced
in the clicked cell.

See issue #192.
2015-06-21 23:59:45 +02:00
schdub
e23b0112d4 fix: type of imported BLOB data #239 2015-04-13 20:49:15 +03:00
Peinthor Rene
1ca8ffb512 sqlitetablemode: typedef the m_data type 2015-04-10 08:53:26 +02:00
Peinthor Rene
2cadb38719 tablemodel: if our sql parser failed get column names from sqlite
This makes browsing more robust if our sqlite parser fails
we will fallback to a sqlite query to retrieve the column names
2014-08-18 18:53:16 +02:00
Martin Kleusberg
88a4caedba Fix crash when sorting one table in the Browse Tab and changing to another
Fix a crash when sorting the n-th column of a table in the Browse Tab
and then changing to a table with less than n columns.
2014-07-03 22:40:03 +02:00
Martin Kleusberg
13c3963651 SqliteTableModel: Support EXPLAIN and PRAGMA queries again
Change the approach to count the total number of rows returned by an SQL
query to also support EXPLAIN and PRAGMA statements. These failed before
because you are not allowed to put them into a COUNT query. This commit
adds the code needed to count the number of rows manually when one of
these queries is executed.
2013-06-01 14:41:25 +02:00
Martin Kleusberg
ea31c8023b SqliteTableModel: Don't show binary data in table widgets
Don't show BLOBs as binary data in table widgets, instead put a "BLOB"
text in that cell.

Also make BLOBs not editable unless you use the edit dialog.
2013-05-07 20:47:16 +02:00
Martin Kleusberg
9536e7a095 SqlExecutionArea: Support exporting result to CSV file
Add a button which allows the user to save the query results to a CSV
file.

Add some basic preparations for saving the result as a view.
2013-05-06 18:44:58 +02:00
Martin Kleusberg
b3465546bb SqliteTableModel: Remove dependency from PreferencesDialog 2013-04-26 13:55:29 +02:00
Martin Kleusberg
214a56d916 Partially revert 7073230 to fix filter row 2013-04-17 22:06:14 +02:00
Peinthor Rene
e2d75ff1cf add a check for valid querys 2013-04-15 17:35:28 +02:00
Peinthor Rene
6f3f21fbd7 increase default chunk size
this speeds up going to record 900000 significantly
2013-04-14 21:37:38 +02:00
Martin Kleusberg
ae6e452f36 SqliteTableModel: Notify view and parent class code when clearing cache
Call beginRemoveRows() and endRemoveRows() when emptying the cache. This
silences those warnings from QAbstractItemModel::endInsertRows() and
fixes a crash when exiting the program both ocurring when the data was
resorted.
2013-04-11 16:00:54 +02:00
Martin Kleusberg
1ba3169428 Fix CSV export to work with SqliteTableModel 2013-04-10 18:59:37 +02:00
Martin Kleusberg
f45b89b6c9 Fix SQL export to work with the SqliteTableModel 2013-04-10 18:51:18 +02:00
Martin Kleusberg
31bf07000b SqliteTableModel: Restore BLOB support and clean up DBSQLiteDB 2013-04-10 18:18:08 +02:00
Martin Kleusberg
44a635167d Allow different comparison operators in the new filter row
Allow other comparison methods than just the LIKE operator when using
the new filter row.
2013-04-09 19:28:21 +02:00
Martin Kleusberg
6742f5632d Add a filter row to the table view in the browse tab
Add a row of line edits between the table header and the actual content
of the table in the browse tab. Show one input widget per table column
in this row.

Add a live search which hides any table rows which do not fit to the
current filter settings.

Why add this to the parital-data-fetch branch? Because this is an
attempt to get rid of the find dialog which is broken again and not even
worth fixing. Also there is not much to break in this branch at the
moment ;)
2013-04-09 18:52:37 +02:00
Martin Kleusberg
9d02480294 SqliteTableModel: Simplify code 2013-04-07 20:49:54 +02:00
Martin Kleusberg
77cf98fd53 SqliteTableModel: Inserting and deleting rows, clean up, bug fixes
Add some basic code to support inserting and deleting rows again.

Fix a few bugs here and there.

Do some general code clean up.
2013-04-07 19:08:40 +02:00
Martin Kleusberg
3cd5792cea More improvements and fixes to the new SqliteTableModel
Change the way sorting is done to correctly sort all data even if it
hasn't been loaded completely yet.

Fix the navigation label and buttons by showing the correct information
again and fixing the validator of the input field.

Log all SQL statements executed from within the SqliteTableModel.

Silence a few warnings.
2013-04-07 17:30:35 +02:00
Martin Kleusberg
00b9f40271 SqliteTableModel: Make editing of data possible again 2013-04-06 23:12:53 +02:00
Peinthor Rene
93cce3d87f first working prototype 2013-04-06 12:22:50 +02:00