Class PlanNodeBodyServiceQuery.PlanNodeBodyServiceQueryBuilder
- java.lang.Object
-
- com.complexible.stardog.plan.eval.service.ServiceQuery.ServiceQueryBuilder
-
- com.complexible.stardog.plan.eval.service.PlanNodeBodyServiceQuery.PlanNodeBodyServiceQueryBuilder
-
- Direct Known Subclasses:
LogicalServiceQuery.LogicalServiceQueryBuilder
,PlanNodeBodyServiceQuery.CanonicalizedPlanNodeBodyServiceQueryBuilder
- Enclosing class:
- PlanNodeBodyServiceQuery
public abstract static class PlanNodeBodyServiceQuery.PlanNodeBodyServiceQueryBuilder extends ServiceQuery.ServiceQueryBuilder
Base builder forPlanNodeBodyServiceQuery
objects
-
-
Field Summary
Fields Modifier and Type Field Description protected com.complexible.stardog.plan.PlanNode
mBody
protected com.complexible.stardog.plan.cache.TermPositionPredicate
mPositionPredicate
protected java.util.function.IntFunction<java.lang.String>
mVarNames
-
Fields inherited from class com.complexible.stardog.plan.eval.service.ServiceQuery.ServiceQueryBuilder
mServiceTerm
-
-
Constructor Summary
Constructors Constructor Description PlanNodeBodyServiceQueryBuilder()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description PlanNodeBodyServiceQuery.PlanNodeBodyServiceQueryBuilder
assignIDs(com.complexible.stardog.index.dictionary.MappingDictionary mappings)
PlanNodeBodyServiceQuery.PlanNodeBodyServiceQueryBuilder
body(com.complexible.stardog.plan.PlanNode body)
abstract PlanNodeBodyServiceQuery
build()
protected com.complexible.stardog.plan.PlanNode
replaceBodyConstants(com.complexible.stardog.index.dictionary.MappingDictionary dictionary, java.util.function.UnaryOperator<com.complexible.stardog.plan.filter.expr.Constant> mapping, boolean performValidation)
ServiceQuery.ServiceQueryBuilder
replaceConstants(com.complexible.stardog.index.dictionary.MappingDictionary dictionary, java.util.function.UnaryOperator<com.complexible.stardog.plan.filter.expr.Constant> mapping, boolean performValidation)
Replace constants in the query using the provided mapping.PlanNodeBodyServiceQuery.PlanNodeBodyServiceQueryBuilder
scopeOf(java.util.List<PlanNodeBodyServiceQuery> theArgs)
PlanNodeBodyServiceQuery.PlanNodeBodyServiceQueryBuilder
serviceTerm(com.complexible.stardog.plan.QueryTerm term)
PlanNodeBodyServiceQuery.PlanNodeBodyServiceQueryBuilder
termPositionPredicate(com.complexible.stardog.plan.cache.TermPositionPredicate thePredicate)
PlanNodeBodyServiceQuery.PlanNodeBodyServiceQueryBuilder
unionOf(java.util.List<PlanNodeBodyServiceQuery> theArgs)
ServiceQuery.ServiceQueryBuilder
varNames(java.util.function.IntFunction<java.lang.String> varNames)
Propagate a function for mapping internal variable IDs to user-facing variable names.
-
-
-
Method Detail
-
varNames
public ServiceQuery.ServiceQueryBuilder varNames(java.util.function.IntFunction<java.lang.String> varNames)
Description copied from class:ServiceQuery.ServiceQueryBuilder
Propagate a function for mapping internal variable IDs to user-facing variable names. Some services, like the Stored Query Service, need to know it and possibly update when reusing a cached plan.- Specified by:
varNames
in classServiceQuery.ServiceQueryBuilder
-
body
public PlanNodeBodyServiceQuery.PlanNodeBodyServiceQueryBuilder body(com.complexible.stardog.plan.PlanNode body)
-
termPositionPredicate
public PlanNodeBodyServiceQuery.PlanNodeBodyServiceQueryBuilder termPositionPredicate(com.complexible.stardog.plan.cache.TermPositionPredicate thePredicate)
-
serviceTerm
public PlanNodeBodyServiceQuery.PlanNodeBodyServiceQueryBuilder serviceTerm(com.complexible.stardog.plan.QueryTerm term)
- Overrides:
serviceTerm
in classServiceQuery.ServiceQueryBuilder
-
assignIDs
public PlanNodeBodyServiceQuery.PlanNodeBodyServiceQueryBuilder assignIDs(com.complexible.stardog.index.dictionary.MappingDictionary mappings)
-
replaceBodyConstants
protected com.complexible.stardog.plan.PlanNode replaceBodyConstants(com.complexible.stardog.index.dictionary.MappingDictionary dictionary, java.util.function.UnaryOperator<com.complexible.stardog.plan.filter.expr.Constant> mapping, boolean performValidation)
-
replaceConstants
public ServiceQuery.ServiceQueryBuilder replaceConstants(com.complexible.stardog.index.dictionary.MappingDictionary dictionary, java.util.function.UnaryOperator<com.complexible.stardog.plan.filter.expr.Constant> mapping, boolean performValidation)
Description copied from class:ServiceQuery.ServiceQueryBuilder
Replace constants in the query using the provided mapping. Constants that are able to be replaced will be canonicalized forplan caching
. Constants which are not able to be replaced will be cached and only plans with the same constants will be reused. IfperformValidation
is not set, the returned query may be abstract until another call to the same method withperformValidation
set to true. That is,performValidation
set to false indicates we may use canonicalized constants which need not pass query validation. Canonicalized service queries won't be executed unless replaced with concrete constants. todo: this may not be the best name since it's not really about general purpose replacement but specifically about canonicalisation- Overrides:
replaceConstants
in classServiceQuery.ServiceQueryBuilder
-
scopeOf
public PlanNodeBodyServiceQuery.PlanNodeBodyServiceQueryBuilder scopeOf(java.util.List<PlanNodeBodyServiceQuery> theArgs)
-
unionOf
public PlanNodeBodyServiceQuery.PlanNodeBodyServiceQueryBuilder unionOf(java.util.List<PlanNodeBodyServiceQuery> theArgs)
-
build
public abstract PlanNodeBodyServiceQuery build()
- Specified by:
build
in classServiceQuery.ServiceQueryBuilder
-
-