Re: [Monetdb-developers] [Monetdb-pf-checkins] pathfinder/compiler/semantics xquery_fo.c, 1.83, 1.84
Do you really mean string as return type of fn:nid? On 10/26/2006 02:12 PM, Peter Boncz wrote with possible deletions:
Update of /cvsroot/monetdb/pathfinder/compiler/semantics In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv8300/compiler/semantics
Modified Files: xquery_fo.c Log Message: fast NID node retriveal by NID - moved support for id/idref node retrieval into pathfinder.mx having this as an API function will allow us to provide this functionality using indices later (i.e. be able to lock and isolte a hash index). it also helps a port of this functionality to algebra.
for the moment, there are no shared hash tables, and ID/IDREF queries on updatable XML documents will be slowish (sequential scans needed) the new NID access is a good alternative to look up nodes.
- implemented in ID node retrieval support for string sthat are numbers, these are interpreted as NIDs, not ID attributes.
- implemented a new fn:nid(element()*) as xs:string* builtin function that returns the NIDs of element nodes.
- fixed some constant support things (mposjoin)
Index: xquery_fo.c =================================================================== RCS file: /cvsroot/monetdb/pathfinder/compiler/semantics/xquery_fo.c,v retrieving revision 1.83 retrieving revision 1.84 diff -u -d -r1.83 -r1.84 --- xquery_fo.c 19 Oct 2006 19:32:27 -0000 1.83 +++ xquery_fo.c 26 Oct 2006 12:12:40 -0000 1.84 @@ -184,6 +184,11 @@ .par_ty = (PFty_t[]) { PFty_opt (PFty_xs_string ()) }, .ret_ty = PFty_opt (PFty_doc (PFty_xs_anyNode ())) } }, .alg = PFbui_fn_doc } + , /* fn:idref (xs:element) as integer */ + { .ns = PFns_fn, .loc = "nid", + .arity = 1, .sig_count = 1, .sigs = { { + .par_ty = (PFty_t[]) { PFty_xs_anyElement () }, + .ret_ty = PFty_xs_string () } } } , /* fn:id (string*) as element* */ { .ns = PFns_fn, .loc = "id", .arity = 1, .sig_count = 1, .sigs = { {
------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Monetdb-pf-checkins mailing list Monetdb-pf-checkins@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins
-- Jan Rittinger Database Systems Technische Universität München (Germany) http://www-db.in.tum.de/~rittinge/
participants (1)
-
Jan Rittinger