mirror of
https://github.com/levinsv/pgadmin3.git
synced 2026-05-15 14:15:49 -06:00
Template parsing error messages have been added to the status bar.
Сообщения об ошибках: "The column name %s was not found in the query results" - имя колонки не найдено в результатах запроса. "The column name %s is not closed" - пропущен закрывающий символ @. "The column name empty. %s ." - Имя не задано. Обычно бывает когда пропущен @. "Incorrect flag at the %s column." - Не верный флаг. Поддерживается пока только "a". Добавлено экранирование \t, \r
This commit is contained in:
parent
a8ddbc4999
commit
63d0c37478
2 changed files with 31 additions and 10 deletions
|
|
@ -2231,17 +2231,20 @@ void frmQuery::OnLabelRightClick(wxGridEvent &event)
|
|||
xmenu->Append(MNU_COPY_TABLEHTML, _("Copy table html format"), _("Copy table html format."));
|
||||
if (body_template.Count()>0) {
|
||||
//MNU_GENERATE_TEMPLATE
|
||||
wxMenu *submenu = new wxMenu();
|
||||
wxMenu *submenu = NULL;
|
||||
//wxString t="begin @obj_id@ end";
|
||||
int cnt=0;
|
||||
for(int i=0;i<body_template.Count();i++) {
|
||||
wxString s=sqlResult->GenerateTemplate(body_template[i],1);
|
||||
if (s=="OK")
|
||||
wxString s=sqlResult->GenerateTemplate(body_template[i],1);
|
||||
if (s=="OK")
|
||||
{
|
||||
cnt++;
|
||||
submenu->Append(MNU_GENERATESQL+cnt,title_template[i],body_template[i]);
|
||||
}
|
||||
if (submenu==NULL) submenu = new wxMenu();
|
||||
cnt++;
|
||||
submenu->Append(MNU_GENERATESQL+cnt,title_template[i],body_template[i]);
|
||||
} else
|
||||
SetStatusText(s, STATUSPOS_MSGS);
|
||||
}
|
||||
|
||||
if (cnt>0) xmenu->Append(MNU_GENERATESQL,"Generate",submenu);
|
||||
}
|
||||
xmenu->AppendSeparator();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue