DSIPatternUtilities Class Reference

Utility functions for using LIKE patterns. More...

List of all members.

Public Member Functions

 DSIPatternUtilities ()
 Constructor. Made private to prevent use.

Static Public Member Functions

static AutoPtr< LikeMatcherCreateLikeMatcher (const void *in_patternData, simba_uint32 in_patternLength, const void *in_escapeCharData, simba_uint32 in_escapeCharLength, IColumn &in_columnMetadata)
 Create a LikeMatcher which matches against the given pattern.
static bool LikeCompare (const wchar_t *in_matchStr, const wchar_t *in_patternStr, const wchar_t *in_escapeChar=NULL)
 Perform a LIKE comparison of the two strings, returning the result of performing a like-wise comparison between the match string and the pattern string.
static bool LikeCompare (const simba_char *in_matchStr, const simba_char *in_patternStr, const simba_char *in_escapeChar=NULL)
 Perform a LIKE comparison of the two strings, returning the result of performing a like-wise comparison between the match string and the pattern string.

Detailed Description

Utility functions for using LIKE patterns.


Constructor & Destructor Documentation

Constructor. Made private to prevent use.


Member Function Documentation

static AutoPtr<LikeMatcher> CreateLikeMatcher ( const void *  in_patternData,
simba_uint32  in_patternLength,
const void *  in_escapeCharData,
simba_uint32  in_escapeCharLength,
IColumn in_columnMetadata 
) [static]

Create a LikeMatcher which matches against the given pattern.

Parameters:
in_patternData The LIKE pattern. (NOT OWN)
in_patternLength The length of in_patternLength, in bytes.
in_escapeCharData The escape character for the pattern, NULL if there is none. Must be 1 codepoint. (NOT OWN)
in_escapeCharLength The length of in_escapeCharData in bytes.
in_columnMetadata Specifies the encoding and collation used for all data.
Returns:
A LikeMatcher which matches against the given pattern.
static bool LikeCompare ( const wchar_t *  in_matchStr,
const wchar_t *  in_patternStr,
const wchar_t *  in_escapeChar = NULL 
) [static]

Perform a LIKE comparison of the two strings, returning the result of performing a like-wise comparison between the match string and the pattern string.

A LIKE comparison compares the "Match" string to the "Pattern" string, skipping over '_' and '' characters in the "Pattern" string. Also, an optional additional escape character may be specified and this escape character will be used to escape '_' and '' characters. This allows the pattern string to contain '_' and '' characters and not skip over them.

The trailing spaces in the "Match" string are treated as insignificant.

Parameters:
in_matchStr The match string for which the pattern string should be compared with. (NOT OWN)
in_patternStr The pattern string that will be compared against the Match string. (NOT OWN)
in_escapeChar Optional escape character, used to escape '_' and '' characters. NULL by default. (NOT OWN)
Returns:
True if in_matchStr is like in_patternStr; false otherwise
static bool LikeCompare ( const simba_char *  in_matchStr,
const simba_char *  in_patternStr,
const simba_char *  in_escapeChar = NULL 
) [static]

Perform a LIKE comparison of the two strings, returning the result of performing a like-wise comparison between the match string and the pattern string.

A LIKE comparison compares the "Match" string to the "Pattern" string, skipping over '_' and '' characters in the "Pattern" string. Also, an optional additional escape character may be specified and this escape character will be used to escape '_' and '' characters. This allows the pattern string to contain '_' and '' characters and not skip over them.

The trailing spaces in the "Match" string are treated as insignificant.

Parameters:
in_matchStr The match string for which the pattern string should be compared with. (NOT OWN)
in_patternStr The pattern string that will be compared against the Match string. (NOT OWN)
in_escapeChar Optional escape character, used to escape '_' and '' characters. NULL by default. (NOT OWN)
Returns:
True if in_matchStr is like in_patternStr; false otherwise

The documentation for this class was generated from the following file:

Generated on Wed May 17 14:21:15 2017 for SimbaEngine 10.1.3.1011 by simba