Commit Graph

750 Commits

Author SHA1 Message Date
Peinthor Rene
0df6148afe unittest: add test for literalvalue in default constraint 2014-07-10 07:30:25 +02:00
Peinthor Rene
f3a2a74953 grammar: fix missing literalvalues in default constraint 2014-07-10 07:30:05 +02:00
Peinthor Rene
6705e8c9f2 show real insert data after insert a new row
After the insert statement the inserted row
will be fetched and shown in the browse table.
2014-07-10 00:33:41 +02:00
Peinthor Rene
00ae461dff add a getRow function to retrieve rowdata by rowid 2014-07-10 00:31:45 +02:00
Martin Kleusberg
a6a735ed24 Remove link to old website from Readme file
Remove the link to the old project website from the Readme file since that page just redirects to our new one anyway.
2014-07-07 18:35:51 +02:00
Martin Kleusberg
bee4320236 Add 3.2 release to readme file 2014-07-06 23:44:03 +02:00
Martin Kleusberg
a00e2b184d Announce new release 2014-07-06 23:42:41 +02:00
Peinthor Rene
14757544b7 Merge pull request #44 from justinclift/master
Added unit test compile and run instructions to BUILDING.md
2014-07-06 10:11:48 +02:00
Justin Clift
72ee0ce192 Added unit test compile and run instructions to BUILDING.md 2014-07-06 09:07:02 +01:00
Peinthor Rene
968c12ae7c cmake/unit: fix incorrect antlr include path 2014-07-06 09:45:11 +02:00
Peinthor Rene
517fc1182e cmake: avoid long lines in cmake file 2014-07-06 09:34:54 +02:00
Peinthor Rene
f2658958ce unittest: add a check for not exists 2014-07-05 15:16: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
Peinthor Rene
e1ea78fdda grammar: add tests for like operator and between 2014-06-25 19:20:58 +02:00
Peinthor Rene
dd85b16660 grammar: cleanup expr and fix between suffix expression 2014-06-25 19:20:40 +02:00
Martin Kleusberg
d85672511c Grammar: Fix parsing of NOT IN/GLOB/MATCH/REGEXP constraints
See issue #40.
2014-06-23 12:37:09 +02:00
Justin Clift
9fb75d181f Ensure the Homebrew version of SQLite3 is found 2014-06-23 01:05:00 +01:00
Martin Kleusberg
dca664270f MainWindow: Make it possible to cancel closing of database file
When closing the database, either by using the menu item or by closing
the window, the user is asked whether the changes he made shall be
saved or not. Add a third button to this message box which makes it
possible to cancel the action.
2014-06-20 13:03:23 +02:00
Martin Kleusberg
3da0d36463 Tests: Make sure all unit tests pass
Two unit tests where failing because of missing spaces in the expected
result string.
2014-06-20 12:51:56 +02:00
Martin Kleusberg
980f42d200 Tests: Add unit test for CHECK NOT LIKE constraint
Add a unit test for the grammar fix in
9cb0614ecf.
2014-06-20 12:50:30 +02:00
Martin Kleusberg
9cb0614ecf Grammar: Parse NOT LIKE constraints correctly
Parse column constraints with a 'NOT LIKE' expression correctly. For
example in a table definition like this:
CREATE TABLE not_working(
    value TEXT CONSTRAINT "value" CHECK(value NOT LIKE "prefix%")
);

This fixes issue #40.
2014-06-20 12:47:20 +02:00
Peinthor Rene
682561fbb9 editdialog: accept shortcut for CTRL+Enter 2014-06-19 16:08:44 +02:00
Martin Kleusberg
2136813bd6 MainWindow: Add Ctrl+Return shortcut for executing SQL and add tooltips
Add the Ctrl+Return shortcut for executing the current SQL again. This
needs to be done using C++ code instead of setting it in Qt Designer
because setting multiple shortcuts in the latter means defining a key
sequence row.

Also add the keyboard shortcuts to the tooltips of the buttons as they
didn't appear anywhere in the program.
2014-06-14 13:51:12 +02:00
Peinthor Rene
651e3bf146 edittable dialog: add splitter and better default size
I added a splitter and set better expanding properties
2014-06-13 18:14:09 +02:00
Peinthor Rene
25fe80f5f9 remove Ctrl+Return shortcut from executing sql
somehow neither F5 nor Ctrl+Return would work in that combination
2014-06-13 18:02:17 +02:00
Martin Kleusberg
f1e5502d50 Fix bug in filter function when havin multiple filters
Since commit 707323067d there has been a
bug in the SqliteTableModel::setQuery method which rendered the filters
useless when using them on multiple columns: Because this method is
called whenever a filter value is changed and because it deleted the
internal representation of the filters all filters except the one last
modified were deleted but still shown in the UI.
2014-06-12 19:54:09 +02:00
Martin Kleusberg
2b65bbcea2 EditDialog: Fix text editor when NULL chars are typed in hex editor
When using the hex editor widget of the Edit Dialog to insert a NULL
character and then changing to the text editor without saving and
reopening the window first lead to the text being truncated at the NULL
character.
2014-06-12 18:53:53 +02:00
Martin Kleusberg
b407704959 EditDialog: Use Monospace font in text editor 2014-06-12 18:51:23 +02:00
Peinthor Rene
f246ddde1e correctly extract check expression from AST 2014-06-11 22:48:51 +02:00
Peinthor Rene
55d8c9f9d8 add a test with create table with IN 2014-06-11 22:48:51 +02:00
Peinthor Rene
b02b36b2a2 fix create table statements with IN operator
fixes issue #34
IN wasn't added to the token list and not enabled in the suffix expression
as this gives a parser generator warning, because of an ambiguity with IN as an operator
we stick with the warning right now
2014-06-11 22:48:51 +02:00
Martin Kleusberg
1e787b4d22 sqbpro: Allow relative database file paths
When the path to the database file given in a project file doesn't exist
try parsing it relative to the path of the loaded project file. This
makes it possible to move project and database file around together
without need to manually correct the path in the project file.

