Table of Contents

Class HasExpression

Namespace
JsonApiDotNetCore.Queries.Expressions
Assembly
JsonApiDotNetCore.dll

This expression allows to test if a to-many relationship has related resources, optionally with a condition. It represents the "has" filter function, resulting from text such as: has(articles) , or: has(articles,equals(isHidden,'false')) .

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

Constructors

HasExpression(ResourceFieldChainExpression, FilterExpression?)

public HasExpression(ResourceFieldChainExpression targetCollection, FilterExpression? filter)

Parameters

targetCollection ResourceFieldChainExpression
filter FilterExpression

Properties

Filter

An optional filter that is applied on the related resources. Any related resources that do not match the filter are ignored.

public FilterExpression? Filter { get; }

Property Value

FilterExpression

TargetCollection

The to-many relationship to determine related resources for. Chain format: an optional list of to-one relationships, followed by a to-many relationship.

public ResourceFieldChainExpression TargetCollection { 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.