|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectorg.makumba.providers.query.mql.MqlQueryAnalysis
public class MqlQueryAnalysis
| Field Summary | |
|---|---|
static Pattern |
patternInSet
|
static String |
regExpInSET
|
| Constructor Summary | |
|---|---|
MqlQueryAnalysis(String query,
boolean optimizeJoins,
boolean autoLeftJoin)
|
|
| Method Summary | |
|---|---|
String |
getFieldOfExpr(String expr)
|
DataDefinition |
getLabelType(String labelName)
Gets the type of a label used within the query FIXME: remove, inline everywhere as getLabelTypes().get(labelName) for that to work, OQL and MQL need to put their aliases also in the Map returned by getLabelTypes() HQL does not support aliases in the first place |
Map<String,DataDefinition> |
getLabelTypes()
Gets the type of the fields between FROM and WHERE |
DataDefinition |
getParameterTypes()
Gets the types of the query parameters, as resulted from the query analysis. |
DataDefinition |
getProjectionType()
Gets the type of the fields between SELECT and FROM |
String |
getQuery()
Gets the original query that is analyzed by this object |
DataDefinition |
getTypeOfExprField(String expr)
|
(package private) static boolean |
isNil(antlr.collections.AST a)
|
int |
parameterAt(int index)
Gets the number of the parameter mentioned at the position indicated by the given index. query parameters may not get mentioned in the order of their $number, for example $1 may not appear first in the query, $2 may not appear second in the query, etc. |
int |
parameterNumber()
Gets the total number of parameters in the query; like $1, $2 etc. |
static String |
preProcess(String query)
|
(package private) static void |
setNullTest(antlr.collections.AST a)
|
static String |
showAst(antlr.collections.AST ast)
|
(package private) void |
transformOQL(antlr.collections.AST a)
|
String |
writeInSQLQuery(NameResolver nr)
generate SQL |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String regExpInSET
public static final Pattern patternInSet
| Constructor Detail |
|---|
public MqlQueryAnalysis(String query,
boolean optimizeJoins,
boolean autoLeftJoin)
| Method Detail |
|---|
public String writeInSQLQuery(NameResolver nr)
QueryAnalysis
writeInSQLQuery in interface QueryAnalysisnr - the NameResolver that maps DataDefinition names to database names
public String getQuery()
QueryAnalysis
getQuery in interface QueryAnalysispublic DataDefinition getLabelType(String labelName)
QueryAnalysis
getLabelType in interface QueryAnalysislabelName - the name of the label
public Map<String,DataDefinition> getLabelTypes()
QueryAnalysis
getLabelTypes in interface QueryAnalysispublic DataDefinition getParameterTypes()
QueryAnalysis
getParameterTypes in interface QueryAnalysispublic DataDefinition getProjectionType()
QueryAnalysis
getProjectionType in interface QueryAnalysispublic String getFieldOfExpr(String expr)
public DataDefinition getTypeOfExprField(String expr)
public int parameterAt(int index)
QueryAnalysis
parameterAt in interface QueryAnalysisQueryAnalysis.parameterNumber()public int parameterNumber()
QueryAnalysis
parameterNumber in interface QueryAnalysisQueryAnalysis.parameterAt(int)void transformOQL(antlr.collections.AST a)
public static String showAst(antlr.collections.AST ast)
static boolean isNil(antlr.collections.AST a)
static void setNullTest(antlr.collections.AST a)
public static String preProcess(String query)
|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||