Added division of digits for thousands. Only integers. Only Result query.

Для результатов запросов для целых чисел добавлено визуальное разделение тысяч.
Величина отделения задаётся в точках и храниться в pgadmin3opt.json
в параметре "thousandsWidthSeparator" раздела "ctlSQLGrid" разрешенные величины от -15 до 15.
Значение по умолчанию 0.
В отличии от стандартного разделителя тысяч этот влияет только на отображении чисел.
This commit is contained in:
lsv 2026-02-25 14:38:09 +05:00
parent 1dc289a625
commit 979d709843
4 changed files with 233 additions and 156 deletions

View file

@ -474,7 +474,8 @@ wxString ctlSQLResult::GenerateTemplate(wxString &templ,int action)
if (rows.Count()>0) r=rows[r]; else r=r;
}
bool isnull=false;
wxString text = t->GetValueWithNull( r, e.column , &isnull );
int pgtype=0;
wxString text = t->GetValueWithNull( r, e.column , &isnull, &pgtype );
bool needQuote = false;
if (qt == 1)
{
@ -1330,7 +1331,7 @@ wxString sqlResultTable::GetValueFast(int row, int col)
}
return "";
}
wxString sqlResultTable::GetValueWithNull(int row, int col, bool *isnull) {
wxString sqlResultTable::GetValueWithNull(int row, int col, bool *isnull, int *pgtype) {
wxString s;
if (thread && thread->DataValid())
{
@ -1340,6 +1341,7 @@ wxString sqlResultTable::GetValueWithNull(int row, int col, bool *isnull) {
thread->DataSet()->Locate(row + 1);
wxString s = thread->DataSet()->GetVal(col);
*isnull = thread->DataSet()->IsNull(col);
*pgtype = thread->DataSet()->ColTypClass(col);
return s;
}