SQL Macros in QueryTool.
От | Krzysztof Śmigrodzki |
---|---|
Тема | SQL Macros in QueryTool. |
Дата | |
Msg-id | 4680D443.1010007@gmail.com обсуждение исходный текст |
Ответы |
Re: SQL Macros in QueryTool.
Re: SQL Macros in QueryTool. Code is ready. |
Список | pgadmin-hackers |
Hello, I've been asked to add little macro capabilities to PgAdmin's QueryTool. My plans: Every macro has: - key shortcut (key), - short descriptive title (title), - query text (query). Just right of Favourites menu, I'll add Macros menu with - Macros Setup dialog, - Separator for macro in macros: macro.title + "\t" + macro.key Macros will be stored, and added to menu just like Favourites. wxMenu description key handler will generate command event, on key shortcut hit. In frmQuery class I'll add next EVT_MENU_RANGE to event table. I'll create method which: 1. retrieve query from queryMacroList (think of queryFavoritesFolder without support for sublevels), based on event.GetId(). 2. replace $SELECTED$ placeholder with current selection (if there is placeholder in query, and there is selection in editor) 3. run query (mimic OnExecute behaviour). I'll start with implementing actual macro capabilities without configuration dialog (tester will edit xml file to add new macros). This part will be ready in two weeks time (I'm coding that in spare time). Then I'll create configuration dialog. I've got some doubts how to implement so expect question on the list. If that will work, I think of defining different macro sets for different server/databases (default macros for application, but they can be overridden by macros specific to server or database). My development platform is: - Windows Vista Bussines x64, Polish - VC++ 2005 Express - wxWidgets 2.8.4 (current stable release) - PostgreSQL 8.2.4, default package from OpenBSD, run on virtual machine. I'll start with revision 6393 of PGAdmin code. I'll build 32 bit code (don't know if PGAdmin work in Windows 64 bit environment). Regards, Krzysiek
В списке pgadmin-hackers по дате отправления: