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
Public Enumeration QueryFilterOperator
public enum class QueryFilterOperator
Members
| Member name | Value | Description |
---|
| Equals | 0 |
The equals operator.
The value must be the same type as the field.
|
| LessThan | 1 |
The less than operator.
This operator is only valid for numeric or date/time fields.
|
| LessThanOrEqualTo | 2 |
The less than or equal to operator.
This operator is only valid for numeric or date/time fields.
|
| GreaterThan | 3 |
The greater than operator.
This operator is only valid for numeric or date/time fields.
|
| GreaterThanOrEqualTo | 4 |
The greater than or equal to operator.
This operator is only valid for numeric or date/time fields.
|
| Contains | 5 |
The contains operator.
This operator is only valid for string fields.
|
| In | 6 |
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.
|
| StartsWith | 7 |
The starts with operator.
This operator is only valid for string fields.
|
| EndsWith | 8 |
The ends with operator.
This operator is only valid for string fields.
|
| Matches | 9 |
Wildcard matching operator.
This operator is only valid for string fields.
|
| And | 10 |
The AND operator.
|
| Or | 11 |
The OR operator.
|
| Exists | 12 |
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".
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