Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## gudusoft.gsqlparser.stmt.oracle
Class TPlsqlLoopStmt

    java.lang.Object
      gudusoft.gsqlparser.nodes.TParseTreeNode
          gudusoft.gsqlparser.TCustomSqlStatement
              gudusoft.gsqlparser.stmt.TBlockSqlStatement
                  gudusoft.gsqlparser.stmt.oracle.TPlsqlLoopStmt

All Implemented Interfaces:
  Visitable

    public class TPlsqlLoopStmt

extends TBlockSqlStatement

A LOOP statement executes a sequence of statements multiple times. PL/SQL provides these loop statements:

- Basic loop
- WHILE loop
- FOR loop

  FOR indexName IN lower_bound .. upper_bound LOOP statements END LOOP

- Cursor FOR loop

See Also:
  `TBlockSqlStatement.bodyStatements`

Field Summary
`static int` | `basic_loop`
`static int` | `cursor_for_loop`
`static int` | `for_loop`
`static int` | `while_loop`

Fields inherited from class gudusoft.gsqlparser.TCustomSqlStatement
`dbvendor, dummytag, joins, parser, plsqlparser, rootNode, sourcetokenlist, sqlstatementtype, tables`

Constructor Summary
`TPlsqlLoopStmt()`
`TPlsqlLoopStmt(EDbVendor dbvendor)`

Method Summary
`void` | `accept(TParseTreeVisitor v)`
`int` | `doParseStatement(TCustomSqlStatement psql)`
`TExpression` | `getCondition()` Used in while-loop-statement
`TObjectName` | `getCursorName()`
`TExpressionList` | `getCursorParameterNames()`
`TObjectName` | `getIndexName()` An undeclared identifier that names the loop index.
`int` | `getKind()`
`TExpression` | `getLower_bound()` Used in for-loop-statement.
`TObjectName` | `getRecordName()`
`TSelectSqlStatement` | `getSubquery()`
`TExpression` | `getUpper_bound()` Used in for-loop-statement.
`void` | `init(java.lang.Object arg1)` Initialize a query tree node.
`void` | `init(java.lang.Object arg1, java.lang.Object arg2)`
`void` | `init(java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3)`
`void` | `init(java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3, java.lang.Object arg4)`
`boolean` | `isReverse()`
`void` | `setCursorParameterNames(TExpressionList cursorParameterNames)`
`void` | `setKind(int kind)`
`void` | `setReverse(boolean reverse)`
`void` | `setSubquery(TSelectSqlStatement subquery)`

Methods inherited from class gudusoft.gsqlparser.stmt.TBlockSqlStatement
`getBodyStatements`

Methods inherited from class gudusoft.gsqlparser.TCustomSqlStatement
`addWhereClause, analyzeFromTable, analyzeJoin, analyzeTablename, checkNonQualifiedColumnReferenceInSubQueryOfUplevelStmt, getCteList, getErrorCount, getLabelName, getOutputClause, getParentStmt, getResultColumnList, getReturningClause, getStatements, getSymbolTable, getTargetTable, getTopClause, getTopStatement, getWhereClause, isnzplsql, isoracleplsql, ispgplsql, linkColumnReferenceToTable, locateVariableOrParameter, OracleStatementCanBeSeparatedByBeginEndPair, parsestatement, setCteList, setLabelName, setOutputClause, setParentStmt, setResultColumnList, setReturningClause, setTargetTable, setTopClause, setWhereClause`

Methods inherited from class gudusoft.gsqlparser.nodes.TParseTreeNode
`addAllMyTokensToTokenList, doParse, getColumnNo, getDummyTag, getEndToken, getGsqlparser, getLineNo, getNodeType, getStartToken, init, init, setDummyTag, setEndToken, setEndToken, setGsqlparser, setNodeType, setStartToken, setStartToken, setString, toString`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### basic_loop

    public static final int basic_loop

See Also:
  Constant Field Values

### while_loop

    public static final int while_loop

See Also:
  Constant Field Values

### for_loop

    public static final int for_loop

See Also:
  Constant Field Values

### cursor_for_loop

    public static final int cursor_for_loop

See Also:
  Constant Field Values

Constructor Detail

### TPlsqlLoopStmt

    public TPlsqlLoopStmt()

### TPlsqlLoopStmt

    public TPlsqlLoopStmt(EDbVendor dbvendor)

Method Detail

### setKind

    public void setKind(int kind)

### getKind

    public int getKind()

  Returns:
    What's kind of loop statement: simple, while or for.

### getIndexName

    public TObjectName getIndexName()

  An undeclared identifier that names the loop index. Or, it should be a record-name when kind is cursor_for_loop.

  Returns:
    Index name used in for-loop-statement.

### getRecordName

    public TObjectName getRecordName()

### setReverse

    public void setReverse(boolean reverse)

### isReverse

    public boolean isReverse()

### getUpper_bound

    public TExpression getUpper_bound()

  Used in for-loop-statement.

  Returns:

### getLower_bound

    public TExpression getLower_bound()

  Used in for-loop-statement.

  Returns:

### setSubquery

    public void setSubquery(TSelectSqlStatement subquery)

### getSubquery

    public TSelectSqlStatement getSubquery()

  Returns:
    Select statement when `kind` is cursor_for_loop.

### setCursorParameterNames

    public void setCursorParameterNames(TExpressionList cursorParameterNames)

### getCursorParameterNames

    public TExpressionList getCursorParameterNames()

  Returns:
    Cursor parameter names when `kind` is cursor_for_loop if any.

### init

    public void init(java.lang.Object arg1)

  Description copied from class: `TParseTreeNode`
  Initialize a query tree node.

  Overrides:
    `init` in class `TParseTreeNode`

### init

    public void init(java.lang.Object arg1,
                     java.lang.Object arg2)

  Overrides:
    `init` in class `TParseTreeNode`

### init

    public void init(java.lang.Object arg1,
                     java.lang.Object arg2,
                     java.lang.Object arg3)

  Overrides:
    `init` in class `TParseTreeNode`

### init

    public void init(java.lang.Object arg1,
                     java.lang.Object arg2,
                     java.lang.Object arg3,
                     java.lang.Object arg4)

  Overrides:
    `init` in class `TParseTreeNode`

### getCursorName

    public TObjectName getCursorName()

  Returns:
    Cursor name when `kind` is cursor_for_loop.

### getCondition

    public TExpression getCondition()

  Used in while-loop-statement

  Returns:
    If and only if the value of this expression is TRUE, the statements in while will execute.

### doParseStatement

    public int doParseStatement(TCustomSqlStatement psql)

  Overrides:
    `doParseStatement` in class `TCustomSqlStatement`

### accept

    public void accept(TParseTreeVisitor v)

  Specified by:
    `accept` in interface `Visitable`
  Overrides:
    `accept` in class `TParseTreeNode`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD