William Candillon has proposed merging lp:~zorba-coders/zorba/skiplimit into 
lp:zorba.

Commit message:
Add offset limit clauses to the FLWOR.

Requested reviews:
  William Candillon (wcandillon)
  Markos Zaharioudakis (markos-za)

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

Add offset limit clauses to the FLWOR.
These clauses are similar to limit and offset from SQL.
For example:
for $i in (1 to 10)
offset 5
limit 2
return $i
-- 
https://code.launchpad.net/~zorba-coders/zorba/skiplimit/+merge/173126
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'src/compiler/parser/parser.y'
--- src/compiler/parser/parser.y	2013-06-17 20:05:21 +0000
+++ src/compiler/parser/parser.y	2013-07-05 04:45:36 +0000
@@ -325,6 +325,8 @@
 %token QUOTE                            "'\"'"
 %token RBRACE                           "'}'"
 %token RBRACK                           "']'"
+%token OFFSET                            "'offset'"
+%token LIMIT                            "'limit'"
 %token RETURN                           "'return'"
 %token RPAR                             "')'"
 %token SATISFIES                        "'satisfies'"
@@ -693,6 +695,7 @@
 %type <expr> ExprSimple
 %type <expr> ExtensionExpr
 %type <expr> FLWORExpr
+%type <expr> OffsetLimitExpr
 %type <expr> ReturnExpr
 %type <expr> PostfixExpr
 %type <expr> FunctionCall
@@ -904,7 +907,7 @@
 %destructor { release_hack( $$ ); } AxisStep
 
 // exprnodes
-%destructor { release_hack( $$ ); } AdditiveExpr AndExpr CDataSection CastExpr CastableExpr CommonContent ComparisonExpr CompAttrConstructor CompCommentConstructor CompDocConstructor CompElemConstructor CompPIConstructor CompNamespaceConstructor CompTextConstructor ComputedConstructor Constructor ContextItemExpr DirCommentConstructor DirElemConstructor DirElemContent DirPIConstructor DirectConstructor BracedExpr BlockExpr EnclosedStatementsAndOptionalExpr BlockStatement Statement Statements StatementsAndExpr StatementsAndOptionalExpr StatementsAndOptionalExprTop SwitchStatement TypeswitchStatement TryStatement CatchListStatement CatchStatement ApplyStatement IfStatement FLWORStatement ReturnStatement VarDeclStatement Expr ExprSingle ExprSimple ExtensionExpr FLWORExpr ReturnExpr PostfixExpr FunctionCall IfExpr InstanceofExpr IntersectExceptExpr Literal MultiplicativeExpr NumericLiteral OrExpr OrderedExpr ParenthesizedExpr PathExpr Predicate PrimaryExpr QuantifiedExpr QueryBody RangeExpr RelativePathExpr StepExpr StringLiteral TreatExpr StringConcatExpr SwitchExpr TypeswitchExpr UnaryExpr UnionExpr UnorderedExpr ValidateExpr ValueExpr SimpleMapExpr VarRef TryExpr CatchListExpr CatchExpr DeleteExpr InsertExpr RenameExpr ReplaceExpr TransformExpr VarNameList VarNameDecl AssignStatement ExitStatement WhileStatement FlowCtlStatement QNAME EQNAME FUNCTION_NAME FTContainsExpr
+%destructor { release_hack( $$ ); } AdditiveExpr AndExpr CDataSection CastExpr CastableExpr CommonContent ComparisonExpr CompAttrConstructor CompCommentConstructor CompDocConstructor CompElemConstructor CompPIConstructor CompNamespaceConstructor CompTextConstructor ComputedConstructor Constructor ContextItemExpr DirCommentConstructor DirElemConstructor DirElemContent DirPIConstructor DirectConstructor BracedExpr BlockExpr EnclosedStatementsAndOptionalExpr BlockStatement Statement Statements StatementsAndExpr StatementsAndOptionalExpr StatementsAndOptionalExprTop SwitchStatement TypeswitchStatement TryStatement CatchListStatement CatchStatement ApplyStatement IfStatement FLWORStatement ReturnStatement VarDeclStatement Expr ExprSingle ExprSimple ExtensionExpr FLWORExpr OffsetLimitExpr ReturnExpr PostfixExpr FunctionCall IfExpr InstanceofExpr IntersectExceptExpr Literal MultiplicativeExpr NumericLiteral OrExpr OrderedExpr ParenthesizedExpr PathExpr Predicate PrimaryExpr QuantifiedExpr QueryBody RangeExpr RelativePathExpr StepExpr StringLiteral TreatExpr StringConcatExpr SwitchExpr TypeswitchExpr UnaryExpr UnionExpr UnorderedExpr ValidateExpr ValueExpr SimpleMapExpr VarRef TryExpr CatchListExpr CatchExpr DeleteExpr InsertExpr RenameExpr ReplaceExpr TransformExpr VarNameList VarNameDecl AssignStatement ExitStatement WhileStatement FlowCtlStatement QNAME EQNAME FUNCTION_NAME FTContainsExpr
 
 // internal non-terminals with values
 %destructor { delete $$; } FunctionSig VarNameAndType NameTestList DecimalFormatParam DecimalFormatParamList
