Table of Contents

Class AnyExpression

Namespace
JsonApiDotNetCore.Queries.Expressions
Assembly
JsonApiDotNetCore.dll

This expression allows to test if an attribute value equals any of the specified constants. It represents the "any" filter function, resulting from text such as: any(owner.name,'Jack','Joe','John') .

[PublicAPI]
public class AnyExpression : FilterExpression
Inheritance
AnyExpression
Inherited Members

Constructors

AnyExpression(ResourceFieldChainExpression, IImmutableSet<LiteralConstantExpression>)

public AnyExpression(ResourceFieldChainExpression targetAttribute, IImmutableSet<LiteralConstantExpression> constants)

Parameters

targetAttribute ResourceFieldChainExpression
constants IImmutableSet<LiteralConstantExpression>

Properties

Constants

One or more constants to compare the attribute's value against.

public IImmutableSet<LiteralConstantExpression> Constants { get; }

Property Value

IImmutableSet<LiteralConstantExpression>

TargetAttribute

The attribute whose value to compare. Chain format: an optional list of to-one relationships, followed by an attribute.

public ResourceFieldChainExpression TargetAttribute { get; }

Property Value

ResourceFieldChainExpression

Methods

Accept<TArgument, TResult>(QueryExpressionVisitor<TArgument, TResult>, TArgument)

public override TResult Accept<TArgument, TResult>(QueryExpressionVisitor<TArgument, TResult> visitor, TArgument argument)

Parameters

visitor QueryExpressionVisitor<TArgument, TResult>
argument TArgument

Returns

TResult

Type Parameters

TArgument
TResult

Equals(object?)

Determines whether the specified object is equal to the current object.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

ToFullString()

public override string ToFullString()

Returns

string

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.