@@ -14,48 +14,48 @@ public partial class Query
1414
1515 public static bool operator true( Query _ ) => false ;
1616
17- public static Query operator & ( Query leftContainer , Query rightContainer ) =>
17+ public static Query operator & ( Query ? leftContainer , Query ? rightContainer ) =>
1818 And ( leftContainer , rightContainer ) ;
1919
20- internal static Query And ( Query leftContainer , Query rightContainer )
20+ internal static Query And ( Query ? leftContainer , Query ? rightContainer )
2121 {
2222 if ( leftContainer is null && rightContainer is null )
2323 {
2424 throw new ArgumentException ( "Queries to combine should not both be null." ) ;
2525 }
2626
2727 if ( rightContainer is null )
28- return leftContainer ;
28+ return leftContainer ! ;
2929
3030 if ( leftContainer is null )
3131 return rightContainer ;
3232
3333 return leftContainer . CombineAsMust ( rightContainer ) ;
3434 }
3535
36- public static Query operator | ( Query leftContainer , Query rightContainer ) => Or ( leftContainer , rightContainer ) ;
36+ public static Query operator | ( Query ? leftContainer , Query ? rightContainer ) => Or ( leftContainer , rightContainer ) ;
3737
38- internal static Query Or ( Query leftContainer , Query rightContainer )
38+ internal static Query Or ( Query ? leftContainer , Query ? rightContainer )
3939 {
4040 if ( leftContainer is null && rightContainer is null )
4141 {
4242 throw new ArgumentException ( "Queries to combine should not both be null." ) ;
4343 }
4444
4545 if ( rightContainer is null )
46- return leftContainer ;
46+ return leftContainer ! ;
4747
4848 if ( leftContainer is null )
4949 return rightContainer ;
5050
5151 return leftContainer . CombineAsShould ( rightContainer ) ;
5252 }
5353
54- public static Query operator ! ( Query queryContainer ) => queryContainer is null
54+ public static Query ? operator ! ( Query ? queryContainer ) => queryContainer is null
5555 ? null
5656 : new ( ) { Bool = new ( ) { MustNot = [ queryContainer ] } } ;
5757
58- public static Query operator + ( Query queryContainer ) => queryContainer is null
58+ public static Query ? operator + ( Query ? queryContainer ) => queryContainer is null
5959 ? null
6060 : new ( ) { Bool = new ( ) { Filter = [ queryContainer ] } } ;
6161}
0 commit comments