public class QueryTemplateBuilder extends Object implements Externalizable
ExpNode
The builder converts the expression tree to ranges.
The ranges are optimized , merged and attached to the expression node.Constructor and Description |
---|
QueryTemplateBuilder() |
QueryTemplateBuilder(AbstractDMLQuery query) |
Modifier and Type | Method and Description |
---|---|
void |
build(AndNode node)
Build QueryTemplatePacket from
AndNode |
void |
build(ColumnNode node)
Build QueryTemplatePacket from
AndNode |
void |
build(ExpNode node,
short op)
Build QueryTemplatePacket from
ExpNode |
void |
build(ExpNode node,
short op,
short nullOp)
Build QueryTemplatePacket from
ExpNode |
void |
build(InNode node)
Build QueryTemplatePacket from
InNode (special conversion) |
void |
build(LikeNode node,
short op)
Build QueryTemplatePacket from
LikeNode (special conversion) |
void |
build(NotInNode node)
Build QueryTemplatePacket from
NotInNode (special conversion) |
void |
build(NotLikeNode node)
Special build for not like - since it can't be translated to a space template.
|
void |
build(OrNode node)
Build QueryTemplatePacket from
OrNode |
void |
build(RelationNode node) |
void |
buildContainsItemsRootTemplate(ContainsItemsRootNode rn) |
void |
buildContainsTemplate(ContainsNode containsNode)
Build QueryTemplatePacket for contains.
|
static QueryTemplatePacket |
buildTemplate(InNode node,
AbstractDMLQuery query) |
QueryTemplatePacket |
buildTemplate(LiteralNode node,
QueryColumnData queryColumnData,
short op,
short nullOp,
FunctionCallDescription functionCallDescription,
ExpNode father)
Build space template
|
static QueryTemplatePacket |
buildTemplate(NotInNode node,
AbstractDMLQuery query) |
void |
readExternal(ObjectInput in) |
static Range |
toRange(String colName,
FunctionCallDescription functionCallDescription,
Object value,
short matchCode)
Converts single external entry expression to a range
|
static Range |
toRange(String colName,
FunctionCallDescription functionCallDescription,
Object value,
short matchCode,
ExpNode node,
AbstractDMLQuery query) |
void |
traverseExpressionTree(ExpNode root)
Traverse the binary expression tree non-recursively using a custom stack The tree has to be
traversed in postorder - the parent is traversed after its children.
|
void |
writeExternal(ObjectOutput out) |
public QueryTemplateBuilder()
public QueryTemplateBuilder(AbstractDMLQuery query)
query
- public void buildContainsTemplate(ContainsNode containsNode) throws SQLException
SQLException
public void buildContainsItemsRootTemplate(ContainsItemsRootNode rn) throws SQLException
SQLException
public void build(ExpNode node, short op, short nullOp) throws SQLException
ExpNode
SQLException
public void build(RelationNode node) throws SQLException
SQLException
public void build(ExpNode node, short op) throws SQLException
ExpNode
SQLException
public void build(LikeNode node, short op) throws SQLException
LikeNode
(special conversion)SQLException
public void build(InNode node) throws SQLException
InNode
(special conversion)SQLException
public void build(NotInNode node) throws SQLException
NotInNode
(special conversion)SQLException
public static QueryTemplatePacket buildTemplate(NotInNode node, AbstractDMLQuery query) throws SQLException
SQLException
public static QueryTemplatePacket buildTemplate(InNode node, AbstractDMLQuery query) throws SQLException
SQLException
public QueryTemplatePacket buildTemplate(LiteralNode node, QueryColumnData queryColumnData, short op, short nullOp, FunctionCallDescription functionCallDescription, ExpNode father) throws SQLException
SQLException
public static Range toRange(String colName, FunctionCallDescription functionCallDescription, Object value, short matchCode)
public static Range toRange(String colName, FunctionCallDescription functionCallDescription, Object value, short matchCode, ExpNode node, AbstractDMLQuery query)
public void build(AndNode node) throws SQLException
AndNode
SQLException
public void build(OrNode node) throws SQLException
OrNode
SQLException
public void traverseExpressionTree(ExpNode root) throws SQLException
SQLException
public void build(NotLikeNode node) throws SQLException
SQLException
public void build(ColumnNode node) throws SQLException
AndNode
SQLException
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
Copyright © GigaSpaces.