@@ -973,6 +976,10 @@
 %nonassoc SIMPLEMAPEXPR_REDUCE
 %left BANG
 
+%nonassoc SKIPLIMIT_REDUCE
+%left OFFSET
+%left LIMIT
+
 /*_____________________________________________________________________
  *
  * resolve shift-reduce conflict for
@@ -2584,6 +2591,19 @@
 
 
 FLWORExpr :
+    FLWORClauseList %prec SKIPLIMIT_REDUCE OffsetLimitExpr ReturnExpr
+    {
+      OffsetLimitExpr *sl = dynamic_cast<OffsetLimitExpr*>($2);
+      ReturnExpr *re = dynamic_cast<ReturnExpr*>($3);
+      $$ = new FLWORExpr(LOC(@$),
+                         dynamic_cast<FLWORClauseList*>($1),
+                         re->get_return_val(),
+                         re->get_location(),
+                         driver.theCompilerCB->theConfig.force_gflwor,
+		         sl);
+      delete $3;
+    }
+  |
     FLWORClauseList ReturnExpr
     {
       ReturnExpr *re = dynamic_cast<ReturnExpr*>($2);
@@ -2605,6 +2625,30 @@
 ;
 
 
+OffsetLimitExpr :
+  OFFSET ExprSingle
+  {
+    $$ = new OffsetLimitExpr(LOC(@$), $2, NULL); 
+  }
+|
+  LIMIT ExprSingle
+  {
+    $$ = new OffsetLimitExpr(LOC(@$), NULL, $2); 
+  }
+| OffsetLimitExpr OFFSET ExprSingle
+  {
+    OffsetLimitExpr *ol = dynamic_cast<OffsetLimitExpr*>($1);
+    ol->offset = $3;
+    $$ = ol; 
+  }
+| OffsetLimitExpr LIMIT ExprSingle
+  {
+    OffsetLimitExpr *ol = dynamic_cast<OffsetLimitExpr*>($1);
+    ol->limit = $3;
+    $$ = ol; 
+  }
+;
+
 WindowType :
     SLIDING WINDOW
     {
@@ -7139,6 +7183,8 @@
     |   END                     { $$ = new QName(LOC(@$), SYMTAB(SYMTAB_PUT("end"))); }
     |   MOST                    { $$ = new QName(LOC(@$), SYMTAB(SYMTAB_PUT("most"))); }
     |   SKIP                    { $$ = new QName(LOC(@$), SYMTAB(SYMTAB_PUT("skip"))); }
+    |   LIMIT                   { $$ = new QName(LOC(@$), SYMTAB(SYMTAB_PUT("limit"))); }
+    |   OFFSET                  { $$ = new QName(LOC(@$), SYMTAB(SYMTAB_PUT("offset"))); }
     |   COPY                    { $$ = new QName(LOC(@$), SYMTAB(SYMTAB_PUT("copy"))); }
     |   GENERAL                 { $$ = new QName(LOC(@$), SYMTAB(SYMTAB_PUT("general"))); }
     |   VALUE                   { $$ = new QName(LOC(@$), SYMTAB(SYMTAB_PUT("value"))); }

=== modified file 'src/compiler/parser/scanner.l'
--- src/compiler/parser/scanner.l	2013-04-23 13:20:31 +0000
+++ src/compiler/parser/scanner.l	2013-07-05 04:45:36 +0000
@@ -557,6 +557,8 @@
 "by" { return token::BY; }
 "stable" { return token::STABLE; }
 "or" { return token::OR; }
+"limit" { return token::LIMIT; }
+"offset" { return token::OFFSET; }
 "return" { return token::RETURN; }
 #ifdef JSONIQ_SCANNER
 "select" { return token::RETURN; }

=== modified file 'src/compiler/parsetree/parsenode_print_xml_visitor.cpp'
--- src/compiler/parsetree/parsenode_print_xml_visitor.cpp	2013-06-07 13:46:26 +0000
+++ src/compiler/parsetree/parsenode_print_xml_visitor.cpp	2013-07-05 04:45:36 +0000
@@ -749,6 +749,7 @@
 BEGIN_END_TAG (FlowCtlStatement)
 BEGIN_END_TAG (FLWORClauseList)
 BEGIN_END_TAG (FLWORExpr)
+BEGIN_END_TAG (OffsetLimitExpr)
 BEGIN_END_TAG (FLWORWinCond)
 BEGIN_END_TAG (ForClause)
 END_TAG (ForwardAxis)

=== modified file 'src/compiler/parsetree/parsenode_print_xqdoc_visitor.cpp'
--- src/compiler/parsetree/parsenode_print_xqdoc_visitor.cpp	2013-06-18 23:53:59 +0000
+++ src/compiler/parsetree/parsenode_print_xqdoc_visitor.cpp	2013-07-05 04:45:36 +0000
@@ -1555,6 +1555,8 @@
 XQDOC_NO_BEGIN_END_TAG (TypedFunctionTest)
 XQDOC_NO_BEGIN_END_TAG (DynamicFunctionInvocation)
 
+XQDOC_NO_BEGIN_END_TAG (OffsetLimitExpr)
+
 };
 
 void print_parsetree_xqdoc(

=== modified file 'src/compiler/parsetree/parsenode_print_xquery_visitor.cpp'
--- src/compiler/parsetree/parsenode_print_xquery_visitor.cpp	2013-06-07 13:46:26 +0000
+++ src/compiler/parsetree/parsenode_print_xquery_visitor.cpp	2013-07-05 04:45:36 +0000
@@ -1552,6 +1552,20 @@
     }
     DEFAULT_END_VISIT (IfExpr)
 
+    void* begin_visit(const OffsetLimitExpr& n)
+    {
+      if(n.offset) {
+        os << "offset ";
+        n.offset->accept(*this);
+      }
+      if(n.limit) {
+        os << "limit ";
+        n.limit->accept(*this);
+      }
+      return 0;
+    }
+    DEFAULT_END_VISIT (OffsetLimitExpr)
+
     void* begin_visit(const InstanceofExpr& n)
     {
       n.get_treat_expr()->accept(*this);

=== modified file 'src/compiler/parsetree/parsenode_visitor.h'
--- src/compiler/parsetree/parsenode_visitor.h	2013-06-17 13:32:23 +0000
+++ src/compiler/parsetree/parsenode_visitor.h	2013-07-05 04:45:36 +0000
@@ -212,6 +212,7 @@
   DECL_PARSENODE_VISITOR_VISIT_MEM_FNS( UnorderedExpr );
   DECL_PARSENODE_VISITOR_VISIT_MEM_FNS( ValidateExpr );
   DECL_PARSENODE_VISITOR_VISIT_MEM_FNS( VarRef );
+  DECL_PARSENODE_VISITOR_VISIT_MEM_FNS( OffsetLimitExpr );
 
 /* update-related */
   DECL_PARSENODE_VISITOR_VISIT_MEM_FNS( DeleteExpr );

