Table of Contents

Class SqlFilter

Namespace
Microsoft.Azure.ServiceBus
Assembly
Microsoft.Azure.ServiceBus.dll

Represents a filter which is a composition of an expression and an action that is executed in the pub/sub pipeline.

public class SqlFilter : Filter, IEquatable<Filter>
Inheritance
SqlFilter
Implements
Derived
Inherited Members

Remarks

A SqlFilter holds a SQL-like condition expression that is evaluated in the broker against the arriving messages' user-defined properties and system properties. All system properties (which are all properties explicitly listed on the Message class) must be prefixed with

sys.
in the condition expression. The SQL subset implements testing for existence of properties (EXISTS), testing for null-values (IS NULL), logical NOT/AND/OR, relational operators, numeric arithmetic, and simple text pattern matching with LIKE.

Constructors

SqlFilter(string)

Initializes a new instance of the SqlFilter class using the specified SQL expression.

public SqlFilter(string sqlExpression)

Parameters

sqlExpression string

Remarks

Max allowed length of sql expression is 1024 chars.

Properties

Parameters

Sets the value of a filter expression. Allowed types: string, int, long, bool, double

public IDictionary<string, object> Parameters { get; }

Property Value

IDictionary<string, object>

The value of a filter expression.

SqlExpression

Gets the SQL expression.

public string SqlExpression { get; }

Property Value

string

The SQL expression.

Remarks

Max allowed length of sql expression is 1024 chars.

Methods

Equals(Filter)

public override bool Equals(Filter other)

Parameters

other Filter

Returns

bool

Equals(object)

public override bool Equals(object obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

Returns a string representation of SqlFilter.

public override string ToString()

Returns

string

The string representation of SqlFilter.

Operators

operator ==(SqlFilter, SqlFilter)

public static bool operator ==(SqlFilter o1, SqlFilter o2)

Parameters

o1 SqlFilter
o2 SqlFilter

Returns

bool

operator !=(SqlFilter, SqlFilter)

public static bool operator !=(SqlFilter o1, SqlFilter o2)

Parameters

o1 SqlFilter
o2 SqlFilter

Returns

bool