Changeset: a6cacf1e601b for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a6cacf1e601b Modified Files: clients/ChangeLog.Aug2011 clients/mapiclient/mclient.c Branch: Aug2011 Log Message:
mclient: fix table display for row-less tables Treat headers as unsqueezable when there are no rows (data). It makes no sense to optimise for non-existing data, so just print the column names, unmodified, for as long as it fits on the current display. diffs (33 lines): diff --git a/clients/ChangeLog.Aug2011 b/clients/ChangeLog.Aug2011 --- a/clients/ChangeLog.Aug2011 +++ b/clients/ChangeLog.Aug2011 @@ -1,6 +1,11 @@ # ChangeLog file for clients # This file is updated with Maddlog +* Mon Oct 17 2011 Fabian Groffen <[email protected]> +- Small improvement to mclient's table rendering for tables without + any rows. Previously, the column names in the header could be + squeezed to very small widths, degrading readability. + * Wed Oct 12 2011 Fabian Groffen <[email protected]> - Python DB API connect() function now supports PEP 249-style arguments user and host, bug #2901 diff --git a/clients/mapiclient/mclient.c b/clients/mapiclient/mclient.c --- a/clients/mapiclient/mclient.c +++ b/clients/mapiclient/mclient.c @@ -1100,12 +1100,11 @@ SQLrenderer(MapiHdl hdl, char singleinst strcmp(s, "decimal") == 0); if (rows == 0) { - vartotal += len[i]; - minvartotal += MINCOLSIZE; + minvartotal += len[i]; /* don't wrap column headers if no data */ } else if (!numeric[i]) { - vartotal += len[i]; minvartotal += len[i] > MINVARCOLSIZE ? MINVARCOLSIZE : len[i]; } + vartotal += len[i]; total += len[i]; /* do a very pessimistic calculation to determine if more _______________________________________________ Checkin-list mailing list [email protected] http://mail.monetdb.org/mailman/listinfo/checkin-list
