|
|
|||||||||||
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
The hearth of the MQL query analysis and compilation. The query is first pre-processed and then the initial parsing takes place to produce the initial mql tree. After this, the tree is transformed by the MqlSqlWalker for analysis and finally transformed again for sql query generation.
Nested Class Summary | |
---|---|
static class |
MqlQueryAnalysis.ParamConstant
|
Field Summary | |
---|---|
protected Vector<String> |
generatedLabels
|
protected DataDefinition |
insertIn
|
static String |
MAKUMBA_PARAM
|
Constructor Summary | |
---|---|
MqlQueryAnalysis(antlr.collections.AST pass1,
DataDefinition knownLabels)
constructs a query analysis given the pass1 AST tree and a set of known labels (used for MDD function parameters) |
|
MqlQueryAnalysis(String queryAndInsert,
boolean optimizeJoins,
boolean autoLeftJoin)
|
Method Summary | |
---|---|
String |
createLabel()
|
(package private) static String |
formatQueryAndInsert(String query,
String insertIn)
|
antlr.ASTFactory |
getAnalyserFactory()
|
antlr.collections.AST |
getAnalyserTree()
|
Map<String,Object> |
getConstantValues()
|
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 |
boolean |
getNoFrom()
|
List<String> |
getParameterOrder()
|
DataDefinition |
getParameterTypes()
Gets the types of the query parameters, as resulted from the query analysis. |
antlr.collections.AST |
getPass1Tree()
return the pass1 (syntax) AST tree |
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)
|
Collection<String> |
getWarnings()
Get the warnings resulted from query analysis |
(package private) static boolean |
isNil(antlr.collections.AST a)
|
(package private) static void |
setNullTest(antlr.collections.AST a)
|
static String |
showAst(antlr.collections.AST ast)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String MAKUMBA_PARAM
protected DataDefinition insertIn
protected Vector<String> generatedLabels
Constructor Detail |
---|
public MqlQueryAnalysis(antlr.collections.AST pass1, DataDefinition knownLabels)
pass1
- the pass1 treeknownLabels
- the known labelsMqlQueryAnalysis(String queryAndInsert, boolean optimizeJoins, boolean autoLeftJoin)
Method Detail |
---|
static String formatQueryAndInsert(String query, String insertIn)
public String getQuery()
QueryAnalysis
getQuery
in interface QueryAnalysis
public DataDefinition getLabelType(String labelName)
QueryAnalysis
getLabelType
in interface QueryAnalysis
labelName
- the name of the label
public Map<String,DataDefinition> getLabelTypes()
QueryAnalysis
getLabelTypes
in interface QueryAnalysis
public DataDefinition getParameterTypes()
QueryAnalysis
getParameterTypes
in interface QueryAnalysis
public DataDefinition getProjectionType()
QueryAnalysis
getProjectionType
in interface QueryAnalysis
public String getFieldOfExpr(String expr)
public DataDefinition getTypeOfExprField(String expr)
public static String showAst(antlr.collections.AST ast)
static boolean isNil(antlr.collections.AST a)
static void setNullTest(antlr.collections.AST a)
public String createLabel()
public antlr.collections.AST getAnalyserTree()
public antlr.ASTFactory getAnalyserFactory()
public boolean getNoFrom()
public List<String> getParameterOrder()
public Map<String,Object> getConstantValues()
public antlr.collections.AST getPass1Tree()
QueryAnalysis
getPass1Tree
in interface QueryAnalysis
public Collection<String> getWarnings()
QueryAnalysis
getWarnings
in interface QueryAnalysis
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |