public abstract class ObjectStringTemplateFunctionSymbolImpl extends FunctionSymbolImpl implements ObjectStringTemplateFunctionSymbol
FunctionSymbol.FunctionalTermNullability| Modifier and Type | Field and Description |
|---|---|
protected static String |
PLACE_HOLDER |
protected static com.google.common.collect.ImmutableList<Character> |
SOME_SAFE_SEPARATORS
TODO: enrich this list (incomplete)
|
| Modifier | Constructor and Description |
|---|---|
protected |
ObjectStringTemplateFunctionSymbolImpl(String template,
int arity,
TypeFactory typeFactory) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
areCompatible(String otherTemplate)
Is guaranteed not to return false negative.
|
protected ImmutableTerm |
buildTermAfterEvaluation(com.google.common.collect.ImmutableList<ImmutableTerm> newTerms,
TermFactory termFactory,
VariableNullability variableNullability)
By default, just build a new functional term.
|
boolean |
canBePostProcessed(com.google.common.collect.ImmutableList<? extends ImmutableTerm> arguments)
1.
|
protected IncrementalEvaluation |
evaluateStrictEqWithFunctionalTerm(com.google.common.collect.ImmutableList<? extends ImmutableTerm> terms,
ImmutableFunctionalTerm otherTerm,
TermFactory termFactory,
VariableNullability variableNullability)
Default implementation, can be overridden
|
protected IncrementalEvaluation |
evaluateStrictEqWithNonNullConstant(com.google.common.collect.ImmutableList<? extends ImmutableTerm> terms,
NonNullConstant otherTerm,
TermFactory termFactory,
VariableNullability variableNullability)
Default implementation, does nothing, can be overridden
|
protected static com.google.common.collect.ImmutableList<String> |
extractIntermediateStrings(String template)
Strings between the place holders
|
protected static Pattern |
extractPattern(String template,
boolean surroundWithParentheses) |
String |
getNativeDBString(com.google.common.collect.ImmutableList<? extends ImmutableTerm> terms,
Function<ImmutableTerm,String> termConverter,
TermFactory termFactory)
Returns a String in the native query language.
|
String |
getTemplate() |
protected com.google.common.collect.ImmutableList<DBConstant> |
getTemplateConstants(TermFactory termFactory) |
Optional<TermTypeInference> |
inferType(com.google.common.collect.ImmutableList<? extends ImmutableTerm> terms) |
boolean |
isAlwaysInjectiveInTheAbsenceOfNonInjectiveFunctionalTerms()
When the function symbol is, in the absence of non-injective functional sub-terms, sometimes but not always injective,
please override isInjective(...)
|
protected boolean |
isInjective(int arity,
String template)
Must not produce false positive
|
boolean |
isPreferringToBePostProcessedOverBeingBlocked()
If it is better to be post-processed than being blocked behind an UNION.
|
protected boolean |
mayReturnNullWithoutNullArguments()
Returns false when a functional term with this symbol:
1.
|
protected boolean |
tolerateNulls()
Returns true if is not guaranteed to return NULL when one argument is NULL.
|
analyzeInjectivity, canBeSafelyDecomposedIntoConjunction, decomposeInjectiveTopFunctionalTerm, enableIfElseNullLifting, evaluateIsNotNull, evaluateNullability, evaluateStrictEq, getExpectedBaseType, getExpectedBaseTypes, isAggregation, isDeterministic, isInjective, isNullable, proposeProvenanceVariables, simplify, simplifyAsGuaranteedToBeNonNull, transformIntoRegularArguments, tryToLiftMagicNumbersclone, equals, getArity, getName, hashCode, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitanalyzeInjectivity, evaluateIsNotNull, evaluateNullability, evaluateStrictEq, getExpectedBaseType, isAggregation, isDeterministic, isNullable, proposeProvenanceVariables, simplify, simplifyAsGuaranteedToBeNonNullprotected static final com.google.common.collect.ImmutableList<Character> SOME_SAFE_SEPARATORS
protected static final String PLACE_HOLDER
protected ObjectStringTemplateFunctionSymbolImpl(String template, int arity, TypeFactory typeFactory)
protected boolean isInjective(int arity,
String template)
protected static com.google.common.collect.ImmutableList<String> extractIntermediateStrings(String template)
public String getTemplate()
getTemplate in interface ObjectStringTemplateFunctionSymbolpublic Optional<TermTypeInference> inferType(com.google.common.collect.ImmutableList<? extends ImmutableTerm> terms)
inferType in interface FunctionSymbolprotected ImmutableTerm buildTermAfterEvaluation(com.google.common.collect.ImmutableList<ImmutableTerm> newTerms, TermFactory termFactory, VariableNullability variableNullability)
FunctionSymbolImplbuildTermAfterEvaluation in class FunctionSymbolImplprotected com.google.common.collect.ImmutableList<DBConstant> getTemplateConstants(TermFactory termFactory)
public boolean isAlwaysInjectiveInTheAbsenceOfNonInjectiveFunctionalTerms()
FunctionSymbolImplisAlwaysInjectiveInTheAbsenceOfNonInjectiveFunctionalTerms in class FunctionSymbolImplprotected boolean mayReturnNullWithoutNullArguments()
FunctionSymbolImplmayReturnNullWithoutNullArguments in class FunctionSymbolImplprotected boolean tolerateNulls()
FunctionSymbolImpltolerateNulls in class FunctionSymbolImplpublic boolean canBePostProcessed(com.google.common.collect.ImmutableList<? extends ImmutableTerm> arguments)
FunctionSymbolcanBePostProcessed in interface FunctionSymbolpublic String getNativeDBString(com.google.common.collect.ImmutableList<? extends ImmutableTerm> terms, Function<ImmutableTerm,String> termConverter, TermFactory termFactory)
DBFunctionSymbolSerializergetNativeDBString in interface DBFunctionSymbolSerializerprotected IncrementalEvaluation evaluateStrictEqWithFunctionalTerm(com.google.common.collect.ImmutableList<? extends ImmutableTerm> terms, ImmutableFunctionalTerm otherTerm, TermFactory termFactory, VariableNullability variableNullability)
FunctionSymbolImplevaluateStrictEqWithFunctionalTerm in class FunctionSymbolImplprotected boolean areCompatible(String otherTemplate)
protected static Pattern extractPattern(String template, boolean surroundWithParentheses)
protected IncrementalEvaluation evaluateStrictEqWithNonNullConstant(com.google.common.collect.ImmutableList<? extends ImmutableTerm> terms, NonNullConstant otherTerm, TermFactory termFactory, VariableNullability variableNullability)
FunctionSymbolImplevaluateStrictEqWithNonNullConstant in class FunctionSymbolImplpublic boolean isPreferringToBePostProcessedOverBeingBlocked()
DBFunctionSymbolisPreferringToBePostProcessedOverBeingBlocked in interface DBFunctionSymbolCopyright © 2009–2020 Free University of Bozen-Bolzano. All rights reserved.