Package com.arcadedb.query.sql.parser
Class ProjectionItem
- java.lang.Object
-
- com.arcadedb.query.sql.parser.SimpleNode
-
- com.arcadedb.query.sql.parser.ProjectionItem
-
- All Implemented Interfaces:
Node
public class ProjectionItem extends SimpleNode
-
-
Field Summary
Fields Modifier and Type Field Description protected Boolean
aggregate
protected Identifier
alias
protected boolean
all
protected boolean
exclude
protected Expression
expression
protected NestedProjection
nestedProjection
-
Fields inherited from class com.arcadedb.query.sql.parser.SimpleNode
children, firstToken, id, lastToken, parent, parser, value
-
-
Constructor Summary
Constructors Constructor Description ProjectionItem(int id)
ProjectionItem(Expression expression, Identifier alias, NestedProjection nestedProjection)
ProjectionItem(SqlParser p, int id)
-
Method Summary
-
Methods inherited from class com.arcadedb.query.sql.parser.SimpleNode
childrenAccept, dump, getValue, jjtAccept, jjtAddChild, jjtClose, jjtGetChild, jjtGetFirstToken, jjtGetLastToken, jjtGetNumChildren, jjtGetParent, jjtGetValue, jjtOpen, jjtSetFirstToken, jjtSetLastToken, jjtSetParent, jjtSetValue, toString, toString
-
-
-
-
Field Detail
-
exclude
protected boolean exclude
-
all
protected boolean all
-
alias
protected Identifier alias
-
expression
protected Expression expression
-
aggregate
protected Boolean aggregate
-
nestedProjection
protected NestedProjection nestedProjection
-
-
Constructor Detail
-
ProjectionItem
public ProjectionItem(Expression expression, Identifier alias, NestedProjection nestedProjection)
-
ProjectionItem
public ProjectionItem(int id)
-
ProjectionItem
public ProjectionItem(SqlParser p, int id)
-
-
Method Detail
-
isAll
public boolean isAll()
-
setAll
public void setAll(boolean all)
-
getAlias
public Identifier getAlias()
-
setAlias
public void setAlias(Identifier alias)
-
getExpression
public Expression getExpression()
-
setExpression
public void setExpression(Expression expression)
-
toString
public void toString(Map<String,Object> params, StringBuilder builder)
- Overrides:
toString
in classSimpleNode
-
execute
public Object execute(Record iCurrentRecord, CommandContext ctx)
-
execute
public Object execute(Result iCurrentRecord, CommandContext ctx)
-
getProjectionAliasAsString
public String getProjectionAliasAsString()
returns the final alias for this projection item (the explicit alias, if defined, or the default alias)- Returns:
- the final alias for this projection item
-
getProjectionAlias
public Identifier getProjectionAlias()
-
isExpand
public boolean isExpand()
-
getExpandContent
public ProjectionItem getExpandContent()
-
isAggregate
public boolean isAggregate()
-
splitForAggregation
public ProjectionItem splitForAggregation(AggregateProjectionSplit aggregateSplit)
INTERNAL USE ONLY this has to be invoked ONLY if the item is aggregate!!!- Parameters:
aggregateSplit
-
-
getAggregationContext
public AggregationContext getAggregationContext(CommandContext ctx)
-
copy
public ProjectionItem copy()
- Overrides:
copy
in classSimpleNode
-
extractSubQueries
public void extractSubQueries(SubQueryCollector collector)
-
refersToParent
public boolean refersToParent()
-
serialize
public Result serialize()
-
deserialize
public void deserialize(Result fromResult)
-
setNestedProjection
public void setNestedProjection(NestedProjection nestedProjection)
-
isCacheable
public boolean isCacheable()
-
-