org.eigenbase.sql.util
Class SqlShuttle

java.lang.Object
  extended by org.eigenbase.sql.util.SqlBasicVisitor<SqlNode>
      extended by org.eigenbase.sql.util.SqlShuttle
All Implemented Interfaces:
SqlVisitor<SqlNode>
Direct Known Subclasses:
SqlScopedShuttle

public class SqlShuttle
extends SqlBasicVisitor<SqlNode>

Basic implementation of SqlVisitor which returns each leaf node unchanged.

This class is useful as a base class for classes which implement the SqlVisitor interface and have SqlNode as the return type. The derived class can override whichever methods it chooses.

Version:
$Id: //open/dev/farrago/src/org/eigenbase/sql/util/SqlShuttle.java#7 $
Author:
jhyde

Nested Class Summary
protected  class SqlShuttle.CallCopyingArgHandler
          Implementation of SqlShuttle.CallCopyingArgHandler which deep-copies SqlCalls and their operands.
 
Nested classes/interfaces inherited from class org.eigenbase.sql.util.SqlBasicVisitor
SqlBasicVisitor.ArgHandler<R>, SqlBasicVisitor.ArgHandlerImpl<R>
 
Constructor Summary
SqlShuttle()
           
 
Method Summary
 SqlNode visit(SqlCall call)
          Visits a call to a SqlOperator.
 SqlNode visit(SqlDataTypeSpec type)
          Visits a datatype specification.
 SqlNode visit(SqlDynamicParam param)
          Visits a dynamic parameter.
 SqlNode visit(SqlIdentifier id)
          Visits an identifier.
 SqlNode visit(SqlIntervalQualifier intervalQualifier)
          Visits an interval qualifier
 SqlNode visit(SqlLiteral literal)
          Visits a literal.
 SqlNode visit(SqlNodeList nodeList)
          Visits a list of SqlNode objects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SqlShuttle

public SqlShuttle()
Method Detail

visit

public SqlNode visit(SqlLiteral literal)
Description copied from interface: SqlVisitor
Visits a literal.

Specified by:
visit in interface SqlVisitor<SqlNode>
Overrides:
visit in class SqlBasicVisitor<SqlNode>
Parameters:
literal - Literal
See Also:
SqlLiteral.accept(SqlVisitor)

visit

public SqlNode visit(SqlIdentifier id)
Description copied from interface: SqlVisitor
Visits an identifier.

Specified by:
visit in interface SqlVisitor<SqlNode>
Overrides:
visit in class SqlBasicVisitor<SqlNode>
Parameters:
id - identifier
See Also:
SqlIdentifier.accept(SqlVisitor)

visit

public SqlNode visit(SqlDataTypeSpec type)
Description copied from interface: SqlVisitor
Visits a datatype specification.

Specified by:
visit in interface SqlVisitor<SqlNode>
Overrides:
visit in class SqlBasicVisitor<SqlNode>
Parameters:
type - datatype specification
See Also:
SqlDataTypeSpec.accept(SqlVisitor)

visit

public SqlNode visit(SqlDynamicParam param)
Description copied from interface: SqlVisitor
Visits a dynamic parameter.

Specified by:
visit in interface SqlVisitor<SqlNode>
Overrides:
visit in class SqlBasicVisitor<SqlNode>
Parameters:
param - Dynamic parameter
See Also:
SqlDynamicParam.accept(SqlVisitor)

visit

public SqlNode visit(SqlIntervalQualifier intervalQualifier)
Description copied from interface: SqlVisitor
Visits an interval qualifier

Specified by:
visit in interface SqlVisitor<SqlNode>
Overrides:
visit in class SqlBasicVisitor<SqlNode>
Parameters:
intervalQualifier - Interval qualifier
See Also:
SqlIntervalQualifier.accept(SqlVisitor)

visit

public SqlNode visit(SqlCall call)
Description copied from interface: SqlVisitor
Visits a call to a SqlOperator.

Specified by:
visit in interface SqlVisitor<SqlNode>
Overrides:
visit in class SqlBasicVisitor<SqlNode>
Parameters:
call - Call
See Also:
SqlCall.accept(SqlVisitor)

visit

public SqlNode visit(SqlNodeList nodeList)
Description copied from interface: SqlVisitor
Visits a list of SqlNode objects.

Specified by:
visit in interface SqlVisitor<SqlNode>
Overrides:
visit in class SqlBasicVisitor<SqlNode>
Parameters:
nodeList - list of nodes
See Also:
SqlNodeList.accept(SqlVisitor)