Previously, it was running the query at the current cursor position, but that
proved to be confusing. Now, it runs the SQL that contains the start of the
current line. So having:
SELECT * FROM table1;
SELECT * FROM table2;
and the cursor either before the first semicolon, either after it, the first
SQL will be run, and not the second one as before.
If the last character was a semicolon and the cursor was placed after
it, the Execute current line action didn't execute anything. It now
execute the last SQL found
- the table now scroll to the bottom so the newly inserted field will be
in view
- the first column (Name) is now auto-selected for easy text update
- related to #769
In 11bff0ded8 a settings option was
introduced in order to limit the number of characters loaded into each
cell in the Browse Data tab.
However, when editing the cell you wouldn't see the full data, i.e.
rendering the data incomplete and/or cropping it when it's being edited
anyway. This commit fixes this behaviour: when editing a cell (either
in-line or using the edit dialog/dock) the full data for this particular
cell is loaded and shown.
We used to reload the database schema whenever it might have been
changed and the latest version was required. For example: when the user
switches to the Structure tab we need the current schema; so we just
reloaded it to be safe - it might have been changed in the Execute SQL
tab or wherever.
With this commit we don't reload the database schema anymore when an
up-to-date version is needed but instead when it was changed by the
application. So in the example above it's not reloaded at all anymore.
Only if and when the user would execute some structure changing SQL it
would be reloaded.
Benefits:
- Better performance
- State of the structure tree view isn't lost as frequently
- Structure tree view gets updated when changing the structure in the
Execute SQL tab
Downsides:
- Less error proof (testing!)
- No 'automatic' updates when the db is changed by an external
application.
Any suggestions welcome!