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
This commit is contained in:
Eelke Klein 2017-01-18 20:50:53 +01:00
parent 163bb1d513
commit eb06c57141
4 changed files with 106 additions and 6 deletions

View file

@ -163,6 +163,15 @@ const char * Result::getVal(int col, int row) const
return PQgetvalue(result, row, col);
}
Oid Result::type(int col) const
{
return PQftype(result, col);
}
bool Result::null(int col, int row) const
{
return PQgetisnull(result, row, col);
}
Canceller::Canceller(PGcancel *c)
: m_cancel(c)