=== modified file 'src/compiler/parsetree/parsenodes.cpp'
--- src/compiler/parsetree/parsenodes.cpp	2013-06-17 18:00:35 +0000
+++ src/compiler/parsetree/parsenodes.cpp	2013-07-05 04:45:36 +0000
@@ -1377,12 +1377,14 @@
     rchandle<FLWORClauseList> clauses_,
     rchandle<exprnode> ret_,
     const QueryLoc& return_loc_,
-    bool force_general)
+    bool force_general,
+    rchandle<OffsetLimitExpr> aSL)
   :
   exprnode(loc),
   clauses(clauses_),
   return_val_h(ret_),
-  return_location(return_loc_)
+  return_location(return_loc_),
+  offset_limit_val_h(aSL) 
 {
   for (unsigned i = 0; i < clauses->size (); i++)
   {
@@ -1408,6 +1410,9 @@
 void FLWORExpr::accept( parsenode_visitor &v ) const
 {
   BEGIN_VISITOR();
+  if(offset_limit_val_h) {
+    ACCEPT (offset_limit_val_h);
+  }
   ACCEPT (clauses);
   ACCEPT (return_val_h);
   END_VISITOR();
@@ -6309,6 +6314,17 @@
   END_VISITOR();
 }
 
+void OffsetLimitExpr::accept(parsenode_visitor& v) const
+{
+  BEGIN_VISITOR();
+  if(limit) {
+    ACCEPT(limit);
+  }
+  if(offset) {
+    ACCEPT(offset);
+  }
+  END_VISITOR();
+}
 
 ///////////////////////////////////////////////////////////////////////////////
 

=== modified file 'src/compiler/parsetree/parsenodes.h'
--- src/compiler/parsetree/parsenodes.h	2013-06-17 18:00:35 +0000
+++ src/compiler/parsetree/parsenodes.h	2013-07-05 04:45:36 +0000
@@ -167,7 +167,7 @@
 class OptionDecl;
 class OrderingModeDecl;
 class OrExpr;
-
+class OffsetLimitExpr;
 class FLWORExpr;
 class FLWORClauseList;
 class FLWORClause;
@@ -1931,12 +1931,15 @@
   QueryLoc                  return_location;
 
 public:
+  rchandle<OffsetLimitExpr> offset_limit_val_h;
+
   FLWORExpr(
         const QueryLoc& loc_,
         rchandle<FLWORClauseList> clauses_,
         rchandle<exprnode> ret_,
         const QueryLoc& return_loc_,
-        bool force_general = false);
+        bool force_general = false,
+	rchandle<OffsetLimitExpr> aSL = 0);
 
   bool is_general() const { return general; }
 
@@ -2481,6 +2484,17 @@
   void accept(parsenode_visitor&) const;
 };
 
