Class PlanNodeBodyServiceQuery.CanonicalizedPlanNodeBodyServiceQueryBuilder
java.lang.Object
com.complexible.stardog.plan.eval.service.ServiceQuery.ServiceQueryBuilder
com.complexible.stardog.plan.eval.service.PlanNodeBodyServiceQuery.PlanNodeBodyServiceQueryBuilder
com.complexible.stardog.plan.eval.service.PlanNodeBodyServiceQuery.CanonicalizedPlanNodeBodyServiceQueryBuilder
- Enclosing class:
PlanNodeBodyServiceQuery
public static class PlanNodeBodyServiceQuery.CanonicalizedPlanNodeBodyServiceQueryBuilder
extends PlanNodeBodyServiceQuery.PlanNodeBodyServiceQueryBuilder
-
Field Summary
Fields inherited from class com.complexible.stardog.plan.eval.service.PlanNodeBodyServiceQuery.PlanNodeBodyServiceQueryBuilder
mBody, mPositionPredicate, mVarNamesFields inherited from class com.complexible.stardog.plan.eval.service.ServiceQuery.ServiceQueryBuilder
mServiceTerm -
Constructor Summary
ConstructorsConstructorDescriptionCanonicalizedPlanNodeBodyServiceQueryBuilder(PlanNodeBodyServiceQuery.PlanNodeBodyServiceQueryBuilder theConcreteBuilder) -
Method Summary
Modifier and TypeMethodDescriptionbuild()replaceConstants(com.complexible.stardog.index.dictionary.MappingDictionary dictionary, UnaryOperator<com.complexible.stardog.plan.filter.expr.Constant> mapping, boolean performValidation) Replace constants in the query using the provided mapping.varNames(IntFunction<String> varNames) Propagate a function for mapping internal variable IDs to user-facing variable names.Methods inherited from class com.complexible.stardog.plan.eval.service.PlanNodeBodyServiceQuery.PlanNodeBodyServiceQueryBuilder
assignIDs, body, optimize, replaceBodyConstants, scopeOf, serviceTerm, termPositionPredicate, unionOf
-
Constructor Details
-
CanonicalizedPlanNodeBodyServiceQueryBuilder
public CanonicalizedPlanNodeBodyServiceQueryBuilder(PlanNodeBodyServiceQuery.PlanNodeBodyServiceQueryBuilder theConcreteBuilder)
-
-
Method Details
-
replaceConstants
public ServiceQuery.ServiceQueryBuilder replaceConstants(com.complexible.stardog.index.dictionary.MappingDictionary dictionary, 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 classPlanNodeBodyServiceQuery.PlanNodeBodyServiceQueryBuilder
-
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.- Overrides:
varNamesin classPlanNodeBodyServiceQuery.PlanNodeBodyServiceQueryBuilder
-
build
- Specified by:
buildin classPlanNodeBodyServiceQuery.PlanNodeBodyServiceQueryBuilder
-