Matthias Brantner has proposed merging lp:~zorba-coders/zorba/redirect into 
lp:zorba.

Requested reviews:
  Juan Zacarias (juan457)
  Markos Zaharioudakis (markos-za)

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/redirect/+merge/83227

Allow external functions to be updating.
-- 
https://code.launchpad.net/~zorba-coders/zorba/redirect/+merge/83227
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'ChangeLog'
--- ChangeLog	2011-11-23 16:27:08 +0000
+++ ChangeLog	2011-11-23 22:28:39 +0000
@@ -15,6 +15,7 @@
   * Implemented the probe-index-range-value for general indexes
   * Added ExternalFunctionParameter class to be registered in the DynamicContext
   * New module for compiling and executing XQueries from XQuery (xqxq)
+  * External functions are allowed to be updating (i.e. return a pending update list)
 
 Optimization:
   * Optimization for positioned sequence access (e.g. $x[$x[1]] where $x is a

=== modified file 'doc/zorba/impl_dep_features.dox'
--- doc/zorba/impl_dep_features.dox	2011-10-07 08:28:43 +0000
+++ doc/zorba/impl_dep_features.dox	2011-11-23 22:28:39 +0000
@@ -216,7 +216,7 @@
   <tr bgcolor="lightcyan">
     <td>W3C XQuery Update Facility 1.0</td>
     <td>The mechanism (if any) by which an external function can return an XDM instance and/or a pending update list to the invoking query.</td>
-    <td>Zorba allows external functions to be implemented in C++. Such functions may return XDM instances. However, it is not possible to implement an updating external function.</td>
+    <td>Zorba allows external functions to be implemented in C++. Such functions may return XDM instances. Moreover, external functions declared as updating may return pending update lists generated by any updating expression. However, it's not possible to create new update primtives and return those.</td>
   </tr>
   <tr bgcolor="lightcyan">
     <td>W3C XQuery Update Facility 1.0</td>
@@ -744,4 +744,4 @@
     <td>static</td>
     <td>no wildcards </td>
   </tr>
-</table>*/
\ No newline at end of file
+</table>*/

=== modified file 'src/compiler/translator/translator.cpp'
--- src/compiler/translator/translator.cpp	2011-11-22 08:57:25 +0000
+++ src/compiler/translator/translator.cpp	2011-11-23 22:28:39 +0000
@@ -9992,7 +9992,7 @@
 
     expr_t resultExpr = foExpr.getp();
 
-    if (f->isExternal())
+    if (f->isExternal() && !f->isUpdating())
     {
       const xqtref_t& resultType = f->getSignature().returnType();
 

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to     : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp

Reply via email to