Commit graph

130 commits

Author SHA1 Message Date
eelke
2d962334da Added list of databases and roles.
Roles works for atleast 9.3 and up.

Reorganizing code for communicating with database.
2017-02-18 12:05:48 +01:00
eelke
8c077b3d5f Support for explain containing single runtime instead of planning and execution time. 2017-02-18 12:03:52 +01:00
eelke
3dff4dade8 Program has an icon now. 2017-02-13 19:51:57 +01:00
eelke
14891aa892 Make exe compatible with Windows XP. 2017-02-13 19:51:45 +01:00
eelke
612b524151 ServerWindow shows list of databases. 2017-02-13 19:51:19 +01:00
eelke
e71ef2e6df More case fixes of filenames. 2017-02-12 15:51:36 +01:00
eelke
20af12535e The catalogue now loads the list of databases en there is a table model that can show this data. 2017-02-12 14:03:42 +01:00
eelke
a9430bca1a Case adjustment of several files. 2017-02-12 08:22:08 +01:00
eelke
2f95c2f096 Started on window for managing the server. 2017-02-12 08:15:09 +01:00
eelke
f51105bde0 megamove 2017-02-11 08:15:01 +01:00
eelke
c2e201f813 Seperated the lexer from the syntax highlighter for automated testing. 2017-02-11 08:03:10 +01:00
eelke
254cc82116 Reorder a couple of statements. 2017-02-10 21:01:09 +01:00
eelke
8ea0cd8285 Improved parser for syntax highlighting. Also added even more keywords (all from appendix C of the postgresql docs are included now) 2017-02-09 21:54:31 +01:00
eelke
8026b5b0fa Added a bunch of SQL keywords to the syntax highlighter. 2017-02-09 18:27:17 +01:00
Eelke Klein
37e8882a3c New syntax highlighter not complete.
- Supports comments
- more efficient as it scans the text block instead of repeatedly searching throught the whole block
- type matching based on catalog (but need to add aliases manually)
- added many keywords

