[Monetdb-developers] [Monetdb-checkins] clients/src/mapiclient MapiClient.mx, , 1.8, 1.9

Romulo Goncalves R.A.Goncalves at cwi.nl
Wed Aug 8 18:12:49 CEST 2007

Martin Kersten wrote:
> Update of /cvsroot/monetdb/clients/src/mapiclient
> In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv19893
> Modified Files:
> 	MapiClient.mx 
> Log Message:
> MapiClient has been extended with a SQL rendering option based on
> a predefined columnwidth and pagesize.
> A columnwidth= -1 means old display structure.
> Columnwidth=0 indicates to respect the sizes in the table headers.
> Columnwidth>0 is an upperbound. Broad columns are pushed to make
> all fit. The long values are displayed over multiple lines.
If columnwidth is bigger than the table headers it equivalent to set it 
to zero.

For columnwidth=5 and columnswith=10 I do not see any differences in the 
output, why?

The error output is different.

[goncalve at amelia src]$ MapiClient -lsql --columnwidth=-1 --pagesize=-1
sql>select * from table;
MAPI  = monetdb at localhost:50000
QUERY = select * from table;
ERROR = !syntax error, unexpected TABLE in: "select * from table"

[goncalve at amelia src]$ MapiClient -lsql --columnwidth=0 --pagesize=-1
sql>select * from table;
!syntax error, unexpected TABLE in: "select * from table"
Timer       0.427 msec
[goncalve at amelia src]$

Another interesting point is the response time.
If I use:
columnwidth=0 the response time is around 8 ms
columnwidth=10 the response time is around 13 ms

Note: I am looking to the response time printed in the MapiClient. There 
are not special measures made by me.

> The pagesize default is -1 to indicate the old situation. A pagesize
> = 0 indicates no pagination structure, and a pagesize>0 produces
> a paginated result, which can be stopped.
Well if I use columnwidth=-1 the pagesize does not have any effect.

If I load a file the options do not work.
MapiClient -lsql --columnwidth=0 --pagesize=10 romulo.sql

Where romulo.sql contains the query select * from tables;

> The styling works with the debugger, which now also better indicates
> the mode. 
I will test this after you fix the previous problems. ;)


The trace mode requires some extra work (for columnwidth>=0)
> The style conventions for the other languages should not have been
> changed. (checking is needed) (and multi platform compilation)

More information about the developers-list mailing list