eelke
456180325e
Code cleanups
2018-12-31 15:45:53 +01:00
eelke
b0cd47ef46
Extended the plugin system to allow for dynamic runtime bindings between modules.
...
As a test implementation, this allows the TablesPage to open a CrudTab for a table/view without
the need for TablesPage, CrudTab and DatabaseWindow to know anything about each other.
2018-12-31 15:26:36 +01:00
eelke
f996703937
Corrected some usage of QueueTask that was already broken as QueueTask is defunct.
2018-12-31 15:19:16 +01:00
eelke
1da8ef7407
Remove all knowledge of DatabaseWindow from CrudTab (unwanted dependency)
2018-12-31 09:51:52 +01:00
eelke
cc4f309c0f
Completed removal of ASyncWindow
2018-12-31 09:40:25 +01:00
eelke
424fb5984d
Fixed loading of data in CrudModel.
2018-12-31 09:33:34 +01:00
eelke
15bee33076
Made step to remove ASyncWindow in favour of usage of Future and FutureWatcher.
...
This should allow concurrency in the plugins to be independent from their container.
Contains also some work on the system for registering plugins.
2018-12-30 15:46:15 +01:00
eelke
a54a063c13
DatabaseWindow no longer has to pass the config to QueryTab, QueryTab can now init itself from the supplied context.
2018-12-30 15:44:05 +01:00
eelke
2a7e505dbf
Made a step in removing knowledge of DatabaseWindow from QueryTab as an effort to move
...
in the direction of a plugin system.
DatabaseWindow now passes a Context to QueryTab and other pages that give those pages an
API for passing information up the system without knowing anything about the sytem.
2018-12-29 18:59:54 +01:00
eelke
f6ea2ce0a6
Introduced own version of QTableView called PgLabTableView that has some other defaults.
2018-12-29 17:54:54 +01:00
eelke
f0ffcf4abd
TablesTableModel now also shows (materialized) views en foreign tables.
2018-12-29 11:19:12 +01:00
eelke
a0579538df
The tablespage now has a namespace filter allowing it to be used for
...
a pg_catalog and information_schema tab.
2018-12-29 10:56:24 +01:00
eelke
d129876d06
CodeEditor improvements
...
- Block (un)indent (works for tabs and or spaces)
- Block indent inserts spaces when m_useTabs == false
- Tabsize based on number of chars (instead of pixels) default size is now 4 chars
- Change fontsize with Ctrl + [-|+|=] (= is same key as +)
2018-12-28 19:43:55 +01:00
eelke
69473d65d2
Renamed MainWindow to DatabaseWindow so the name tells us the functionality provided by the window.
...
MainWindow was really a bad name as the app doesn't have a main window.
2018-12-28 12:55:11 +01:00
eelke
437736a023
Tab with list of sequences and create sql for selected sequence.
2018-12-28 08:51:02 +01:00
eelke
769307c821
Added the trigger definitions to the sql for a table. Also tuned the formatting of the trigger definitions a bit.
2018-12-27 12:15:37 +01:00
eelke
4ec4e02411
The SQL tab for a table now also shares the grant/revoke statements for that table (but not yet any column level grants).
2018-12-27 12:07:19 +01:00
eelke
93687df959
Removed the acl field from several Pg* classes as the acl is now stored in the PgServerObject base class they inherit from.
2018-12-27 12:05:48 +01:00
eelke
aaa05f64ef
PgTablespace now inherits from PgServerObject.
2018-12-25 17:38:13 +01:00
eelke
0b6c1a8544
Make PgAuthId inherit PgServerObject and related changes.
2018-12-25 16:41:44 +01:00
eelke
c2c01cf431
Generic GRANT/REVOKE generation from ACL's complete.
...
Moved the owned concept to PgServerObject as it is needed for the generic
acl functionality that is also in PgServerObject.
2018-12-25 14:25:15 +01:00
eelke
cc0b28e8e0
No need for PgSPtrContainer to store weak pointer to the catalog when its parent already has a reference to the catalog.
2018-12-24 11:33:24 +01:00
eelke
3f337b2cca
Added typeName function to PgObject as it might be useful for building generic functions.
2018-12-24 11:31:56 +01:00
eelke
b210c570fc
ArrayParser doesn't require the string to be null terminated anymore,
...
instead the length of the string can be passed in.
This is first step in process to allow Value to work without null terminator.
2018-12-24 08:10:09 +01:00
eelke
93c8b49f61
PgServerObject now contains a list of acl's for the object so all the different objects
...
can use this implementation.
2018-12-24 07:51:27 +01:00
eelke
efb3e71556
The getAsArray and getAsVector function now use StringToArrayElem template for conversion
...
to the array element type.
A five line construct had been copy pasted to achieve conversion by using the capabilities of the Value object
however this was not going to work for types that are not known to the database as adding support for these
to Value would be a bad idea. So StringToArrayElem was introduced with a default implementation that relies on
Value.
2018-12-24 07:46:13 +01:00
eelke
54d4dfface
Improved code generation for functions and procedures.
...
alter statements for configuration settings
alter statement for owner
2018-12-24 07:41:23 +01:00
eelke
fc58acb252
Added convenience functions to PgLanguage for quickly testing for the standard languages.
2018-12-23 19:43:50 +01:00
eelke
471139ba4d
Added getResultNoThrow as the AsyncDBCOnnection doesn't like exceptions.
2018-12-23 12:39:53 +01:00
eelke
43f8117bbd
pg11: pg_proc, type of function is stored differently from pg11 forward
...
Followed the more structured approach of pg11 in combining the different types into a kind field
when reading from older versions we migrate the old fields to the new field. Change in 11
is because of PROCEDURE support. However full PROCEDURE support will be its own change and is
registered as issue #37
2018-12-23 08:48:45 +01:00
eelke
a88af1ac11
Improved connection error handling.
...
Just returning a boolean is too limiting. Using expection instead to easily pass on error message.
2018-12-23 08:43:43 +01:00
eelke
646b18ebeb
Update tests for moved include files.
2018-12-23 08:42:32 +01:00
eelke
6a2c8ec5e0
Do not use flat_set anymore gives compilation issues.
...
Not worth the time solving the issue without having prove of a clear benefit of
using flat_set over unordered_set.
2018-12-23 08:41:33 +01:00
eelke
1854a4bdaa
Improvements in generated SQL for CREATE FUNCTION
2018-12-22 13:52:19 +01:00
eelke
f692569d27
Added the list of installed language to the catalog. The ProcTableModel now returns the owner name and language name instead of the oids.
2018-12-17 21:51:14 +01:00
eelke
c0a11f9b3b
Functions page now shows sql for selected function.
...
The actual SQL needs some further checking.
2018-12-16 20:40:04 +01:00
eelke
31a77a1742
Triggers and Columns page now automatically resize columns to fit contents.
2018-12-16 20:38:57 +01:00
eelke
880903db5f
Several fixes of warnings/clang tidy
2018-12-16 15:38:32 +01:00
eelke
2f527a8380
Sort the list of columns for a table by attnum (creation order).
2018-12-16 12:49:44 +01:00
eelke
2aef965787
On the tables page the column tab is now selected by default.
2018-12-16 12:47:31 +01:00
eelke
e75b0f1a71
Added CollationModel + factory for editing and added to EditTableWidget
2018-12-16 11:35:39 +01:00
eelke
f0c1035378
Reorganize files in pglablib
...
The enitities and containers of the catalog now go into catalog subfolder
Models go into model
2018-12-16 11:31:33 +01:00
eelke
56cbeea183
Fix: SelectionEditorFactory::setEditorData incorrectly used default DisplayRole with index.data() while it should use the EditRole.
2018-12-16 09:39:43 +01:00
eelke
387c664284
EditColumnTableModel, return typename for displayrole for type column and oid for edit value.
2018-12-16 09:35:57 +01:00
eelke
44358d198a
PgType now inherits from PgNamespaceObject and PgOwnedObject
2018-12-16 09:24:27 +01:00
eelke
742fd0a4d3
SelectionEditorFactory + ItemModel + ItemModelFactory combination is working
...
in new EditTableWidget
(EditTableWidget is very much WIP)
2018-12-15 20:27:40 +01:00
eelke
e44f73166f
SelectionEditorFactory for creating combobox selections for use in QTableView.
...
TypeSelectionItemModelFactory to use the TypeSelectionItemModel with above factory.
2018-12-15 15:28:33 +01:00
eelke
f8d61b61f4
Added capability to create editors from an editor factory to PgLabItemDelegate
2018-12-15 12:11:23 +01:00
eelke
62c6ad5bfb
Improved support from removing rows in crud tabs.
...
It can handle now complex selections and reports back errors encountered
when removing the rows fails.
2018-12-15 11:24:58 +01:00
eelke
950fea873c
Fix QtCreater error
...
(msvc accepts it but it is an error according to gcc and clang)
2018-12-15 11:19:32 +01:00