Commit graph

478 commits

Author SHA1 Message Date
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
cfc218c43b Added to functions to Pgsql::Result to help in doing smart things based on a result.
- ftable, return from which table the column in the result originates
- ftableCol, returns the column number within that table (attnum)
Ofcourse columns can also be expressions in which case these functions return InvalidOid and 0.
2018-11-10 11:36:35 +01:00
eelke
f629e48a85 Position of error marks is adjusted for selection.
Close: #20
2018-11-10 10:59:52 +01:00
Eelke Klein
b0718258c9 Merge branch 'safely-store-passwords' into 'master'
Safely store passwords

See merge request eelke/pgLab!4
2018-11-10 06:50:10 +00: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
6b9b602c64 Replaced old PasswordManager code with code using Botan's new PSK_Database
This greatly reduces the amount of encryption related code required. Thought
we still have todo our own key strenthening but this also is easier with Botan::PasswordHash.
2018-11-04 11:24:13 +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
eefcb8fd51 Add (inherited) to tablespace name when table is using the default tablespace set for the database. 2018-10-07 20:57:52 +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
446923ebaf Merge branch 'gen-code-for-query'
# Conflicts:
#	pglablib/pglablib.pro
2018-09-23 10:44:28 +02:00
eelke
7c7e72ae14 pg_trigger 2018-09-23 10:43:32 +02:00
Eelke Klein
ae86fef2b4 Merge branch 'gen-code-for-query' into 'master'
Gen code for query

See merge request eelke/pgLab!3
2018-09-23 08:38:07 +00:00
Eelke Klein
bab75d1671 Merge branch 'cherry-pick-da45929b' into 'master'
Fix SqlLexer test

See merge request eelke/pgLab!2
2018-09-21 09:43:46 +00:00
eelke
5a2e28b6d9 Fix SqlLexer test
(cherry picked from commit da45929b12)
2018-09-21 09:43:23 +00:00
eelke
092ed67d5e Working on generating string literals for inclusion in generated code. 2018-09-21 11:41:20 +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
0ba632afd1 The getAsArray variation that uses a default value for NULL elements crashed when the
array value itself was NULL.

Choosen to return without error adding zero elements to the list. If you really need strict NULL handling do this
using the other functions possibly checking for null before hand to choose other code path.
2018-09-19 08:45:01 +02:00
eelke
8d3bddfa1e Moved implementations from header to cpp. 2018-09-19 08:25:58 +02:00
eelke
e4ccd93b09 Better support for boost::optional in database layer. 2018-09-19 08:25:23 +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
daf9536bed Moved typemapping test code to its own unit so it is clearer that the tests exist 2018-09-18 07:45:49 +02:00
eelke
c13bbde2e4 Put the FormatToStream function in its own compilation unit as it might
be useful for other things to.
2018-09-17 15:43:26 +02:00
eelke
22bad8fb22 Added name mangling tests. 2018-09-17 15:41:47 +02:00
eelke
8f4845d4d2 Lot of code for generating code. Working on unit tests. 2018-09-09 21:04:23 +02:00
eelke
da45929b12 Fix SqlLexer test 2018-09-09 16:20:30 +02:00
Eelke Klein
425f4eccbe Merge branch 'flexible-models' into 'master'
Flexible models

See merge request eelke/pgLab!1
2018-09-02 10:30:30 +00: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
5b20f900fc Sketched rough parser code construction including some SQL AST classes. 2018-06-19 19:52:56 +02:00
eelke
f3898599fd design docs 2018-05-20 13:44:04 +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
8cb1d6eab3 Permission denied errors are now being ignored while reading the system catalog.
Other parts of the program will have to cope with the fact that not all data will
be available.

Close #4
2018-04-21 10:50:04 +02:00