Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[birt-dev] CHECKIN: Bugzilla 115940 : Unclear "LIKE" operator pattern syntax

- Summary:

Fixed 115940 by modifying the LIKE operator semantics and introducing a new MATCH operator in BIRT.

 

- Bugzilla Bug(s) Resolved:

115940

 

- Description:

After this checkin, the LIKE and MATCH operators will take the following defined behavior. These two operators are available to build BIRT data set filter and table filters.

 

·         LIKE  operator

Compares the left operand (a string) to a pattern specified as the right operand using a SQL-like syntax. Returns true if the entire string matches the prescribed pattern. Acceptable metacharacters in the pattern string are:

      ‘%’     : matches zero or more characters of any kind

      ‘_’   (underscore): matches exactly one character of any kind

      ‘\’ (backslash): escapes the following character.

All comparisons are case-sensitive.

 

·         MATCH operator

Compares the left operand (a string) to a pattern specified as the right operand using regular _expression_ syntax. Returns true if part of the string matches the prescribed regular _expression_ pattern (RegExp line boundary markers ^ and $ can be used to force match the entire string).

 

The right operand can use _javascript_ syntax to include modifiers in the pattern, e.g,  “/regexp/mi”. Modifier m enables multi-line mode in pattern matching. Modifier i enables case-insensitive comparison.

 

 

- Tests Description:

Data Engine JUnit Tests

 

- Files Edited:

"/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/script/ScriptEvalUtil.java"

"/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/i18n/Messages.properties"

"/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/api/IConditionalExpression.java"

"/org.eclipse.birt.data/test/org/eclipse/birt/data/engine/impl/ScriptEvalTest.java"

 

- Files Added:

 

- Notes to Build Team:

 

- Notes to Developers:

 

- Notes to QA:

 

- Notes to Documentation:

 

 

 


Back to the top