Commit graph

261 commits

Author SHA1 Message Date
eelke
52011a9842 Updating of detail tabs besides list of tables works correctly again.
Had stopped working because the catalog now behaves a little different,
returning nullptr instead of an invalid element.
2018-11-18 20:24:27 +01:00
eelke
fcb191f2cc Overview of triggers extended with function name and arguments.
Did a lot of refactoring on the catalog to keep things clean.
2018-11-18 19:30:45 +01:00
eelke
f2639b9ea5 Link with new builds of botan
We now have seperate debug and release builds.
2018-11-17 19:33:47 +01:00
eelke
be0064f730 The codegen now can properly lookup array types.
Array type lookup failed previously because the typemapping class was
not yet receiving the list of types from the database. Fix was to pass
this data
2018-11-17 09:47:50 +01:00
eelke
287073afdc Added remember option to password dialog.
Made to remember password of password manager for given time but not completely sure
how to implement that yet.
2018-11-15 19:24:29 +01:00
eelke
f432c2aa68 bugfix: editing of table contents didn't work correctly after reloading the data
Was caused by then pending and modified rows list not being reset so they were out
of sync with the data.
2018-11-14 19:17:29 +01:00
eelke
24751f81dd Improved PasswordPromptDialog
- can now also set caption
- can set initial state of save option
- improved size and spacing
2018-11-11 12:30:53 +01:00
eelke
634345b38f In the column list show foreign key constraint 2018-11-10 13:36:36 +01:00
eelke
8836611b62 Replace dubious auto conversion with explicit conversion. 2018-11-10 11:37:17 +01:00
eelke
f629e48a85 Position of error marks is adjusted for selection.
Close: #20
2018-11-10 10:59:52 +01:00
eelke
e36924c087 Passwords are now saved in a password manager.
The password manager uses strong encryption using a key derived from the passphrase using
scrypt key strengthening algorithm. This ensures encryption is performed using a strong key
and that brute forcing the passphrase is time consuming.

If the user loses his passphrase no recovery is possible.
2018-11-08 21:50:49 +01:00
eelke
2230a4bd61 Lot of password related changes all over the place.
Password is no longer saved with the connection list.
Password is not entered along with other connection credentials.
Password is now asked for when required.
Still working on saving the password and auto retrieving it from the password manager.
2018-11-04 11:44:40 +01:00
eelke
1ae9a1151a All the detail tabs on the TablePage now update when the sort order
of the table list changes.
2018-10-21 13:47:38 +02:00
eelke
d4d8316917 Collection of minor code improvements.
Program should still behave exactly the same.
2018-10-21 13:46:58 +02:00
eelke
38ae5f50e4 Moved code from TablesPage into seperate PropetiesPage component
Clears up the TablePage and makes rhe propertypage reusable.
2018-10-20 10:58:42 +02:00
eelke
b8cfb223be Switch of wordwrap in CodeEditor and SqlCodePreview 2018-10-08 18:43:56 +02:00
eelke
2a75e86102 Added listing of triggers for selected table (not completely finished).
Used slightly different approach. This tab is fully build in source code
using subclasses to adjust behaviour of widgets for reuse in the other tabs.
Uses custom proxy model for filtering triggers for correct table and supporting
out of the box sorting by QTableView.

SqlCodePreview: QPlainTextEditor which sql highlighter and in readonly mode but allows copy.
2018-10-07 19:40:06 +02:00
eelke
0c3bb27e58 Further improvements to codegeneration the defaultcpp config is now called the PgLab
config as it is very specific to the PgLab codebase.

More hard programmed templates moved out of codebuilder to the language config.
2018-09-19 09:55:43 +02:00
eelke
780d912cd1 Adjusted project files for new boost version.
This should be handled differently the location of boost should not be baked into the project files.
2018-09-18 20:24:54 +02:00
eelke
f5145f36ed wip: codegenerator, basic widget present for showing the generated code and specifying
parameters. Some code is also generated but it is not complete yet.

