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 forPlanNodeBodyServiceQueryobjects
-
-
Field Summary
Fields Modifier and Type Field Description protected com.complexible.stardog.plan.PlanNodemBodyprotected com.complexible.stardog.plan.cache.TermPositionPredicatemPositionPredicateprotected 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.PlanNodeBodyServiceQueryBuilderassignIDs(com.complexible.stardog.index.dictionary.MappingDictionary mappings)PlanNodeBodyServiceQuery.PlanNodeBodyServiceQueryBuilderbody(com.complexible.stardog.plan.PlanNode body)abstract PlanNodeBodyServiceQuerybuild()protected com.complexible.stardog.plan.PlanNodereplaceBodyConstants(com.complexible.stardog.index.dictionary.MappingDictionary dictionary, java.util.function.UnaryOperator<com.complexible.stardog.plan.filter.expr.Constant> mapping, boolean performValidation)ServiceQuery.ServiceQueryBuilderreplaceConstants(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.PlanNodeBodyServiceQueryBuilderscopeOf(java.util.List<PlanNodeBodyServiceQuery> theArgs)PlanNodeBodyServiceQuery.PlanNodeBodyServiceQueryBuilderserviceTerm(com.complexible.stardog.plan.QueryTerm term)PlanNodeBodyServiceQuery.PlanNodeBodyServiceQueryBuildertermPositionPredicate(com.complexible.stardog.plan.cache.TermPositionPredicate thePredicate)PlanNodeBodyServiceQuery.PlanNodeBodyServiceQueryBuilderunionOf(java.util.List<PlanNodeBodyServiceQuery> theArgs)ServiceQuery.ServiceQueryBuildervarNames(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.ServiceQueryBuilderPropagate 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:
varNamesin 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:
serviceTermin 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.ServiceQueryBuilderReplace 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. IfperformValidationis not set, the returned query may be abstract until another call to the same method withperformValidationset to true. That is,performValidationset 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:
replaceConstantsin 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:
buildin classServiceQuery.ServiceQueryBuilder
-
-