org.makumba.providers
Interface QueryAnalysis

All Known Implementing Classes:
HqlAnalyzer, MqlQueryAnalysis

public interface QueryAnalysis

This interface describes the result of a query analysis.

Since:
0.5.5.10
Version:
$Id: OQLAnalyzer.java,v 2.1 2007/07/18 16:04:57 manuel_gay Exp $
Author:
Cristian Bogdan, Manuel Gay

Method Summary
 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.
 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
 Collection<String> getWarnings()
          Get the warnings resulted from query analysis
 

Method Detail

getQuery

String getQuery()
Gets the original query that is analyzed by this object


getProjectionType

DataDefinition getProjectionType()
Gets the type of the fields between SELECT and FROM

Returns:
A DataDefinition containing in the first field the type and name of the first QL projection, the second field the type and name of the second QL projection $2 etc.

getLabelTypes

Map<String,DataDefinition> getLabelTypes()
Gets the type of the fields between FROM and WHERE

Returns:
A DataDefinition containing in the first field the type and name of the first label, the second field the type and name of the second label $2 etc.

getLabelType

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

Parameters:
labelName - the name of the label
Returns:
The type of the label as declared in the FROM part of the query

getParameterTypes

DataDefinition getParameterTypes()
Gets the types of the query parameters, as resulted from the query analysis.

Returns:
A DataDefinition containing in the first field the type of the QL parameter mentioned first in the query. Each mentioning of a parameter new will get a new field in this DataDefinition!

getWarnings

Collection<String> getWarnings()
Get the warnings resulted from query analysis

Returns:
a collection of warnings, as strings

getPass1Tree

antlr.collections.AST getPass1Tree()
return the pass1 (syntax) AST tree

Returns: