Update of /cvsroot/monetdb/pathfinder/compiler/mil
In directory sc8-pr-cvs16:/tmp/cvs-serv21725/compiler/mil
Modified Files:
milprint_summer.c
Log Message:
After lengthy discussion about the tijah:query[-id] overloading problems we
decided to split the function (family) into to seperate families.
tijah:query(node*, string) as node*
tijah:query(node*, string, node) as node*
tijah:query-id(node*, string) as integer
tijah:query-id(node*, string, node) as integer
tijah:queryall(string) as node*
tijah:queryall(string, node) as node*
tijah:queryall-id(string) as integer
tijah:queryall-id(string, node) as integer
The first 4 functions are the "query" family of functions where you have to
supply a startNode sequence as first argument. These startNodes are the nodes
from which the nexi query starts its search. The second "queryall" family of
functions omits the startNodes and searches the entire index.
Index: milprint_summer.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/mil/milprint_summer.c,v
retrieving revision 1.377
retrieving revision 1.378
diff -u -d -r1.377 -r1.378
--- milprint_summer.c 7 May 2007 10:06:51 -0000 1.377
+++ milprint_summer.c 10 May 2007 09:26:03 -0000 1.378
@@ -8209,7 +8209,9 @@
}
else if (
( !PFqname_eq(fnQname, PFqname (PFns_tijah,"query"))) ||
- ( !PFqname_eq(fnQname, PFqname (PFns_tijah,"query-id")))
+ ( !PFqname_eq(fnQname, PFqname (PFns_tijah,"queryall"))) ||
+ ( !PFqname_eq(fnQname, PFqname (PFns_tijah,"query-id"))) ||
+ ( !PFqname_eq(fnQname, PFqname (PFns_tijah,"queryall-id")))
)
{
int opt_counter = 0;
@@ -8217,9 +8219,11 @@
int ctx_counter = 0;
char *item_ext = kind_str(STR);
- int storeScore = !PFqname_eq(fnQname, PFqname (PFns_tijah,"query-id"));
+ int storeScore = (!PFqname_eq(fnQname, PFqname (PFns_tijah,"query-id")))
+ ||
+ (!PFqname_eq(fnQname, PFqname
(PFns_tijah,"queryall-id")));
milprintf(f,
- "{ # translate tijah:query\n"
+ "{ # translate tijah:query[all][-id]\n"
);
if (fun->arity == 3) {
/* generate startnodes code */
@@ -8415,7 +8419,7 @@
deleteResult_ (f, str_counter, STR);
if ( ctx_counter )
deleteResult(f, ctx_counter);
- milprintf(f, "} # end of translate pf:tijah_query\n");
+ milprintf(f, "} # end of translate tijah:query[all][-id]\n");
return (code && storeScore)?INT:NORMAL;
}
else if ( !PFqname_eq(fnQname, PFqname (PFns_tijah,"nodes")) )
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins