Update of /cvsroot/monetdb/clients/src/mapiclient
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv7817/src/mapiclient
Modified Files:
MapiClient.mx
Log Message:
Implemented the client side of switching to and from the algebra version for
SQL and XQuery.
Index: MapiClient.mx
===================================================================
RCS file: /cvsroot/monetdb/clients/src/mapiclient/MapiClient.mx,v
retrieving revision 1.103
retrieving revision 1.104
diff -u -d -r1.103 -r1.104
--- MapiClient.mx 11 Jan 2008 16:44:13 -0000 1.103
+++ MapiClient.mx 28 Jan 2008 16:25:37 -0000 1.104
@@ -1187,6 +1187,10 @@
stream_printf(toConsole, "\\A - enable auto commit\n");
stream_printf(toConsole, "\\a - disable auto commit\n");
}
+ if (mode == SQL || mode == XQUERY) {
+ stream_printf(toConsole, "\\G - switch to algebra
frontend\n");
+ stream_printf(toConsole, "\\g - switch to old frontend\n");
+ }
if (mode == XQUERY) {
stream_printf(toConsole, "\\f - result format: dm or
xml[-noheader][-typed|-noroot|-root-FOOBAR]\n");
} else {
@@ -1323,6 +1327,16 @@
break;
mapi_setAutocommit(mid, 0);
continue;
+ case 'G':
+ if (mode != SQL && mode != XQUERY)
+ break;
+ mapi_setAlgebra(mid, 1);
+ continue;
+ case 'g':
+ if (mode != SQL && mode != XQUERY)
+ break;
+ mapi_setAlgebra(mid, 0);
+ continue;
case 'w':
pagewidth = atoi(line + 2);
continue;
@@ -1594,10 +1608,12 @@
fprintf(stderr, " -r nr | --rows=nr for pagination\n");
fprintf(stderr, " -w nr | --width=nr for pagination\n");
fprintf(stderr, " -D | --dump create an SQL
dump\n");
+ fprintf(stderr, " -G | --algebra use algebra
frontend\n");
fprintf(stderr, "\nXQuery specific options\n");
fprintf(stderr, " -C colname | --collection=colname collection
name\n");
fprintf(stderr, " -I docname | --input=docname document name, XML
document on standard input\n");
+ fprintf(stderr, " -G | --algebra use algebra
frontend\n");
exit(-1);
}
@@ -1618,6 +1634,7 @@
int trace = 0;
int guest = 1;
int dump = 0;
+ int algebra = 0;
int c = 0;
Mapi mid;
int save_history = 0;
@@ -1625,6 +1642,7 @@
int option_index = 0;
struct stat statb;
static struct option long_options[] = {
+ {"algebra", 0, 0, 'G'},
{"collection", 1, 0, 'C'},
{"database", 1, 0, 'd'},
{"dump", 0, 0, 'D'},
@@ -1672,7 +1690,7 @@
#ifdef HAVE_ICONV
"E:"
#endif
- "f:I:ih:L:l:"
+ "f:Gh:I:iL:l:"
#ifdef HAVE_POPEN
"|:"
#endif
@@ -1749,6 +1767,9 @@
case 'h':
host = optarg;
break;
+ case 'G':
+ algebra = 1;
+ break;
case 'p':
port = atoi(optarg);
break;
@@ -1865,6 +1886,8 @@
if (logfile)
mapi_log(mid, logfile);
+ if (algebra && (mode == SQL || mode == XQUERY))
+ mapi_setAlgebra(mid, algebra);
mapi_profile(mid, mark != NULL);
mapi_trace(mid, trace);
if (output)
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Monetdb-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins