gudusoft.gsqlparser.stmt.oracle
Class TPlsqlCursorDeclStmt

java.lang.Object
  extended by gudusoft.gsqlparser.nodes.TParseTreeNode
      extended by gudusoft.gsqlparser.TCustomSqlStatement
          extended by gudusoft.gsqlparser.stmt.oracle.TPlsqlStmt
              extended by gudusoft.gsqlparser.stmt.oracle.TPlsqlCursorDeclStmt
All Implemented Interfaces:
Visitable

public class TPlsqlCursorDeclStmt
extends TPlsqlStmt

Represents cursor related statement, including:

Cursor declaration

Cursor specification

Cursor body

Ref cursor type definition


Field Summary
static int kind_cursor_body
           
static int kind_cursor_declaration
           
static int kind_cursor_specification
           
static int kind_ref_cursor_type_definition
           
 
Fields inherited from class gudusoft.gsqlparser.TCustomSqlStatement
dbvendor, dummytag, joins, parser, plsqlparser, rootNode, sourcetokenlist, sqlstatementtype, tables
 
Constructor Summary
TPlsqlCursorDeclStmt()
           
TPlsqlCursorDeclStmt(EDbVendor dbvendor)
           
 
Method Summary
 void accept(TParseTreeVisitor v)
           
 int doParseStatement(TCustomSqlStatement psql)
           
 TObjectName getCursorName()
          Name of an explicit cursor.
 TParameterDeclarationList getCursorParameterDeclarations()
          List of cursor parameter declaration, which is represented by TParameterDeclaration.
 TObjectName getCursorTypeName()
          Name of a REF CURSOR type.
 int getKind()
          what's kind of SQL stateemnt this class represents for.
 TTypeName getRowtype()
          A record type that represents a row in a database table or a row fetched from a previously declared cursor or cursor variable.
 TSelectSqlStatement getSubquery()
          A SQL SELECT statement.
 void init(java.lang.Object arg1)
          Initialize a query tree node.
 void setCursorName(TObjectName cursorName)
           
 void setCursorParameterDeclarations(TParameterDeclarationList cursorParameterDeclarations)
           
 void setCursorTypeName(TObjectName cursorTypeName)
           
 void setKind(int kind)
           
 void setRowtype(TTypeName rowtype)
           
 
Methods inherited from class gudusoft.gsqlparser.stmt.oracle.TPlsqlStmt
getEndlabelName, getLabelName, setEndlabelName, setLabelName
 
Methods inherited from class gudusoft.gsqlparser.TCustomSqlStatement
addWhereClause, analyzeFromTable, analyzeJoin, analyzeTablename, checkNonQualifiedColumnReferenceInSubQueryOfUplevelStmt, getCteList, getErrorCount, getOutputClause, getParentStmt, getResultColumnList, getReturningClause, getStatements, getSymbolTable, getTargetTable, getTopClause, getTopStatement, getWhereClause, isnzplsql, isoracleplsql, ispgplsql, linkColumnReferenceToTable, locateVariableOrParameter, OracleStatementCanBeSeparatedByBeginEndPair, parsestatement, setCteList, 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, init, 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

kind_cursor_declaration

public static final int kind_cursor_declaration
See Also:
Constant Field Values

kind_cursor_specification

public static final int kind_cursor_specification
See Also:
Constant Field Values

kind_cursor_body

public static final int kind_cursor_body
See Also:
Constant Field Values

kind_ref_cursor_type_definition

public static final int kind_ref_cursor_type_definition
See Also:
Constant Field Values
Constructor Detail

TPlsqlCursorDeclStmt

public TPlsqlCursorDeclStmt()

TPlsqlCursorDeclStmt

public TPlsqlCursorDeclStmt(EDbVendor dbvendor)
Method Detail

setKind

public void setKind(int kind)

getKind

public int getKind()
what's kind of SQL stateemnt this class represents for.


getSubquery

public TSelectSqlStatement getSubquery()
A SQL SELECT statement. If the cursor declaration declares parameters, each parameter must appear in select_statement.

Returns:

doParseStatement

public int doParseStatement(TCustomSqlStatement psql)
Overrides:
doParseStatement in class TCustomSqlStatement

init

public void init(java.lang.Object arg1)
Description copied from class: TParseTreeNode
Initialize a query tree node.

Overrides:
init in class TParseTreeNode

setCursorName

public void setCursorName(TObjectName cursorName)

getCursorName

public TObjectName getCursorName()
Name of an explicit cursor.

Returns:

getCursorParameterDeclarations

public TParameterDeclarationList getCursorParameterDeclarations()
List of cursor parameter declaration, which is represented by TParameterDeclaration.

Returns:

setCursorParameterDeclarations

public void setCursorParameterDeclarations(TParameterDeclarationList cursorParameterDeclarations)

setRowtype

public void setRowtype(TTypeName rowtype)

getRowtype

public TTypeName getRowtype()
A record type that represents a row in a database table or a row fetched from a previously declared cursor or cursor variable.

Returns:

setCursorTypeName

public void setCursorTypeName(TObjectName cursorTypeName)

getCursorTypeName

public TObjectName getCursorTypeName()
Name of a REF CURSOR type. Valid only when kind = kind_ref_cursor_type_definition To create a cursor variable, define a REF CURSOR type, and then declare the cursor variable to be of that type. Declaring a cursor variable creates a pointer, not an item.

Returns:

accept

public void accept(TParseTreeVisitor v)
Specified by:
accept in interface Visitable
Overrides:
accept in class TParseTreeNode