See #36.
2014-06-11 21:01:06 +02:00
Martin Kleusberg
daf12d413c Remove unnecessary overloaded function 2014-06-08 12:48:53 +02:00
Martin Kleusberg
a9310b499b Change the icon path in our desktop file to a more sensible one 2014-06-07 13:45:32 +02:00
Martin Kleusberg
210207d135 MacOS: Update plist file to include project files as well 2014-06-07 13:41:02 +02:00
Martin Kleusberg
7139ad0086 Show temporary tables and views in Structure and Browse tabs
Also show temporary tables in the Database Structure and the Browse Data
tabs as well as in the export dialogs etc.
2014-06-07 13:38:24 +02:00
Martin Kleusberg
8c8187740d MainWindow: Increase default size, tabify docks by default
Increase the default size of the main window a bit.

Move the SQL log dock to the right side and tabify it with the plot
dock. This way there is much more space for actual information by
default.

The idea behind both changes is to make it easier for first time users
to find their way around and offer them a more appropriate window layout
for the usual tasks. The layout is still entirely configurable and
non-first-time users are not affected at all.
2014-06-07 00:14:50 +02:00
Martin Kleusberg
62622ae8e8 Add support for basic project files
This add support for saving and loading of SQLiteBrowser project files.
As of now these files contain a reference to the used database file,
store some window and widget settings as well as the content of the SQL
tabs.

Note that while working this is a first draft only. Especially the
parsing code still might contain a bug or two and there is a lot more
information to be added to these files later (like filters, plot
settings, etc.).

Also note that the main intention behind these project files was to make
the life of users easier while not getting into the way of those who don't
need them. The program still remains a database browser and doesn't
become a visual database studio thing.
2014-06-06 23:32:35 +02:00
Martin Kleusberg
6e5c98b653 Grammar: Allow 'NULL' constraints
Allow NULL constraints in a column definition when parsing a CREATE
TABLE statement. Before this only NOT NULL constraints were parsed
correctly even though NULL is proper SQL as well - it's just a redundant
information.
2014-06-04 20:50:08 +02:00
Martin Kleusberg
5e1169b43d MainWindow: Keep column widths for each table in Browse Data tab
Store the column widths of the table view widget for each table/view
individually and restore them when changing back to the table/view.
2014-06-01 19:47:20 +02:00
Martin Kleusberg
2aaf7345ff Reduce scope of some variables 2014-05-30 19:13:43 +02:00
Peinthor Rene
040be65489 fix memory leak 2014-05-30 18:59:59 +02:00
Martin Kleusberg
f8b2dd0ee3 ExportCsvDialog: Add option to define custom quote/separator chars
Make it possible to use other quote and separator characters than those
predefined in the respective combo boxes when exporting a CSV file.

See issue #23.
2014-05-30 18:11:49 +02:00
Martin Kleusberg
55435e2703 ImportCsvDialog: Add options to define custom quote/separator chars
Make it possible to use other quote and separator characters than those
predefined in the respective combo boxes when importing a CSV file.

See issue #23.
2014-05-30 17:54:13 +02:00
Martin Kleusberg
190630641c Update BUILDING instructions
See issue #29.
2014-05-29 21:18:11 +02:00
Martin Kleusberg
2e6d9d6a25 Readme: Qt3support is not needed for compilation
See issue #31.
2014-05-29 21:12:44 +02:00
Martin Kleusberg
a209e840b8 EditTableDialog: Also update the SQL when type is automatically changed
Also update the internal table representation and thus the SQL string at
the bottom of the window when the type of a column is changed
automatically, e.g. when the AI checkbox is clicked.

Closes #24.
2014-05-27 20:13:18 +02:00
Martin Kleusberg
2fcb131c25 MainWindow: Add keyboard shortcut for 'Write Changes' action
Closes #22.
2014-05-27 09:56:02 +02:00
Peinthor Rene
e80aab1c83 Merge pull request #21 from Shouqun/highdpi-text
Add High DPI text rendering support for Mac OSX.
2014-05-26 11:12:55 +02:00
Shouqun Liu
ccfdf55840 Add High DPI text rendering support for Mac OSX.
For text render, adding 'NSHighResolutionCapable' key into plist fixes
high-dpi display
2014-05-26 16:26:31 +08:00