Commit graph

45 commits

Author SHA1 Message Date
eelke
6c76c70a97 The create table statement now lists the inherited tables and inherited columns are commented out. 2018-12-03 21:03:49 +01:00
eelke
498233d58c WIP: SQL for creating table and related objects 2018-11-30 18:41:38 +01:00
eelke
57217974f4 New column page
Shows SQL for columns ALTER TABLE ... [ADD|DROP] COLUMN combines a selection
of multiple columns into a single alter table.
Show collation in list of columns.

(order of columns isn't what is should be but that should maybe be fixed
by a generic column selection and ordering mechanism that knows what the
default sort should be)
2018-11-29 20:21:36 +01:00
eelke
73c4cf4790 Rework of catalog objects. Several of them are now inheriting from common
base classes that implement common functionality.
2018-11-25 19:45:06 +01:00
eelke
840af1e0a9 WIP: Added page showing list of functions.
Only list is shown, still working on details.
2018-11-25 09:06:01 +01:00
eelke
7db859737a Use catalog instead of catalogue consistently 2018-11-25 09:05:01 +01:00
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
35813ae926 Added pg_proc table to the catalog. Contains the definition of functions.
Also improved the loading code for some catalog tables.
2018-11-17 19:38:07 +01:00
eelke
791db7dd80 Change default type for generating pgLab code to QString 2018-11-17 10:16:48 +01:00
eelke
104ab5de1e Codegen now supports the database column type in the field template.
This allows for inserting it as a comment which is very useful while
tweaking your typemappings as you can see what the input was.
2018-11-17 10:14:31 +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
634345b38f In the column list show foreign key constraint 2018-11-10 13:36:36 +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
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
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
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
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 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
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
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
eelke
65c3d9f2b4 getTypeDisplayString now better handles zero oid's and oid's that are not known in the catalog.
Close #10
2018-04-21 10:23:28 +02:00
eelke
5e83094e6a Improved way sockets are closed.
Not 100% sure this is allowed by boost::asio thought a code inspection suggest it does as it is ignoring the error it gets on close.
2018-04-08 09:06:05 +02:00
eelke
61645d44ac Show moer information about the indexes. 2018-04-08 09:04:38 +02:00
eelke
628c16e2f4 Updating rows kinda works.
Blocking calls are still used.
2018-02-18 07:15:43 +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
2ba27178a2 Double clicking a table now opens a CRUD page for that table however data cannot be changed yet thought it will display an editbox. 2018-01-09 20:39:43 +01:00
eelke
abd4020ddf Decided to use signal slot mechanism
The automatic cross thread activation  is probably worth it.
2018-01-08 20:54:03 +01:00
eelke
14ab400ccb Bezig met crudmodel/tab 2018-01-08 20:45:52 +01:00
eelke
97d4e2a1a4 Created IndexModel for displaying the indexes on a table. Constraints can now show the SQL to drop and create them.
The keyword list is now directly based of the official keyword list from postgresql.
2018-01-06 21:22:22 +01:00
eelke
a99f059b70 Added list of constraints to the tables page.
Last column shows the full textual definition until I have decided on
a better way to visualize the details.
2017-12-30 13:02:40 +01:00
eelke
f4538069cb Moved several files from pglab project to pglablib 2017-12-29 10:21:10 +01:00
eelke
1fe7d3c56d . 2017-12-16 21:43:51 +01:00
eelke
ad9ed1b698 Introduced new library for pglab code which I want to unit test.
Not everything can go into core because that would result in circular dependencies between core and pgsql.
2017-12-13 18:04:10 +01:00