Github user JamesRTaylor commented on a diff in the pull request:

    https://github.com/apache/phoenix/pull/229#discussion_r109999394
  
    --- Diff: phoenix-core/src/main/antlr3/PhoenixSQL.g ---
    @@ -742,7 +751,26 @@ upsert_column_refs returns 
[Pair<List<ColumnDef>,List<ColumnName>> ret]
         :  d=dyn_column_name_or_def { if (d.getDataType()!=null) { 
$ret.getFirst().add(d); } $ret.getSecond().add(d.getColumnDefName()); } 
            (COMMA d=dyn_column_name_or_def { if (d.getDataType()!=null) { 
$ret.getFirst().add(d); } $ret.getSecond().add(d.getColumnDefName()); } )*
     ;
    -   
    +
    +// Parse a full declare cursor expression structure.
    +declare_cursor_node returns [DeclareCursorStatement ret]
    +    :    DECLARE c=cursor_name CURSOR FOR s=select_node
    +        {ret = factory.declareCursor(c, s); }
    +    ;
    +
    +cursor_open_node returns [OpenStatement ret]
    +    :    OPEN c=cursor_name {ret = factory.open(c);}
    +    ;
    +
    +cursor_close_node returns [CloseStatement ret]
    +    :    CLOSE c=cursor_name {ret = factory.close(c);}
    +    ;
    +
    +cursor_fetch_node returns [FetchStatement ret]
    +    :    FETCH NEXT (a=NUMBER)? (ROW|ROWS)? FROM c=cursor_name {ret = 
factory.fetch(c,true, a == null ? 1 :  Integer.parseInt( a.getText() )); }
    +    |    FETCH PRIOR (a=NUMBER)? (ROW|ROWS)? FROM c=cursor_name {ret = 
factory.fetch(c,false, a == null ? 1 :  Integer.parseInt( a.getText() )); }
    --- End diff --
    
    How is FETCH PRIOR implemented?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to