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

Martin Kersten Martin.Kersten at cwi.nl
Wed Aug 8 21:44:59 CEST 2007


Thanks for the first reaction.

Romulo Goncalves wrote:
> 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.

yes that's true and intended. The pagewidth (=columnwidth) is an upperbound.
> 
> For columnwidth=5 and columnswith=10 I do not see any differences in the 
> output, why?
> 
Now it does.
 > mclient -lsql
sql>\w5
sql>select 1;
+----+
| si |
| ng |
| le |
| _v |
| al |
| ue |
+====+
|  1 |
+----+
Timer       0.843 msec 1 rows
sql>\w10
sql>select 1;
+---------+
| single_ |
| value   |
+=========+
|       1 |
+---------+
Timer       0.361 msec 1 rows

> The error output is different.
This is intended. --pagewidth=-1 indicates 'no special rendering required'.
> 
> [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"
> sql>\q
> 
and here we remove the non-essential information for the user.
> [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
> sql>\q
> [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
Timing currently includes interaction time with the user.
Especially when you page through the result. The remainder
is a normal disturbance in Mserver execution time.
> 
> 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

First target was interactive use. This will follow.
> 
> 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. ;)

Open issues:
- batched use
- pager support (pipe the tuples to a separate process)
- mode change control not yet perfect.
> 
> Regards,
> Romulo
> 
> 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)
>>
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >>  http://get.splunk.com/
> _______________________________________________
> Monetdb-developers mailing list
> Monetdb-developers at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/monetdb-developers





More information about the developers-list mailing list