Class ServiceQuery.ServiceQueryBuilder
- java.lang.Object
-
- com.complexible.stardog.plan.eval.service.ServiceQuery.ServiceQueryBuilder
-
- Direct Known Subclasses:
PlanNodeBodyServiceQuery.PlanNodeBodyServiceQueryBuilder
- Enclosing class:
- ServiceQuery
public abstract static class ServiceQuery.ServiceQueryBuilder extends java.lang.Object
Base service query builder class.
-
-
Field Summary
Fields Modifier and Type Field Description protected com.complexible.stardog.plan.QueryTerm
mServiceTerm
-
Constructor Summary
Constructors Constructor Description ServiceQueryBuilder()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract ServiceQuery
build()
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.ServiceQuery.ServiceQueryBuilder
serviceTerm(com.complexible.stardog.plan.QueryTerm term)
abstract 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
-
serviceTerm
public ServiceQuery.ServiceQueryBuilder serviceTerm(com.complexible.stardog.plan.QueryTerm term)
-
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)
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
-
varNames
public abstract ServiceQuery.ServiceQueryBuilder varNames(java.util.function.IntFunction<java.lang.String> varNames)
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.
-
build
public abstract ServiceQuery build()
-
-