Synergex.SynergyDE.Select.NoCaseWhere

WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
namespace Synergex.SynergyDE.Select
public class Where
public sealed class NoCaseWhere extends Where

The NoCaseWhere class extends the Where class. (See Synergex.SynergyDE.Select.Where for more information and a Discussion.) Like the Where class object, the NoCaseWhere object is a collection of logical and relational operators (including their symbolic forms) that provides a means to create intuitive, procedure-like expressions for record selection. The difference between NoCaseWhere and Where methods is that the NoCaseWhere comparison is case-insensitive, so you can use NoCaseWhere when you want to perform case-insensitive operations. For example, (NoCaseWhere)(fld .eq. “ABC”) will match “ABC”, “Abc”, “aBC”, etc., rather than just “ABC”.

Important

Once created, any object used by the Select (From, Where, NoCaseWhere, On, OrderBy, and Sparse) must remain in contact with the same record(s) specified in the From object(s) as well as fields referenced in the Where, NoCaseWhere, On, OrderBy, and Sparse objects that are contained in the record(s). In other words, you can’t create one of these objects and pass it to another routine unless that routine has direct access to the original record. If this is not the case, an InvalidOperationException or $ERR_INVOPER error (“Where operator requires at least one field reference”) will result when creating the Select object. On the other hand, all data references outside a From object’s record are copied during the object’s creation and are not required to remain in contact with the original data.

Methods

Between

public static Between(field, low, high), @NoCaseWhere

Specifies selection criteria in which the value of a field is between two specific values. See Between.

Contains

public static Contains(afield, value), @NoCaseWhere

Specifies selection criteria in which an alpha field contains a specific value. See Contains.

or

public static Contains(afield, wexpr), @NoCaseWhere

Specifies selection criteria in which an alpha field contains multiple specific values in the form of a NoCaseWhere class object. See Contains.

In

public static varargs In(field, value1, value2, ...), @NoCaseWhere

Specifies selection criteria in which a field is one of the specified values in a list. See In.

Like

public static Like(afield, pattern), @NoCaseWhere

Specifies selection criteria in which an alpha field in the record specified in the From class object contains a value that matches a pattern. See Like.

or

public static Like(afield, wexpr), @NoCaseWhere

Specifies selection criteria in which an alpha field in the record specified in the From class object contains multiple specific values in the form of wexpr, which is a Where class object (@Where). See Like.

Operators

The NoCaseWhere operators are equivalent to their Synergy counterparts. Not all Synergy operators are supported in NoCaseWhere, but the following operators (in their various formats) are supported. See Expressions for additional information about these operators.

The string relational operators (.EQS., .GTS., .LTS., etc.) and their symbolic relational forms (==, >, <, etc.) always result in a string comparison, compared for both of their lengths. If the lengths differ, the shorter operand is logically extended with blanks on the right until it is the same size as the larger operand.

Note that in a NoCaseWhere expression, the symbolic operators (==, >=, etc.) are treated a little differently than they are in the Language:

Symbolic operator expression

Language expression equivalence

Where expression equivalence

(avar1 == avar2)

avar1 .eq. avar2

avar1 .eqs. avar2

(avar1 == string)

avar1 .eqs. string

avar1 .eqs. (a)string

SQL symbolic comparisons such as ==, >, <, etc., behave like string comparisons. For example,

(avar .eqs. "abc") is equivalent to the SQL statement (WHERE avar = 'abc')

and

(avar .eq. "abc") is equivalent to the SQL statement (WHERE avar LIKE 'abc*')

The alpha relational operators (.EQ., .GT., .LT., etc.) always result in an alpha comparison, compared for the length of the shortest. This is similar to the SQL LIKE operator with an implied trailing “%” wildcard.