Update of /cvsroot/monetdb/pathfinder/compiler/mil
In directory sc8-pr-cvs16:/tmp/cvs-serv5581/mil
Modified Files:
milprint_summer.c
Log Message:
Added pxmlsup namespace for use in probxml module
Added function pxmlsup:newid
Index: milprint_summer.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/mil/milprint_summer.c,v
retrieving revision 1.373
retrieving revision 1.374
diff -u -d -r1.373 -r1.374
--- milprint_summer.c 2 May 2007 21:42:32 -0000 1.373
+++ milprint_summer.c 4 May 2007 09:44:52 -0000 1.374
@@ -8584,6 +8584,33 @@
return rc;
}
#endif /* PFTIJAH */
+#ifdef HAVE_PROBXML
+ else if (!PFqname_eq(fnQname,PFqname (PFns_pxmlsup,"newid")))
+ {
+ rc = translate2MIL (f, VALUES, cur_level, counter, L(args));
+ if (rc == NORMAL)
+ {
+ assert (fun->sig_count == 1);
+ rc = get_kind(fun->sigs[0].ret_ty);
+ milprintf(f, "item%s := item%s;\n", kind_str(rc), val_join(rc));
+ }
+
+ char *item_ext = kind_str(rc);
+ type_co t_co = kind_container(rc);
+ milprintf(f,
+ "if (ipik.count() != 0) { # fn:newid\n"
+ "var res := iter.mark(oid(newid_counter)).[lng]();\n"
+ "newid_counter := newid_counter + res.count();\n"
+ );
+
+ if (code) milprintf(f, "item%s := res;\n", item_ext);
+ else addValues (f, t_co, "res", "item");
+
+ item_ext = (code)?item_ext:"";
+ milprintf(f, "} # end of fn:newid\n");
+ return rc;
+ }
+#endif /* HAVE_PROBXML */
PFoops(OOPS_FATAL,"function %s is not supported.", PFqname_str (fnQname));
milprintf(f,
"# empty intermediate result "
@@ -11290,6 +11317,9 @@
"var tijah_resultsz := new(lng,lng);\n"
"var tijah_lock := lock_nil; # pftijah collection lock\n"
#endif
+#ifdef HAVE_PROBXML
+ "var newid_counter := 1LL;\n"
+#endif
"\n"
"# value containers for literal values\n"
"var int_values := bat(lng,void).key(true).reverse().seqbase([EMAIL
PROTECTED]);\n"
-------------------------------------------------------------------------
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