Package com.arcadedb.query.sql.parser
Class SubQueryCollector
- java.lang.Object
-
- com.arcadedb.query.sql.parser.SubQueryCollector
-
public class SubQueryCollector extends Object
This class is used by the query planner to extract subqueries and move them to LET clause
An example:
select from foo where name in (select name from bar)
will become
select from foo<br> let _$$$SUBQUERY$$_0 = (select name from bar)<br> where name in _$$$SUBQUERY$$_0- Author:
- Luigi Dell'Aquila (luigi.dellaquila-(at)-gmail.com)
-
-
Field Summary
Fields Modifier and Type Field Description protected static String
GENERATED_ALIAS_PREFIX
protected int
nextAliasId
protected Map<Identifier,Statement>
subQueries
-
Constructor Summary
Constructors Constructor Description SubQueryCollector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Identifier
addStatement(Identifier alias, Statement stm)
Identifier
addStatement(Statement stm)
protected Identifier
getNextAlias()
Map<Identifier,Statement>
getSubQueries()
void
reset()
clean the content, but NOT the counter!
-
-
-
Field Detail
-
GENERATED_ALIAS_PREFIX
protected static final String GENERATED_ALIAS_PREFIX
- See Also:
- Constant Field Values
-
nextAliasId
protected int nextAliasId
-
subQueries
protected Map<Identifier,Statement> subQueries
-
-
Method Detail
-
getNextAlias
protected Identifier getNextAlias()
-
reset
public void reset()
clean the content, but NOT the counter!
-
addStatement
public Identifier addStatement(Identifier alias, Statement stm)
-
addStatement
public Identifier addStatement(Statement stm)
-
getSubQueries
public Map<Identifier,Statement> getSubQueries()
-
-