QueryFilterOperator Enumeration

Operators which can be used in engine query methods.

Namespace:  Dundas.BI
Assembly:  Dundas.BI.Core (in Dundas.BI.Core.dll) Version: 2.0.0.0 (24.1.0.1001)
Syntax
public enum QueryFilterOperator
Members
  Member nameValueDescription
Equals0 The equals operator. The value must be the same type as the field.
LessThan1 The less than operator. This operator is only valid for numeric or date/time fields.
LessThanOrEqualTo2 The less than or equal to operator. This operator is only valid for numeric or date/time fields.
GreaterThan3 The greater than operator. This operator is only valid for numeric or date/time fields.
GreaterThanOrEqualTo4 The greater than or equal to operator. This operator is only valid for numeric or date/time fields.
Contains5 The contains operator. This operator is only valid for string fields.
In6 The IN operator. If this operator is chosen, the provided value must be an object which implements IEnumerable, and whose elements are the same type as the field.
StartsWith7 The starts with operator. This operator is only valid for string fields.
EndsWith8 The ends with operator. This operator is only valid for string fields.
Matches9 Wildcard matching operator. This operator is only valid for string fields.
And10 The AND operator.
Or11 The OR operator.
Exists12 The EXISTS operator.
Remarks
Instructions for using the And and Or operators:
  • The corresponding query field is ignored, and must be set to the None value of the relevant enumeration (e.g. AccountQueryField.None).
  • The corresponding filter value must be an object which implements IEnumerable, whose elements are instances of additional query filter rules.
Examples
The following example demonstrates usage of the Or operator. We are going to query for accounts which are enabled, and where either the account name OR the display name contains the substring "smith".
C#
IAccountService acctSvc = Engine.Current.GetService<IAccountService>();

string substring = "smith";

var filter = new[]
{
    new AccountQueryFilterRule(AccountQueryField.IsEnabled, QueryFilterOperator.Equals, true),
    new AccountQueryFilterRule(AccountQueryField.None, QueryFilterOperator.Or, new[]
    {
        new AccountQueryFilterRule(AccountQueryField.Name, QueryFilterOperator.Contains, substring),
        new AccountQueryFilterRule(AccountQueryField.DisplayName, QueryFilterOperator.Contains, substring),
    }),
};

IList<Account> results = acctSvc.AccountQuery(0, 0, null, filter);
See Also

Reference