minimum still required
- field assignments
- properly format and escape the query string
2018-09-18 11:54:43 +02:00
eelke
8f4845d4d2 Lot of code for generating code. Working on unit tests. 2018-09-09 21:04:23 +02:00
Eelke Klein
8b7bbec807 Flexible models 2018-09-02 10:30:30 +00:00
eelke
50cb21b6f9 The list of indexes on a table now also shows the access method (ie btree) 2018-08-25 18:11:12 +02:00
eelke
7c4f1a4752 fix: the source views for constraints and indexes are now cleared when the
model is reset as this will clear all selections.

Unfortunatly the selection model does not trigger a selectionChanged when
the model is reset.

Close #16
2018-08-05 11:57:27 +02:00
eelke
f1020ac56e Index DROP and CREATE statements are now shown.
For now the create is still single line. Either complex query is required
to get details for custom generator or we need to format after the fact.

Close #12
2018-08-05 11:27:05 +02:00
eelke
78a6666839 WIP moving actions for toolbar to module system. 2018-08-05 09:07:12 +02:00
eelke
f5e9c4b74e Added column number to list of columns of table. 2018-08-05 09:05:56 +02:00
eelke
31afc6fcbf Fix some warning 2018-08-05 09:05:24 +02:00
eelke
ec8c3ff5ec The list of tables can now be sorted by either name,schema or schema,name by clicking on the column headers. 2018-07-07 09:57:59 +02:00
eelke
4dd526f32a Icons on action supplied by the PlgPages. 2018-05-20 13:42:30 +02:00
eelke
3d516e6006 First tab at building a mechanism where tabpages can supply a list of actions that are added to the global main toolbar. 2018-05-14 20:24:41 +02:00
eelke
c2d725ec6d Ask confirmation before removing connection.
Close #5
2018-04-30 20:17:44 +02:00
eelke
d67224858d Focus query editor when opening new querytab.
Close #7
2018-04-21 14:36:33 +02:00
eelke
51d72c7f20 Can close CRUD tabs now
Close #6
2018-04-10 20:21:50 +02:00
eelke
45b7d4fcbc show location of error in gutter and as selection
Close #3
2018-04-09 21:44:00 +02:00
eelke
47ee1857cd Added a gutter and currentline highlighting to the SQL editor.
Currently gutter only shows linenumbers. Code is mostly from http://doc.qt.io/qt-5/qtwidgets-widgets-codeeditor-example.html

There is a little bit included in this commit from a first try to make toobars adept to the current tab.

Code #2
2018-04-08 09:19:32 +02:00
eelke
61645d44ac Show moer information about the indexes. 2018-04-08 09:04:38 +02:00
eelke
8c20bd6a02 Added delete support to the CRUD system. 2018-04-08 09:03:03 +02:00
eelke
36f5153091 Only allow editing of tables that have a primary key. 2018-02-18 12:10:09 +01:00
eelke
09d5c1e41a The crud now support inserting new rows 2018-02-18 08:37:59 +01:00
eelke
c51bd7594d Data in crud table wasn't shown as it was supposed to. 2018-02-18 08:32:38 +01:00
eelke
2ba68d4edc fix: editing same row only updated the view for first edit
Was programming error emplace only inserts new keys into map if key exists it fails.
Neede to use insert_or_assign to get desired behaviour.
2018-02-18 07:23:59 +01:00
eelke
628c16e2f4 Updating rows kinda works.
Blocking calls are still used.
2018-02-18 07:15:43 +01:00
eelke
ad3f605ada Some rudementary refresh support in crud tab bound to execute action (should be replaced with dynamic action list on form) 2018-02-05 22:40:17 +01:00
eelke
44326da564 Fix: boolean values from query result were always shown as true. 2018-02-05 21:47:21 +01:00
eelke
d626c19e14 Basic support for update in Crud implementation, error reporting and transfering data to modified set is still missing. 2018-02-05 21:42:54 +01:00
eelke
3fb32f1200 Couple of minor changes. 2018-01-15 13:32:18 +01:00
eelke
e1405d5370 Use PgLabItemDelegate for indexes tab. 2018-01-15 13:31:37 +01:00
eelke
07c1b63d44 Tab of crud view now shows name of the table. 2018-01-15 13:31:06 +01:00
eelke
a543ccb021 CrudTab uses new PgLabItemDelegate, no need anymore for CrudModel to inherit BaseTableModel. 2018-01-15 13:30:30 +01:00