+class OffsetLimitExpr: public exprnode
+{
+  public:
+    rchandle<exprnode> offset;
+    rchandle<exprnode> limit;
+
+  public:
+    OffsetLimitExpr(const QueryLoc& loc_, rchandle<exprnode> aOffset, rchandle<exprnode> aLimit): exprnode(loc_), offset(aOffset), limit(aLimit){}
+    void accept(parsenode_visitor&) const;
+};
+
 
 /*******************************************************************************
   ReturnExpr ::= "return" ExprSingle

=== modified file 'src/compiler/translator/translator.cpp'
--- src/compiler/translator/translator.cpp	2013-06-27 00:05:25 +0000
+++ src/compiler/translator/translator.cpp	2013-07-05 04:45:36 +0000
@@ -689,6 +689,8 @@
   IndexDecl_t                            theIndexDecl;
   bool                                   theIsInIndexDomain;
 
+  bool                                   theIsInOffsetLimitDomain;
+
   bool                                   hadBSpaceDecl;
   bool                                   hadBUriDecl;
   bool                                   hadConstrDecl;
@@ -744,6 +746,7 @@
   theHaveContextItemDecl(false),
   theTempVarCounter(1),
   theIsInIndexDomain(false),
+  theIsInOffsetLimitDomain(false),
   hadBSpaceDecl(false),
   hadBUriDecl(false),
   hadConstrDecl(false),
@@ -1380,8 +1383,14 @@
     if (raiseError)
     {
       zstring varName = static_context::var_name(qnameItem);
-      RAISE_ERROR(err::XPST0008, loc,
-      ERROR_PARAMS(ZED(XPST0008_VariableName_2), varName));
+      if(!theIsInOffsetLimitDomain) {
+        RAISE_ERROR(err::XPST0008, loc,
+         ERROR_PARAMS(ZED(XPST0008_VariableName_2), varName));
+      } else {
+         RAISE_ERROR(err::XPST0008, loc,
+           ERROR_PARAMS(ZED(XPST0008_VariableName_3), varName));
+
+      }
     }
 
     return NULL;
@@ -2053,6 +2062,28 @@
 #endif
 }
 
+void wrap_in_subsequence_expr(
+  expr* aExpr, const QueryLoc& loc,
+  expr* offset, expr* limit 
+) {
+  std::vector<zorba::expr*> lArgs;
+  lArgs.push_back(aExpr);
+  lArgs.push_back(offset);
+  fo_expr* subExpr;
+  if(limit) {
+    lArgs.push_back(limit);
+    subExpr = theExprManager->create_fo_expr(
+      theRootSctx, theUDF, loc, BUILTIN_FUNC(FN_SUBSEQUENCE_3), lArgs
+    ); 
+  } else {
+    subExpr = theExprManager->create_fo_expr(
+      theRootSctx, theUDF, loc, BUILTIN_FUNC(FN_SUBSEQUENCE_2), lArgs
+    ); 
+  }
+  normalize_fo(static_cast<fo_expr*>(subExpr));
+  push_nodestack(subExpr);
+}
+
 
 /*******************************************************************************
   Collect the var_exprs for all variables that (a) are defined by some clause
@@ -6853,6 +6884,17 @@
                       OrderByClause?
 
 ********************************************************************************/
