saffron.util
Class SqlToOpenjavaConverter
java.lang.Object
|
+--saffron.util.SqlToOpenjavaConverter
- public class SqlToOpenjavaConverter
- extends Object
A SqlToOpenjavaConverter
converts a tree of
SqlNode
s a ParseTree
tree.
- Since:
- Mar 19, 2003
- Version:
- $Id: //open/saffron/src/main/saffron/util/SqlToOpenjavaConverter.java#4 $
- Author:
- jhyde
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
validator
private SqlValidator validator
testContext
private static SqlToOpenjavaConverter.TestContext testContext
binaryMap
private static final HashMap binaryMap
SqlToOpenjavaConverter
SqlToOpenjavaConverter()
SqlToOpenjavaConverter
public SqlToOpenjavaConverter(SqlNode query,
SqlValidator.CatalogReader catalogReader)
init
private void init(SqlNode query,
SqlValidator.CatalogReader catalogReader)
convertQuery
public Expression convertQuery(SqlNode query)
convertSelect
public Expression convertSelect(SqlSelect query)
convertOrder
private ExpressionList convertOrder(SqlValidator.Scope scope,
SqlNodeList orderList)
testOrder
public void testOrder(TestCase test)
check
private void check(TestCase test,
String s)
getTestContext
private SqlToOpenjavaConverter.TestContext getTestContext()
convertExpression
private Expression convertExpression(SqlValidator.Scope scope,
SqlNode node)
createBinaryMap
private static HashMap createBinaryMap()
convertIdentifier
private Expression convertIdentifier(SqlValidator.Scope scope,
SqlIdentifier identifier)
- Converts an identifier into an expression in a given scope. For example,
the "empno" in "select empno from emp join dept" becomes "emp.empno".
convertLiteral
private Expression convertLiteral(SqlLiteral literal)
testConvert
public void testConvert(TestCase test)
convertFrom
private Expression convertFrom(SqlValidator.Scope scope,
SqlNode from)
convertJoinType
private static int convertJoinType(int joinType)
convertGroup
private ExpressionList convertGroup(SqlValidator.Scope scope,
SqlNodeList groupList)
convertSelectList
private ExpressionList convertSelectList(SqlValidator.SelectScope scope,
SqlNodeList selectList)
suite
public static Test suite()
- Standard method recognised by JUnit.