Update of /cvsroot/monetdb/pathfinder/compiler/include
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv17783/compiler/include

Modified Files:
        algebra.h builtins.h mil.h 
Log Message:
* Algebra and MIL implementation of the XQuery update functions:
   upd:delete
   upd:insertAfter
   upd:insertBefore
   upd:insertIntoAsFirst
   upd:insertIntoAsLast
   upd:rename
   upd:replaceElementContent
   upd:replaceNode
   upd:replaceValue

   There is some things that must be still done in the algebra level, e.g.,
   reverse the order of the sequence in the insertBefore/insertIntoASFirst
   functions. Also the mil implementation of the serialize operator for
   updates is not done yet. So basically updates wont work yet in the
   algebra backend, but we are getting closer.



Index: mil.h
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/include/mil.h,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -d -r1.45 -r1.46
--- mil.h       26 Oct 2007 13:03:14 -0000      1.45
+++ mil.h       20 Nov 2007 16:57:27 -0000      1.46
@@ -448,6 +448,20 @@
 };
 typedef enum PFmil_access_t PFmil_access_t;
 
+/* enum for update types */
+enum PFmil_update_t {
+      UPDATE_DUMMY          /**< skip zero enum */
+    , UPDATE_INSERT_FIRST
+    , UPDATE_INSERT_LAST
+    , UPDATE_INSERT_BEFORE
+    , UPDATE_INSERT_AFTER
+    , UPDATE_REPLACECONTENT
+    , UPDATE_REPLACENODE
+    , UPDATE_DELETE
+    , UPDATE_RENAME
+    , UPDATE_REPLACE
+};
+typedef enum PFmil_update_t PFmil_update_t;
 
 /** semantic content for MIL tree nodes */
 union PFmil_sem_t {

Index: algebra.h
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/include/algebra.h,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -d -r1.63 -r1.64
--- algebra.h   5 Nov 2007 22:46:33 -0000       1.63
+++ algebra.h   20 Nov 2007 16:57:26 -0000      1.64
@@ -75,8 +75,8 @@
 #define aat_pre     0x00000200 /**< a node is represented by a pre value... */
 #define aat_pfrag   0x00000100 /**< ...and a node fragment */
 
-#define aat_charseq 0x00010000  /**< this type represents the CHAR type in SQL 
*/
-#define aat_update  0x00010000  /**< and it represents the update kind in MIL 
*/
+#define aat_charseq 0x00010000 /**< this type represents the CHAR type in SQL 
*/
+#define aat_update  0x00010000 /**< and it represents the update kind in MIL */
 /**
  * The following types represent the first parameter of an update function
  * (which is a always of kind node). This allows an update item to correctly
@@ -116,7 +116,7 @@
 union PFalg_atom_val_t {
     nat           nat_;    /**< value for natural number atoms (#aat_nat) */
     long long int int_;    /**< value for integer atoms (#aat_int) */
-    char         *str;     /**< value for string and untyped atoms (#aat_str)  
*/
+    char         *str;     /**< value for string and untyped atoms (#aat_str) 
*/
     double        dec_;     /**< value for decimal atoms (#aat_dec) */
     double        dbl;     /**< value for double atoms (#aat_dbl) */
     bool          bln;     /**< value for boolean atoms (#aat_bln) */
@@ -294,6 +294,16 @@
     , alg_fun_fn_qname            /**< fn:QName */
     , alg_fun_pf_fragment         /**< #pf:fragment */
     , alg_fun_pf_supernode        /**< #pf:supernode */
+    , alg_fun_upd_rename          /**< upd:rename */
+    , alg_fun_upd_delete          /**< upd:delete */
+    , alg_fun_upd_insert_into_as_first    /**< upd:insertIntoAsFirst */
+    , alg_fun_upd_insert_into_as_last     /**< upd:insertIntoAsLast */
+    , alg_fun_upd_insert_before           /**< upd:insertBefore */
+    , alg_fun_upd_insert_after            /**< upd:insertAfter */
+    , alg_fun_upd_replace_value_att       /**< upd:replaceValue */
+    , alg_fun_upd_replace_value           /**< upd:replaceValue */
+    , alg_fun_upd_replace_element /**< upd:replaceElementContent */
+    , alg_fun_upd_replace_node    /**< upd:replaceNode */
 };
 typedef enum PFalg_fun_t PFalg_fun_t;
 

Index: builtins.h
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/include/builtins.h,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- builtins.h  26 Oct 2007 13:03:14 -0000      1.38
+++ builtins.h  20 Nov 2007 16:57:27 -0000      1.39
@@ -618,6 +618,45 @@
 struct PFla_pair_t PFbui_pf_supernode (const PFla_op_t *loop, bool ordering,
                                        struct PFla_pair_t *args);
 
+/* #3. UPDATE FUNCTIONS */
+struct PFla_pair_t PFbui_upd_rename (const PFla_op_t *loop, bool ordering,
+                                     struct PFla_pair_t *args);
+
+struct PFla_pair_t PFbui_upd_delete (const PFla_op_t *loop, bool ordering,
+                                     struct PFla_pair_t *args);
+
+struct PFla_pair_t PFbui_upd_insert_into_as_first (const PFla_op_t *loop,
+                                                   bool ordering,
+                                                   struct PFla_pair_t *args);
+
+struct PFla_pair_t PFbui_upd_insert_into_as_last (const PFla_op_t *loop,
+                                                  bool ordering,
+                                                  struct PFla_pair_t *args);
+
+struct PFla_pair_t PFbui_upd_insert_before (const PFla_op_t *loop,
+                                            bool ordering,
+                                            struct PFla_pair_t *args);
+
+struct PFla_pair_t PFbui_upd_insert_after (const PFla_op_t *loop,
+                                           bool ordering,
+                                           struct PFla_pair_t *args);
+
+struct PFla_pair_t PFbui_upd_replace_value_att (const PFla_op_t *loop,
+                                                bool ordering,
+                                                struct PFla_pair_t *args);
+
+struct PFla_pair_t PFbui_upd_replace_value (const PFla_op_t *loop,
+                                            bool ordering,
+                                            struct PFla_pair_t *args);
+
+struct PFla_pair_t PFbui_upd_replace_element (const PFla_op_t *loop,
+                                              bool ordering,
+                                              struct PFla_pair_t *args);
+
+struct PFla_pair_t PFbui_upd_replace_node (const PFla_op_t *loop,
+                                           bool ordering,
+                                           struct PFla_pair_t *args);
+
 #endif   /* BUITLINS_H */
 
 /* vim:set shiftwidth=4 expandtab: */


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins

Reply via email to