org.apache.derby.impl.sql.compile
Class LikeEscapeOperatorNode
- java.lang.Object
-
- org.apache.derby.impl.sql.compile.QueryTreeNode
-
- org.apache.derby.impl.sql.compile.ValueNode
-
- org.apache.derby.impl.sql.compile.LikeEscapeOperatorNode
-
- All Implemented Interfaces:
- Visitable
public final class LikeEscapeOperatorNode extends ValueNode
This node represents a like comparison operator (no escape) If the like pattern is a constant or a parameter then if possible the like is modified to include a >= and < operator. In some cases the like can be eliminated. By adding =, >= or < operators it may allow indexes to be used to greatly narrow the search range of the query, and allow optimizer to estimate number of rows to affected. constant or parameter LIKE pattern with prefix followed by optional wild card e.g. Derby% CHAR(n), VARCHAR(n) where n < 255 >= prefix padded with ' ' to length n -- e.g. Derby <= prefix appended with '' -- e.g. Derby [ can eliminate LIKE if constant. ] CHAR(n), VARCHAR(n), LONG VARCHAR where n >= 255 >= prefix backed up one characer <= prefix appended with '' no elimination of like parameter like pattern starts with wild card e.g. %Derby CHAR(n), VARCHAR(n) where n <= 256 >= ' ' padded with ' ' to length n <= '' no elimination of like CHAR(n), VARCHAR(n), LONG VARCHAR where n > 256 >= NULL <= '' Note that the Unicode value '' is defined as not a character value and can be used by a program for any purpose. We use it to set an upper bound on a character range with a less than predicate. We only need a single '' appended because the string 'Derby' is not a valid String because '' is not a valid character.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidbindComparisonOperator()Bind this operatorjava.lang.StringtoString()Convert this object to a String.-
Methods inherited from class org.apache.derby.impl.sql.compile.ValueNode
checkIsBoolean, selectivity, setCollationInfo, setCollationInfo, setNullability, updatableByCursor
-
Methods inherited from class org.apache.derby.impl.sql.compile.QueryTreeNode
accept, addTag, bindOffsetFetch, bindRowMultiSet, bindUserCatalogType, bindUserType, checkReliability, checkReliability, createTypeDependency, getBeginOffset, getDataDictionary, getEndOffset, getExecutionFactory, getGenericConstantActionFactory, getOffsetOrderedNodes, getOptimizerFactory, getOptimizerTracer, getParameterTypes, getUDTDesc, isAtomic, makeConstantAction, makeTableName, makeTableName, optimizerTracingIsOn, orReliability, referencesSessionSchema, setBeginOffset, setEndOffset, taggedWith, treePrint
-
-
-
-
Method Detail
-
bindComparisonOperator
public void bindComparisonOperator() throws StandardExceptionBind this operator- Throws:
StandardException- Thrown on error
-
-
DataMelt 3.0 © DataMelt by jWork.ORG