Class MatchTextExpression
- Namespace
- JsonApiDotNetCore.Queries.Expressions
- Assembly
- JsonApiDotNetCore.dll
This expression allows partial matching on the value of a JSON:API attribute. It represents text-matching filter functions, resulting from text such
as:
startsWith(name,'The')
,
endsWith(name,'end.')
, or:
contains(name,'middle')
.
[PublicAPI]
public class MatchTextExpression : FilterExpression
- Inheritance
-
MatchTextExpression
- Inherited Members
Constructors
MatchTextExpression(QueryExpression, LiteralConstantExpression, TextMatchKind)
public MatchTextExpression(QueryExpression matchTarget, LiteralConstantExpression textValue, TextMatchKind matchKind)
Parameters
matchTargetQueryExpressiontextValueLiteralConstantExpressionmatchKindTextMatchKind
Properties
MatchKind
The kind of matching to perform.
public TextMatchKind MatchKind { get; }
Property Value
MatchTarget
The function or attribute whose value to match. Attribute chain format: an optional list of to-one relationships, followed by an attribute.
public QueryExpression MatchTarget { get; }
Property Value
TextValue
The text to match against.
public LiteralConstantExpression TextValue { get; }
Property Value
Methods
Accept<TArgument, TResult>(QueryExpressionVisitor<TArgument, TResult>, TArgument)
public override TResult Accept<TArgument, TResult>(QueryExpressionVisitor<TArgument, TResult> visitor, TArgument argument)
Parameters
visitorQueryExpressionVisitor<TArgument, TResult>argumentTArgument
Returns
- TResult
Type Parameters
TArgumentTResult
Equals(object?)
Determines whether the specified object is equal to the current object.
public override bool Equals(object? obj)
Parameters
objobjectThe object to compare with the current object.
Returns
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
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.