Update of /cvsroot/monetdb/pathfinder/compiler/semantics
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv6612/compiler/semantics
Modified Files:
xquery_fo.c
Log Message:
- Change the implementation of startNodes in tijah:query[-id]()
Because XQuery has no null values we had choosen to implement the
'no startnodes' parameter as the empty sequence. This was not a very
wise decision because we could not distinguish between an (unexpected?)
empty query result and a deliberately created empty sequence.
Because of function overloading problems we also had to change the order of
the parameters to the functions a little bit. The <TijahOptions> parameter
moved to the end of the argument list and the nexi query string is now the
center parameter which always needs to be there of course. The new signature
of the function is now:
tijah:query[-id]([startNodes:node*,] query:string [,options:node]):[node*|int]
The new syntax is also documented at the pftijah documentation page @:
http://dbappl.cs.utwente.nl/pftijah/Documentation/GettingStarted
Index: xquery_fo.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/semantics/xquery_fo.c,v
retrieving revision 1.113
retrieving revision 1.114
diff -u -d -r1.113 -r1.114
--- xquery_fo.c 3 Apr 2007 16:17:47 -0000 1.113
+++ xquery_fo.c 4 Apr 2007 13:52:01 -0000 1.114
@@ -1960,21 +1960,40 @@
.arity = 1, .sig_count = 1, .sigs = { {
.par_ty = (PFty_t[]) { PFty_xs_anyNode () },
.ret_ty = PFty_docmgmt () } } }
- , /* pf:query-id(item*, string) as integer */
+ , /* tijah:query-id(string) as integer */
+ { .ns = PFns_tijah, .loc = "query-id",
+ .arity = 1, .sig_count = 1, .sigs = { {
+ .par_ty = (PFty_t[]) { PFty_xs_string () },
+ .ret_ty = PFty_xs_integer () },
+ } }
+ , /* tijah:query-id(item*, string) as integer */
{ .ns = PFns_tijah, .loc = "query-id",
.arity = 2, .sig_count = 1, .sigs = { {
.par_ty = (PFty_t[]) { PFty_star (PFty_xs_anyNode ()),
PFty_xs_string () },
.ret_ty = PFty_xs_integer () },
} }
- , /* tijah:query-id(item, item*, string) as integer */
+ , /* tijah:query-id(string, item) as integer */
+ { .ns = PFns_tijah, .loc = "query-id",
+ .arity = 2, .sig_count = 1, .sigs = { {
+ .par_ty = (PFty_t[]) { PFty_xs_string (),
+ PFty_xs_anyNode () },
+ .ret_ty = PFty_xs_integer () },
+ } }
+ , /* tijah:query-id(item*, string, item) as integer */
{ .ns = PFns_tijah, .loc = "query-id",
.arity = 3, .sig_count = 1, .sigs = { {
- .par_ty = (PFty_t[]) { PFty_xs_anyNode (),
- PFty_star (PFty_xs_anyNode ()),
- PFty_xs_string () },
+ .par_ty = (PFty_t[]) { PFty_star (PFty_xs_anyNode ()),
+ PFty_xs_string (),
+ PFty_xs_anyNode ()},
.ret_ty = PFty_xs_integer () },
} }
+ , /* tijah:query(string) as node* */
+ { .ns = PFns_tijah, .loc = "query",
+ .arity = 1, .sig_count = 1, .sigs = { {
+ .par_ty = (PFty_t[]) { PFty_xs_string () },
+ .ret_ty = PFty_star (PFty_xs_anyNode ()) },
+ } }
, /* tijah:query(item*, string) as node* */
{ .ns = PFns_tijah, .loc = "query",
.arity = 2, .sig_count = 1, .sigs = { {
@@ -1982,12 +2001,19 @@
PFty_xs_string () },
.ret_ty = PFty_star (PFty_xs_anyNode ()) },
} }
- , /* tijah:query(item, item*, string) as node* */
+ , /* tijah:query(string, item) as node* */
+ { .ns = PFns_tijah, .loc = "query",
+ .arity = 2, .sig_count = 1, .sigs = { {
+ .par_ty = (PFty_t[]) { PFty_xs_string (),
+ PFty_xs_anyNode () },
+ .ret_ty = PFty_star (PFty_xs_anyNode ()) },
+ } }
+ , /* tijah:query(item*, string, item) as node* */
{ .ns = PFns_tijah, .loc = "query",
.arity = 3, .sig_count = 1, .sigs = { {
- .par_ty = (PFty_t[]) { PFty_xs_anyNode (),
- PFty_star (PFty_xs_anyNode ()),
- PFty_xs_string () },
+ .par_ty = (PFty_t[]) { PFty_star (PFty_xs_anyNode ()),
+ PFty_xs_string (),
+ PFty_xs_anyNode ()},
.ret_ty = PFty_star (PFty_xs_anyNode ()) },
} }
, /* tijah:nodes(integer) as node* */
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins