Commit graph

131 commits

Author SHA1 Message Date
eelke
a0ba9b894f Improve construction of out Parser class. 2022-04-03 12:30:23 +02:00
eelke
fbbe832a05 Start of new ANTLR4 based parser.
Very simple tests pass.
2022-04-03 12:27:35 +02:00
eelke
14b5293dea refactor table sql generation 2022-01-21 18:53:47 +01:00
eelke
3158a4364b Show SQL for database
Also improvements to the SQL for tables and views.
2022-01-20 20:13:56 +01:00
eelke
b5a706a2a2 lazy load the database sizes only when needed by the server inspector. 2022-01-19 19:10:05 +01:00
eelke
39195153cd Retrieve tables sizes asynchronously when opening the catalog. 2022-01-18 18:45:14 +01:00
eelke
87cfb84997 Make saving of the entered password work to.toStdString
Also when testing a preexisting connection config it will now decode a potential stored password.
2021-07-04 19:33:06 +02:00
eelke
c00a0452d1 Added ability to test the connection in the dialog where the connection details are entered. 2021-07-04 16:45:50 +02:00
eelke
45795333f2 Generate COMMENT IS statements for columns 2021-07-02 20:42:32 +02:00
eelke
97b24a8bf3 fix must explicitly specify table with oid for older pg versions 2021-04-15 16:27:48 +02:00
eelke
5a70749308 leave out database sizes for databases the user cannot connect to
this prevents permissions errors.
2021-04-14 19:40:07 +02:00
eelke
fd5ad9bbf0 On the list of indexes of a table show which were created as part of the creation of a constraint
The explicit column is true when the index was manually created
In SQL only a comment is given that the index was implicitly created
2021-04-11 07:56:37 +02:00
eelke
d12fb60af8 When exporting data add a header row 2021-04-10 09:48:48 +02:00
eelke
4c175d8c2c Added page with the types (no details yet) 2021-04-01 14:58:42 +02:00
eelke
bdef76ed8a Fix errors on PG 9.5 en 9.6 (maybe other versions to)
Closes #68
2021-04-01 14:55:20 +02:00
eelke
f21a59e030 Display comments in the list of databases 2021-03-11 06:59:31 +01:00
eelke
2724586f4e Server window database tab tweaks
- Encoding as string instead of id
- Tablespace name instead of id
- Database list sorting enabled
- Database size
2021-03-10 20:49:03 +01:00
eelke
11459e1e12 Show sizes
table, index, toast and total size per Table
size of each index
2021-03-10 19:06:40 +01:00
eelke
d6aeef492d comments on columns
Show the comments in the list of columns of a table.
Generate SQL to set them.
2021-03-08 17:23:34 +01:00
eelke
9d58af8cd2 comments on tables
Show them in the list of tables.
Genereate SQL to set the comment.
2021-03-08 16:59:13 +01:00
eelke
7fbc828326 misc stuff 2021-03-06 13:15:17 +01:00
eelke
423043d431 Qt6 migration 2021-03-06 13:13:31 +01:00
eelke
87553b2554 fix missing typmod in generated sql
ie the max length of a varchar or the scale and precision of a numeric

closes #66
2020-10-15 19:21:44 +02:00
eelke
2faedca137 fix missing when condition
closes #65

Most likely didn't work with postgresql 11 and higher
2020-10-15 19:14:03 +02:00
eelke
7734661d26 missing includes
technically it was wrong all the time but it only showed up with newer visual c++ compiler.
2020-10-15 19:12:11 +02:00
eelke
adb44fc157 THe QueryTool now reconnects when the connection is lost. 2020-04-04 07:49:44 +02:00
eelke
b87f587a40 ASyncDBConnectionThread now reports back when it looses the connection 2020-04-04 07:34:31 +02:00
eelke
d6709a1dea hash(QString) is now defined by Qt 2020-04-04 07:34:06 +02:00
eelke
23165d77c8 Better handling of empty query's. 2019-12-18 19:35:17 +01:00
eelke
e53b85bd86 Improved formatting of generated table sql
- Removed empty line before first column
- The follow up lines of fkey's are indented
- The closing parentheses is now on a new line
2019-12-01 07:09:18 +01:00
eelke
2c2253f75e Use (BIG)SERIAL in generated SQL when this was used when column
originally defined.

This is recognized by the fact that the column has a dependency on a
sequence. For columns that happen to have a default which uses a pre
exising sequence the dependency is the other way around.
2019-12-01 06:40:11 +01:00
eelke
ec8cec105f Fix crash when query in query tab returns error 2019-11-20 19:18:51 +01:00
eelke
8dd13d103e Added dependants tab to table page
Retrieves all foreignkeys pointing to the current table
and shows the tables they are foreignkeys of.
2019-11-17 10:27:11 +01:00
eelke
b90df1cd77 Correctly handle stop request during async connect. 2019-11-09 12:56:02 +01:00
eelke
2c9cda990d The socket should be retrieved within the loop as it is possible
that the socket handle changes.
2019-11-06 20:16:15 +01:00
eelke
6bb5525d5e Switched away from boost::asio as it doesn't play well with libpq 2019-11-06 20:03:27 +01:00
eelke
05bca069e3 Fix escaping of special chars for copyAsCString 2019-11-02 14:54:55 +01:00
eelke
5f2857f12a Fix crashes from accessing invalid pointers. 2019-11-02 14:28:48 +01:00
eelke
ead3ce8a8a Show view definition 2019-10-26 13:13:58 +02:00
eelke
60d8f36328 poc Add support for reloading the catalog
Reload works and the column page reacts correctly. Others to be checked
and fixed.
2019-10-06 13:52:45 +02:00
eelke
83122e89df fix: comparison that should have been assignment
Didn't cause any bugs because the state was not used after that point
however it would have cause issues when that changed later.
2019-10-06 09:39:11 +02:00
eelke
4ea388cad7 Merge branch 'master' of ssh://git@gitlab.com:/eelke/pgLab.git 2019-10-06 09:34:45 +02:00
eelke
09d5461d01 Seperate event types in the trigger definition with OR 2019-10-05 08:55:02 +02:00
eelke
082293e58a Switched ConnectionConfig to QString from std::string to fit better into Qt framework 2019-09-16 19:24:39 +02:00
eelke
bcfd82c27d Fix crash when starting to add connection.
Caused by uninitialized variable. Commit contains some minor style fixes also.
2019-09-02 16:33:13 +02:00
eelke
d489f11e52 Store encrypted passwords with connections.
Closes #22 as encrypted password is now deleted as part of the connection record.
2019-09-01 14:07:58 +02:00
eelke
b3a98f6dc0 Most of functionality for connections in tree works now. Old list largely removed. 2019-08-27 20:12:00 +02:00
eelke
8840d3bcbb Basic version of ConnectionTreeModel is working. 2019-08-25 15:33:51 +02:00
eelke
b09e8a6d4b ConnectionManager overhaul
- connection settings are now changed by seperate component currently called in a seperate window
- old settings pane on the right of the connections had been removed
- new edit config button added between new connection and remove connection
2019-08-24 20:47:32 +02:00
eelke
b939916b07 Fix incorrect ALTER TABLE statement for columns in the instepctor.
Was caused by incorrect condition for determining the use of IDENTITY.
2019-08-19 19:44:07 +02:00