File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change
1
+ using EntityDb . Abstractions . Queries ;
2
+ using EntityDb . Abstractions . Queries . FilterBuilders ;
3
+ using EntityDb . Abstractions . Queries . SortBuilders ;
4
+ using EntityDb . Abstractions . Tags ;
5
+ using EntityDb . Common . Tags ;
6
+
7
+ namespace EntityDb . Common . Queries
8
+ {
9
+ /// <summary>
10
+ /// A query for the exact tag.
11
+ /// </summary>
12
+ public sealed record ExactTagQuery ( ITag Tag ) : ITagQuery
13
+ {
14
+ public TFilter GetFilter < TFilter > ( ITagFilterBuilder < TFilter > builder )
15
+ {
16
+ return builder . TagMatches < Tag > ( ( x ) =>
17
+ x . Scope == Tag . Scope &&
18
+ x . Label == Tag . Label &&
19
+ x . Value == Tag . Value ) ;
20
+ }
21
+
22
+ public TSort ? GetSort < TSort > ( ITagSortBuilder < TSort > builder )
23
+ {
24
+ return default ;
25
+ }
26
+
27
+ public int ? Skip => null ;
28
+
29
+ public int ? Take => 1 ;
30
+ }
31
+ }
You can’t perform that action at this time.
0 commit comments