@@ -24,12 +24,12 @@ namespace JsonApiDotNetCore.Queries.Expressions;
2424public class MatchTextExpression : FilterExpression
2525{
2626 /// <summary>
27- /// The attribute whose value to match. Chain format: an optional list of to-one relationships, followed by an attribute.
27+ /// The function or attribute whose value to match. Attribute chain format: an optional list of to-one relationships, followed by an attribute.
2828 /// </summary>
29- public ResourceFieldChainExpression TargetAttribute { get ; }
29+ public QueryExpression MatchTarget { get ; }
3030
3131 /// <summary>
32- /// The text to match the attribute's value against.
32+ /// The text to match against.
3333 /// </summary>
3434 public LiteralConstantExpression TextValue { get ; }
3535
@@ -38,12 +38,12 @@ public class MatchTextExpression : FilterExpression
3838 /// </summary>
3939 public TextMatchKind MatchKind { get ; }
4040
41- public MatchTextExpression ( ResourceFieldChainExpression targetAttribute , LiteralConstantExpression textValue , TextMatchKind matchKind )
41+ public MatchTextExpression ( QueryExpression matchTarget , LiteralConstantExpression textValue , TextMatchKind matchKind )
4242 {
43- ArgumentNullException . ThrowIfNull ( targetAttribute ) ;
43+ ArgumentNullException . ThrowIfNull ( matchTarget ) ;
4444 ArgumentNullException . ThrowIfNull ( textValue ) ;
4545
46- TargetAttribute = targetAttribute ;
46+ MatchTarget = matchTarget ;
4747 TextValue = textValue ;
4848 MatchKind = matchKind ;
4949 }
@@ -71,8 +71,8 @@ private string InnerToString(bool toFullString)
7171 builder . Append ( '(' ) ;
7272
7373 builder . Append ( toFullString
74- ? string . Join ( ',' , TargetAttribute . ToFullString ( ) , TextValue . ToFullString ( ) )
75- : string . Join ( ',' , TargetAttribute . ToString ( ) , TextValue . ToString ( ) ) ) ;
74+ ? string . Join ( ',' , MatchTarget . ToFullString ( ) , TextValue . ToFullString ( ) )
75+ : string . Join ( ',' , MatchTarget . ToString ( ) , TextValue . ToString ( ) ) ) ;
7676
7777 builder . Append ( ')' ) ;
7878
@@ -93,11 +93,11 @@ public override bool Equals(object? obj)
9393
9494 var other = ( MatchTextExpression ) obj ;
9595
96- return TargetAttribute . Equals ( other . TargetAttribute ) && TextValue . Equals ( other . TextValue ) && MatchKind == other . MatchKind ;
96+ return MatchTarget . Equals ( other . MatchTarget ) && TextValue . Equals ( other . TextValue ) && MatchKind == other . MatchKind ;
9797 }
9898
9999 public override int GetHashCode ( )
100100 {
101- return HashCode . Combine ( TargetAttribute , TextValue , MatchKind ) ;
101+ return HashCode . Combine ( MatchTarget , TextValue , MatchKind ) ;
102102 }
103103}
0 commit comments