+void* begin_visit(const OffsetLimitExpr& v) {
+  TRACE_VISIT();
+  theIsInOffsetLimitDomain = true;
+  return no_state;
+}
+
+void end_visit(const OffsetLimitExpr& v, void*) {
+  TRACE_VISIT_OUT();
+  theIsInOffsetLimitDomain = false;
+}
+
 void* begin_visit(const FLWORExpr& v)
 {
   TRACE_VISIT();
@@ -6937,8 +6979,22 @@
     flwor->add_clause(theFlworClausesStack[i]);
 
   theFlworClausesStack.resize(curClausePos);
-
-  push_nodestack(flwor);
+  
+  if(v.offset_limit_val_h) {
+    expr* lOffset = NULL;
+    expr* lLimit = NULL;
+    if(v.offset_limit_val_h->offset) {
+	lOffset = pop_nodestack();
+    } else {
+	lOffset = CREATE(const)(theRootSctx, theUDF, v.offset_limit_val_h->get_location(), numeric_consts<xs_integer>::one());
+    }
+    if(v.offset_limit_val_h->limit) {
+	lLimit = pop_nodestack();
+    }
+    wrap_in_subsequence_expr(flwor, v.offset_limit_val_h->get_location(), lOffset, lLimit);
+  } else {
+    push_nodestack(flwor);
+  }
 }
 
 

=== modified file 'src/diagnostics/diagnostic_en.xml'
--- src/diagnostics/diagnostic_en.xml	2013-06-24 23:16:24 +0000
+++ src/diagnostics/diagnostic_en.xml	2013-07-05 04:45:36 +0000
@@ -203,6 +203,10 @@
         <value>"$2": undeclared variable</value>
       </entry>
 
+      <entry key="VariableName_3">
+        <value>"$2": undeclared variable. Offset and limit clauses can only reference variables from the parent scope of the FLWOR expression.</value>
+      </entry>
+
       <entry key="SchemaAttributeName_2">
         <value>"$2": undefined schema-attribute name</value>
       </entry>

=== modified file 'src/diagnostics/pregenerated/dict_en.cpp'
--- src/diagnostics/pregenerated/dict_en.cpp	2013-06-25 00:41:44 +0000
+++ src/diagnostics/pregenerated/dict_en.cpp	2013-07-05 04:45:36 +0000
@@ -907,6 +907,7 @@
   { "~XPST0008_SchemaAttributeName_2", "\"$2\": undefined schema-attribute name" },
   { "~XPST0008_SchemaElementName_2", "\"$2\": undefined schema-element name" },
   { "~XPST0008_VariableName_2", "\"$2\": undeclared variable" },
+  { "~XPST0008_VariableName_3", "\"$2\": undeclared variable. Offset and limit clauses can only reference variables from the parent scope of the FLWOR expression." },
   { "~XPST0051_Atomic_2", "\"$2\": not defined an atomic type" },
   { "~XPST0051_GenAtomic_2", "\"$2\": not defined a generalized atomic type" },
   { "~XPTY0004_JSONIQ_SELECTOR", "can not atomize and/or cast value of type $2 to string" },

