Mapping the LIKE operator: LikeOpMapper element
The LikeOpMapper element is used for customizing the mapping of the LIKE operator. The default template is $P0 LIKE $P1 ESCAPE '@'. $P1 is the pattern against which to compare the string $P0. $P0 and $P1 are both of type VARCHAR.
To map the LIKE operator, do the following:
*
Determine whether the database has an equivalent for the LIKE operator. The database equivalent must be able to support escaping special characters in the pattern, for example through the ESCAPE clause. If no database equivalent exists, disable the mapping by setting the Disabled attribute to true.
*
Identify the character that the database uses for matching a single character. For example, standard SQL uses the underscore (_). Set the SingleMatchChar attribute to this character. If no such character exists, disable the mapping by setting the Disabled attribute to true.
*
Identify the character that the database uses for matching any number of characters. For example, standard SQL uses the percent sign (%). Set the GreedyMatchChar attribute to this character. If no such character exists, disable the mapping by setting the Disabled attribute to true.
*
Determine how special characters are escaped on the database. Typically, you specify an escape character, for example backslash (\), using an ESCAPE clause in the LIKE template, for example $P0 LIKE $P1 ESCAPE '\'. You then specify the EscapeTemplate attribute to show how to escape special characters. For example, \$ indicates that the backslash precedes the special character.
*
Identify any additional special characters that the database recognizes within the pattern. For example, some databases allow pattern matching using the square bracket syntax [a-z0-9]. In this case, the square brackets must be escaped whenever the Integration service pushes queries to the database to ensure that the database interprets these characters as literals.
The attributes used for customizing the LIKE operator mapping are listed in Table 11-9.
Set to true to disable the mapping for the LIKE operator.
Character used on the database to match a single character.
No. Default is underscore (_). For example, on the database '_rown' matches 'Brown' and 'Crown'.
Character used on the database to match any number of characters.
No. Default is percent sign (%). For example, on the database 'Hat%' matches 'Hatcher' and 'Hathaway'.
Template that shows how to escape a special character on the database. In the template, $ stands for the special character, while $$ stands for the dollar sign.
No. Default is @$. By default, the characters used on the database for single match and greedy match are escaped by prepending an @.
Any special characters other than the single match character and the greedy match character. Additional special characters are listed without spaces.
No. Default is at sign (@), the default escape character.

Additional Links:

Copyright Actuate Corporation 2012