net.sf.saffron.sql
Class SqlNode

java.lang.Object
  |
  +--net.sf.saffron.sql.SqlNode
Direct Known Subclasses:
SqlCall, SqlIdentifier, SqlLiteral, SqlNodeList

public abstract class SqlNode
extends Object

A SqlNode is a SQL parse tree. It may be an operator, literal, identifier, and so forth.

Since:
Dec 12, 2003
Version:
$Id: //open/saffron/src/net/sf/saffron/oj/xlat/SqlToOpenjavaConverter.java#7 $
Author:
jhyde

Nested Class Summary
static class SqlNode.DatabaseMetaDataInvocationHandler
          Handles particular DatabaseMetaData methods; invocations of other methods will fall through to the base class, BarfingInvocationHandler, which will throw an error.
 
Constructor Summary
(package private) SqlNode()
           
 
Method Summary
abstract  Object clone()
           
static SqlNode[] cloneArray(SqlNode[] nodes)
           
private static DatabaseMetaData dummyDatabaseMetaData()
           
 SqlKind getKind()
          Returns the type of node this is, or SqlKind.Other if it's nothing special.
 boolean isA(SqlKind kind)
          Returns whether this node is a particular kind.
 String toString()
           
 String toString(SqlDialect dialect)
          Returns the text of the tree of which this SqlNode is the root.
(package private) abstract  void unparse(SqlWriter writer, int leftPrec, int rightPrec)
          Writes a SQL representation of this node to a writer.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SqlNode

SqlNode()
Method Detail

clone

public abstract Object clone()
Overrides:
clone in class Object

isA

public boolean isA(SqlKind kind)
Returns whether this node is a particular kind.

Parameters:
kind - a SqlKind value

getKind

public SqlKind getKind()
Returns the type of node this is, or SqlKind.Other if it's nothing special.

Returns:
a SqlKind value, never null

cloneArray

public static SqlNode[] cloneArray(SqlNode[] nodes)

toString

public String toString()
Overrides:
toString in class Object

toString

public String toString(SqlDialect dialect)
Returns the text of the tree of which this SqlNode is the root.


unparse

abstract void unparse(SqlWriter writer,
                      int leftPrec,
                      int rightPrec)
Writes a SQL representation of this node to a writer.


dummyDatabaseMetaData

private static DatabaseMetaData dummyDatabaseMetaData()

SourceForge.net_Logo