=== modified file 'src/diagnostics/pregenerated/dict_zed_keys.h'
--- src/diagnostics/pregenerated/dict_zed_keys.h	2013-06-25 00:41:44 +0000
+++ src/diagnostics/pregenerated/dict_zed_keys.h	2013-07-05 04:45:36 +0000
@@ -37,6 +37,7 @@
 #define ZED_XPST0003_PiTarget "~XPST0003_PiTarget"
 #define ZED_XPST0003_ExternalVar "~XPST0003_ExternalVar"
 #define ZED_XPST0008_VariableName_2 "~XPST0008_VariableName_2"
+#define ZED_XPST0008_VariableName_3 "~XPST0008_VariableName_3"
 #define ZED_XPST0008_SchemaAttributeName_2 "~XPST0008_SchemaAttributeName_2"
 #define ZED_XPST0008_SchemaElementName_2 "~XPST0008_SchemaElementName_2"
 #define ZED_XPST0051_GenAtomic_2 "~XPST0051_GenAtomic_2"

=== added directory 'test/rbkt/ExpQueryResults/zorba/offset-limit'
=== added file 'test/rbkt/ExpQueryResults/zorba/offset-limit/offset-limit-1.xml.res'
--- test/rbkt/ExpQueryResults/zorba/offset-limit/offset-limit-1.xml.res	1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/offset-limit/offset-limit-1.xml.res	2013-07-05 04:45:36 +0000
@@ -0,0 +1,1 @@
+5 6

=== added file 'test/rbkt/ExpQueryResults/zorba/offset-limit/offset-limit-2.xml.res'
--- test/rbkt/ExpQueryResults/zorba/offset-limit/offset-limit-2.xml.res	1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/offset-limit/offset-limit-2.xml.res	2013-07-05 04:45:36 +0000
@@ -0,0 +1,1 @@
+5 6 7 8 9 10

=== added file 'test/rbkt/ExpQueryResults/zorba/offset-limit/offset-limit-3.xml.res'
--- test/rbkt/ExpQueryResults/zorba/offset-limit/offset-limit-3.xml.res	1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/offset-limit/offset-limit-3.xml.res	2013-07-05 04:45:36 +0000
@@ -0,0 +1,1 @@
+1 2 3 4 5

=== added file 'test/rbkt/ExpQueryResults/zorba/offset-limit/offset-limit-4.xml.res'
--- test/rbkt/ExpQueryResults/zorba/offset-limit/offset-limit-4.xml.res	1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/offset-limit/offset-limit-4.xml.res	2013-07-05 04:45:36 +0000
@@ -0,0 +1,1 @@
+5

=== added directory 'test/rbkt/Queries/zorba/offset-limit'
=== added file 'test/rbkt/Queries/zorba/offset-limit/offset-limit-1.xq'
--- test/rbkt/Queries/zorba/offset-limit/offset-limit-1.xq	1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/offset-limit/offset-limit-1.xq	2013-07-05 04:45:36 +0000
@@ -0,0 +1,4 @@
+for $i in (1 to 10)
+offset 5
+limit 2
+return $i

=== added file 'test/rbkt/Queries/zorba/offset-limit/offset-limit-2.xq'
--- test/rbkt/Queries/zorba/offset-limit/offset-limit-2.xq	1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/offset-limit/offset-limit-2.xq	2013-07-05 04:45:36 +0000
@@ -0,0 +1,3 @@
+for $i in (1 to 10)
+offset 5
+return $i

=== added file 'test/rbkt/Queries/zorba/offset-limit/offset-limit-3.xq'
--- test/rbkt/Queries/zorba/offset-limit/offset-limit-3.xq	1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/offset-limit/offset-limit-3.xq	2013-07-05 04:45:36 +0000
@@ -0,0 +1,3 @@
+for $i in (1 to 10)
+limit 5
+return $i

=== added file 'test/rbkt/Queries/zorba/offset-limit/offset-limit-4.xq'
--- test/rbkt/Queries/zorba/offset-limit/offset-limit-4.xq	1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/offset-limit/offset-limit-4.xq	2013-07-05 04:45:36 +0000
@@ -0,0 +1,7 @@
+for $i in (1 to 10)
+offset 2
+limit 5
+limit 2
+offset 5
+limit 1
+return $i

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