Update of /cvsroot/monetdb/clients/src/mapiclient
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv32766
Modified Files:
MapiClient.mx
Log Message:
Recognize command line formatting requests and handle error rendering.
Now the Mtest_sql5 does not complained on almost each test.
Index: MapiClient.mx
===================================================================
RCS file: /cvsroot/monetdb/clients/src/mapiclient/MapiClient.mx,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -d -r1.68 -r1.69
--- MapiClient.mx 24 Aug 2007 19:42:25 -0000 1.68
+++ MapiClient.mx 24 Aug 2007 21:01:34 -0000 1.69
@@ -139,13 +139,14 @@
/* some internal formatters */
enum formatters {
+ NOformatter,
RAWformatter,
TABLEformatter,
CSVformatter,
TABformatter,
XMLformatter
};
-static enum formatters formatter = TABLEformatter;
+static enum formatters formatter = NOformatter;
#define DEFWIDTH 80
@@ -1372,7 +1373,7 @@
char *reply;
if (mapi_get_querytype(hdl) == Q_UPDATE) {
- if (mode == SQL && pagewidth >= 0)
+ if (mode == SQL && pagewidth >= 0 && formatter
!= RAWformatter)
fprintf(toConsole, "Rows affected
%d\n", mapi_rows_affected(hdl));
else
fprintf(toConsole, "[ %d\t]\n",
mapi_rows_affected(hdl));
@@ -1380,7 +1381,7 @@
if (specials != NOmodifier && debugMode())
SQLdebugRendering(hdl);
else if ((reply = mapi_result_error(hdl)) !=
NULL) {
- if (pagewidth < 0)
+ if (pagewidth < 0 || formatter ==
RAWformatter)
goto nononsense;
fprintf(toConsole, "%s", reply);
} else
@@ -1820,7 +1821,11 @@
setPrompt();
prompt = promptbuf;
fromConsole = stdin;
- }
+ if( formatter== NOformatter)
+ formatter= TABLEformatter;
+ } else
+ if( formatter== NOformatter)
+ formatter= RAWformatter;
/* use default rendering if not overruled at commandline */
setWidth();
/* stream xml document into the server */
-------------------------------------------------------------------------
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-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins