Documentation of 'org.apache.derby.impl.sql.compile.LikeEscapeOperatorNode' Java class
LikeEscapeOperatorNode
org.apache.derby.impl.sql.compile

Class 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 Detail

      • toString

        public java.lang.String toString()
        Convert this object to a String. See comments in QueryTreeNode.java for how this should be done for tree printing.
        Overrides:
        toString in class ValueNode
        Returns:
        This object as a String

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.