|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.sf.saffron.oj.xlat.SqlToOpenjavaConverter
A SqlToOpenjavaConverter
converts a tree of SqlNode
objects a ParseTree
tree.
Nested Class Summary | |
static class |
SqlToOpenjavaConverter.ConverterTest
Unit test for SqlToOpenjavaConverter . |
static class |
SqlToOpenjavaConverter.SchemaCatalogReader
A SchemaCatalogReader looks up catalog information from a
saffron schema object . |
(package private) static class |
SqlToOpenjavaConverter.TestContext
|
Field Summary | |
(package private) static HashMap |
mapBinaryOjToSql
Inverse of mapBinarySqlToOj . |
(package private) static HashMap |
mapBinarySqlToOj
Maps names of SqlBinaryOperator to codes of
BinaryExpression , wrapped as Integer . |
private static SqlToOpenjavaConverter.TestContext |
testContext
|
private SqlValidator |
validator
|
Constructor Summary | |
SqlToOpenjavaConverter(SqlValidator validator)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static SqlToOpenjavaConverter.TestContext testContext
static final HashMap mapBinarySqlToOj
SqlBinaryOperator
to codes of
BinaryExpression
, wrapped as Integer
. For example,
mapBinarySqlToOj.get("/")
returns
Integer(BinaryExpression.DIVIDE
.
static final HashMap mapBinaryOjToSql
mapBinarySqlToOj
.
private final SqlValidator validator
Constructor Detail |
public SqlToOpenjavaConverter(SqlValidator validator)
Method Detail |
public Expression convertQuery(SqlNode query)
public Expression convertSelect(SqlSelect query)
public static Test suite()
private static SqlToOpenjavaConverter.TestContext getTestContext()
private Expression convertExpression(SqlValidator.Scope scope, SqlNode node)
private Expression convertFrom(SqlValidator.Scope scope, SqlNode from)
private static int convertJoinType(SqlJoinOperator.JoinType joinType)
private ExpressionList convertGroup(SqlValidator.Scope scope, SqlNodeList groupList)
private Expression convertLiteral(SqlLiteral literal)
private ExpressionList convertOrder(SqlValidator.Scope scope, SqlNodeList orderList)
private Expression convertQueryRecursive(SqlNode query)
private static void initMaps()
private static void addBinary(String name, int code)
private static HashMap createPrefixMap()
private static HashMap createPostfixMap()
private static HashMap createFunctionMap()
private Expression convertIdentifier(SqlValidator.Scope scope, SqlIdentifier identifier)
private QueryExpression convertRowConstructor(SqlValidator.Scope scope, SqlCall rowConstructor)
private ExpressionList convertSelectList(SqlValidator.SelectScope scope, SqlNodeList selectList)
private Expression convertValues(SqlValidator.Scope scope, SqlCall values)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |