Commit Graph

472 Commits

Author SHA1 Message Date
Martin Kleusberg
d2f1db8457 SyntaxHighlighter: Make keyword list a bit easier to read 2013-05-16 21:05:06 +02:00
Martin Kleusberg
04b431d3f1 Add rough implementation of some command line options
Support some additional command line options for opening and running SQL
scripts directly.

Don't just take the first argument as a SQLite database to open as it
could be a command line option - Qt and X11 have some default ones.
2013-05-14 18:12:11 +02:00
Martin Kleusberg
6ba0cd76c0 Open database correctly when importing into a new file
When doing a SQL import into a new database file open this file
correctly after the import.
2013-05-10 13:29:49 +02:00
Martin Kleusberg
11a2d321d8 Don't set dirty flag after SQL import to new DB file
When creating a new database to import a SQL file into don't set the
dirty flag.
2013-05-10 13:21:52 +02:00
Martin Kleusberg
729773d345 Fix SQL import file name logic
Don't ask the user wether to create a new DB or use the current one if
no database is opened anyway.

Don't start the import when the save dialog was cancelled.
2013-05-10 13:15:06 +02:00
Martin Kleusberg
5a3658cad2 DBBrowserDB: Show progress dialog in executeMultiSQL()
Show a progress dialog when executing multiple SQL statements. This
mainly affects the SQL import.
2013-05-10 12:58:46 +02:00
Martin Kleusberg
5536c13a06 DBBrowserDB: Export BLOBs correctly
When creating an SQL dump also export BLOB data correctly.
2013-05-09 18:47:32 +02:00
Martin Kleusberg
cf0a0339eb MainWindow: Replace icon for the SQL log window
Replace the icon used in the action for toggling the SQL log
dock/window.
You might need to delete your makefiles before building this.
2013-05-09 18:34:33 +02:00
Martin Kleusberg
90d423c66f DBBrowserDB: Don't export sqlite_stat1 table when dumping DB
When creating a SQL dump of the database don't export the sqlite_stat1
table as it's impossible to import it later because SQLite generates it
automatically.
2013-05-09 18:18:18 +02:00
Martin Kleusberg
1c19defbe9 ExtendedTableWidget: Always scroll per pixel horizonzally
Always use per pixel scrolling when scrolling in horizontal direction.
This changes the scrolling in the SqlExecutionArea and makes some
settings in the MainWindow dispensable.
2013-05-09 18:05:25 +02:00
Martin Kleusberg
1e89d1914e Update .desktop file 2013-05-09 14:19:20 +02:00
Martin Kleusberg
5b9d5cc40b Remove some debug messages. Change some error messages..
Remove some useless debug messages, e.g. because they just print an SQL
string which you can see in the SQL log window anyway.

Change some "critical" errors messages to just warning. No sense in
printing a critical error message when the program can handle the
problem by itself.
2013-05-08 22:03:04 +02:00
Martin Kleusberg
cf72bfbb1c MainWindow: Improve SQL tab behaviour
Don't allow opening and saving when no database file is opened.

Close all tabs when the database is closed.
2013-05-08 21:50:35 +02:00
Martin Kleusberg
f3f340f83e Add single step execution to the SQL tab
Add a new action to allow the execution of the SQL statement in the
current line. This also supports multi-line SQL statement.
2013-05-08 21:44:08 +02:00
Martin Kleusberg
a39325830c MainWindow: Don't use bold print for write and revert actions
At least for me it looks a bit odd to use a bold font for these actions.
They are not that much more important than the other ones.
2013-05-08 21:19:02 +02:00
Martin Kleusberg
74bdfee384 SqliteTableModel: Return from setData() if value hasn't changed
Don't do any changes to the database if the value hasn't actually
changed. This avoids settings the dirty flag when there is no need to.
2013-05-07 20:51:07 +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
09afe637c6 MainWindow: Don't open new SQL tab when the current one is empty
When opening an SQL file don't open a new tab for it when the current
one is completely empty and could be used just as well.
2013-05-07 20:33:04 +02:00
Martin Kleusberg
d6ed7e932f Show error message when changing table data fails
Give the user an error message when setting new data for a cell fails.
This is especially useful when the problem is caused by foreign key
constraints.
2013-05-07 20:25:35 +02:00
Martin Kleusberg
432180ec03 SqlTextEdit: Show line numbers
Show line numbers in the SqlTextEdit widget. This code is based on the
CodeEditor example from the Qt documentation.
2013-05-07 20:16:17 +02:00
Martin Kleusberg
61ee8b4871 MainWindow: Fix menu entry for log dock widget
Simplify the log window handling a little bit.