todo:
- heap corruption bug
- symbol stops at special char like parenthese or operator or something similar.
2017-02-07 21:39:45 +01:00
Eelke Klein
4364f427bf file rename 2017-02-06 21:41:45 +01:00
Eelke Klein
073c62048f Added export of data in CSV format. 2017-02-05 13:35:41 +01:00
Eelke Klein
df866d7b67 Copy as C string added. 2017-02-05 08:23:06 +01:00
Eelke Klein
4a2c6cc396 Miscellaneous changes. Including a copy action. 2017-02-04 11:55:49 +01:00
Eelke Klein
242f5464df Added generic copySelectionToClipboard function that takes the selection
of a model based tableview and copies the data as CSV to the clipoard.
2017-02-04 11:54:18 +01:00
Eelke Klein
798f8f51b9 Completed the implementation of the CsvWriter for use with Copy and Export. 2017-02-04 11:53:20 +01:00
Eelke Klein
7a22b4cbea Added Params class for passing query parameters seperatly from the query string. 2017-02-04 11:52:42 +01:00
Eelke Klein
468779ba38 Fixed some warnings (left some because they need more attention) 2017-02-02 07:22:54 +01:00
Eelke Klein
ccae3685ac Documentation 2017-02-02 07:18:44 +01:00
Eelke Klein
fafda5a07f dead code removal 2017-02-02 07:07:16 +01:00
Eelke Klein
fd47540ecd Removed early prototype widget. 2017-02-01 20:11:21 +01:00
Eelke Klein
5a35fa6a30 Implemented the loading of the list of types into the database catalogue. 2017-02-01 20:09:04 +01:00
Eelke Klein
43c3835350 Added some class descriptions and Doxygen config. 2017-02-01 20:00:03 +01:00
Eelke Klein
343390ff38 Opening of a window for a database is now done by the MasterController.
The ConnectionManager just passes on the action now.
2017-02-01 19:59:07 +01:00
Eelke Klein
6370050204 Introduced the MasterController as part of working on loading catalogue information.
Need a central piece to manage the catalogue data per database to prevent loading
this multiple times. MasterController is now also used to enable reopening the
connection manager from a query window after the connection manager has been closed.
2017-02-01 18:01:02 +01:00
Eelke Klein
b6d986051b Query tab will now show multiple data tabs if it get's multiple results
with tuples.
2017-01-25 06:54:21 +01:00
Eelke Klein
424cbc9e2e Started with classes for keeping track of the database schema.
Class to represent the contents of pg_type catalog table.
2017-01-25 06:53:30 +01:00
Eelke Klein
202e6e431a Stopwatch check if a label has been set before accessing it. 2017-01-25 06:51:28 +01:00
Eelke Klein
56fbd20635 Database layer now support automatic type conversion and the Result has iterator support.
This also means you can use for each to loop through a result.
2017-01-25 06:50:57 +01:00
Eelke Klein
6e852f466f The querytab now shows the elapsed time of the query using the new stopwatch class.
The old elapsedtime code from the mainwindow has been removed.
2017-01-22 08:50:41 +01:00
Eelke Klein
7f379f3b80 Moved everything associated with executing and explaining queries to querytab.
It is now possible to create multiple independent query tabs. However
somethings are currently a bit broken.
2017-01-21 18:16:57 +01:00
Eelke Klein
6c268bd774 Also added "Save copy as"
This prompts for a new filename but it keeps remembering the previous name.
2017-01-21 08:19:47 +01:00
Eelke Klein
69ac154b07 FIlename is now remembered and used by save. Save as added. 2017-01-21 08:09:12 +01:00
Eelke Klein
35932e7a8d Gives a warning when there are unsaved changes when opening a file or closing the window. 2017-01-19 17:48:44 +01:00
Eelke Klein
eb06c57141 Better result formatting
Cells holding a NULL value now display null in gray.
int, float and numeric columns are right aligned. Integers, floats and numerics are coloured.
Booleans, green or red for true or false. t, f is replaced by TRUE, FALSE
2017-01-18 20:50:53 +01:00
Eelke Klein
163bb1d513 More aggressive saving of changes to the connections. Also remove connection
now removes the connection from the file.
2017-01-18 20:48:31 +01:00
Eelke Klein
ea30dd9c0e Alvast wat code voor backup/restore bij elkaar gezocht 2017-01-17 19:16:51 +01:00
Eelke Klein
2b012b70eb Highlighter verbeterd en uitgebreid. 2017-01-16 19:53:25 +01:00
Eelke Klein
fa9787adfd After an insert, update, delete the number of rows affected is reported.
This also makes it clearer the command was executed succesfully.

Times are now printed with no more then two decimals. This prevents confusion
between thousand and decimal seperators.
2017-01-16 18:57:50 +01:00
Eelke Klein
5831f18008 If there is a selection in the query then only that part is Executed or explained.
Replaced QTextEdit with QPLainTextEdit as it is more efficient and CAN do syntax highlighting.
2017-01-16 17:31:46 +01:00
Eelke Klein
c555182ddd No line wrap in query editbox. 2017-01-16 16:51:06 +01:00
Eelke Klein
81f3d3f1f8 Several shortcuts to query window
Ctrl+O open
Ctrl+S save
F5 run query
Shift+F7 explain analyze
Alt+Pause cancel query/explain
2017-01-16 16:48:40 +01:00
Eelke Klein
cb237b0c52 Fix: some typos and refactoring errors in expected 2017-01-16 16:47:37 +01:00
Eelke Klein
a32e2c83ca Query, explain, cancel buttons are now enabled/disabled when the state of the connection changes. 2017-01-15 21:38:07 +01:00
Eelke Klein
d19741f111 Connection manager can now open a query window for selected connection.
Query window has now buttons with icons made in the designer for better looks.
Depending on received responses from the database the tabcontrol with the message, data and explain tab
now switches to the appropriate tab.
2017-01-15 21:01:40 +01:00