Update of /cvsroot/monetdb/pathfinder/compiler/semantics
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv9901/semantics

Modified Files:
        xquery_fo.c 
Log Message:
- Implementation of TIJAH update functions in Pathfinder. These implementations
  are implemented using the 'docmgmt' type. They do not produce a docmgmt tape
  like the pf:add-doc() function but the create an empty tape. The update is
  perfromed within the milprint_summer function.
  The functions created are:

  pf:tijah-create-collection(collName:string [,options:item]) as docmgmt
  pf:tijah-delete-collection(collName:string) as docmgmt
  pf:tijah-add-doc(collName:string, uri:string) as docmgmt
  pf:tijah-add-doc(collName:string, uri:string[, name:string]) as docmgmt

An example of a PFTIJAH collection creation + addition of the documents +
deletion of the collection again in one statement (so an expensive  null op:-):

let $coll := "C"
let $dir  := "/home/flokstra/scripts/DATA/"
let $docs := (  "dilbert.xml",
                "number.xml",
                "number_two.xml"
             )
return (
  pf:tijah-create-collection(
        $coll,
        <TijahOptions
                tokenizer="fast"
                stemmer="porter-english"
        />
  ),
  for $d in $docs
        return pf:tijah-add-doc($coll,fn:concat($dir,$d),$d)
  ,
  pf:tijah-delete-collection($coll)
)



Index: xquery_fo.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/semantics/xquery_fo.c,v
retrieving revision 1.105
retrieving revision 1.106
diff -u -d -r1.105 -r1.106
--- xquery_fo.c 1 Mar 2007 13:23:14 -0000       1.105
+++ xquery_fo.c 2 Mar 2007 14:37:57 -0000       1.106
@@ -1905,11 +1905,35 @@
 
 #ifdef HAVE_PFTIJAH
 /* #4. PFTIJAH FUNCTIONS */
-    , /* pf:tijah-command(string*) as boolean */
-      { .ns = PFns_lib, .loc = "tijah-command",
+    ,  /* pf:tijah-create-collection(string) as docmgmt */
+      { .ns = PFns_lib, .loc = "tijah-create-collection",
         .arity = 1, .sig_count = 1, .sigs = { {
-            .par_ty = (PFty_t[]) { PFty_star (PFty_xs_string ()) },
-             .ret_ty = PFty_xs_boolean () } } }
+            .par_ty = (PFty_t[]) { PFty_xs_string () },
+            .ret_ty = PFty_docmgmt () } } }
+    ,  /* pf:tijah-create-collection(string,item) as docmgmt */
+      { .ns = PFns_lib, .loc = "tijah-create-collection",
+        .arity = 2, .sig_count = 1, .sigs = { {
+            .par_ty = (PFty_t[]) { PFty_xs_string (),
+                                   PFty_xs_anyNode () },
+            .ret_ty = PFty_docmgmt () } } }
+    ,  /* pf:tijah-delete-collection(string) as docmgmt */
+      { .ns = PFns_lib, .loc = "tijah-delete-collection",
+        .arity = 1, .sig_count = 1, .sigs = { {
+            .par_ty = (PFty_t[]) { PFty_xs_string () },
+            .ret_ty = PFty_docmgmt () } } }
+    ,  /* pf:tijah-add-doc(string, string) as docmgmt */
+      { .ns = PFns_lib, .loc = "tijah-add-doc",
+        .arity = 2, .sig_count = 1, .sigs = { {
+            .par_ty = (PFty_t[]) { PFty_xs_string (),
+                                   PFty_xs_string () },
+            .ret_ty = PFty_docmgmt () } } }
+    ,  /* pf:tijah-add-doc(string, string, string) as docmgmt */
+      { .ns = PFns_lib, .loc = "tijah-add-doc",
+        .arity = 3, .sig_count = 1, .sigs = { {
+            .par_ty = (PFty_t[]) { PFty_xs_string (),
+                                   PFty_xs_string (),
+                                   PFty_xs_string () },
+            .ret_ty = PFty_docmgmt () } } }
     , /* pf:tijah-query-id(item*, string) as integer */
       { .ns = PFns_lib, .loc = "tijah-query-id",
         .arity = 2, .sig_count = 1, .sigs = { {


-------------------------------------------------------------------------
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

Reply via email to