Fix a bug that caused the log window to disappear when the window was
minimised.
2013-05-06 19:11:06 +02:00
Martin Kleusberg
ef5f88cc70 SqlExecutionArea: Implement save as view function
Add a menu item to allow saving the results of a query a new view.
2013-05-06 18:59:46 +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
e548becda1 SqlExecutionArea: Use Qt Designer for layout design 2013-05-06 18:17:59 +02:00
Martin Kleusberg
16d533999d Make result table in SQL tab non-editable 2013-05-06 17:35:39 +02:00
Martin Kleusberg
65b1adf845 Also load extensions when creating a new database
Also load the default extensions when creating a new database.

When opening a database load the extensions before reading the structure
and the pragmas because the extensions could affect those.
2013-05-04 21:27:36 +02:00
Martin Kleusberg
0de7ff8564 SqlTextEdit: Highlight current line 2013-05-04 21:10:50 +02:00
Peinthor Rene
a95d33e5ee add unittest for foreign key parser problem 2013-05-03 21:12:56 +02:00
Peinthor Rene
0861f51897 updated sqlite parser 2013-05-03 21:11:21 +02:00
Peinthor Rene
32ba32bbae add missing tokens
I hope I got all now
2013-05-03 21:10:10 +02:00
Martin Kleusberg
33d3dcdc16 Fix extension loading 2013-05-03 16:11:35 +02:00
Martin Kleusberg
93ebc68436 Update README 2013-05-03 16:04:09 +02:00
Martin Kleusberg
2d8cad27eb PreferencesDialog: Add new tab for extension loading
Add new settings to preferences dialog for automated loading of
extensions for all databases.
2013-05-03 16:01:52 +02:00
Martin Kleusberg
e36b17a485 Add support for SQLite extension loading
Enable the extension support in SQLite.

Add code to allow loading of extension.

Add menu entry for easy extension loading.
2013-05-03 15:26:34 +02:00
Martin Kleusberg
a031386edd Fix filter row SQL generation to always produce correct SQL statements
Always produce correct SQL statements, even when using an incomplete
comparison operator.

Fix escaping to make it possible to search for '-charachters.
2013-05-03 13:34:26 +02:00
Martin Kleusberg
9d8cfaa8cf Remove filter row when closing database file
Remove the filter row in the browse tab when closing the database.
Before this it would remain visible leading to a crash when using it.
2013-05-03 13:20:20 +02:00
Martin Kleusberg
971a4051db Update README 2013-05-03 12:17:46 +02:00
Martin Kleusberg
d52a6be86f Add buttons to open and save SQL files to SQL tab in main window 2013-05-03 12:13:17 +02:00
Martin Kleusberg
57b44b891d Add auto completion in SQL editor again 2013-05-03 11:47:53 +02:00
Martin Kleusberg
23d929ec0e First version of multiple SQL scripts support in main window
Allow multiple SQL scripts in different tabs in the SQL tab of the main
window.

Auto completion support is still missing, the rest is working fine.
2013-05-02 21:15:23 +02:00
Martin Kleusberg
909d435ec6 Allow inline editing in browse data tab
Make it possible to edit records directly in the table view without
having to open the edit dialog.
2013-05-02 17:36:16 +02:00
Martin Kleusberg
b3465546bb SqliteTableModel: Remove dependency from PreferencesDialog 2013-04-26 13:55:29 +02:00
Martin Kleusberg
7799ef1865 Make number of rows to prefetch when doing lazy population configuarable
Add a new option to the settings dialog to allow changing the number of
rows to get at a time.
2013-04-24 20:25:36 +02:00
Martin Kleusberg
3d5d7fabe0 Simplify version.sh script
The else branch is not needed - and the variable name in it is
misspelled anyway ;)
2013-04-21 12:41:54 +02:00
Peinthor Rene
a1d4b6a38e belongs to previous commit, my --amend failed 2013-04-20 17:25:53 +02:00
Peinthor Rene
6075f1d464 set lib paths correctly for windows 2013-04-20 17:23:42 +02:00
Peinthor Rene
e67260df03 fix possible error if gen_versions.h does not exists, happens on my msys 2013-04-20 17:13:29 +02:00
Martin Kleusberg
768ae28548 Exit in DB create script when there was no file name specified
Make sure the script exits in a clean way when no output file was
specified.

Also some more random cleaning in SqliteDB here...
2013-04-19 20:12:35 +02:00
Martin Kleusberg
b9d0497c99 More cleanup in SqliteDB 2013-04-19 20:00:59 +02:00
Martin Kleusberg
b4a64d6208 Clean up SQLiteDB
Much of the code in there is not really needed anymore as quite a bit of
functionality has been moved to the SqliteTableModel.
2013-04-19 19:54:26 +02:00