@@ -586,7 +586,7 @@ public async Task Proximity()
586586 await using var context = DbFixture . CreateContext ( ) ;
587587
588588 var query = context . MockItems . Where ( p =>
589- EF . Functions . Proximity ( p . Description , Pdb . Proximity ( "sleek" ) . Within ( 1 , "shoes" ) )
589+ EF . Functions . Query ( p . Description , Pdb . Proximity ( "sleek" ) . Within ( 1 , "shoes" ) )
590590 ) ;
591591
592592 var sql = """
@@ -605,7 +605,7 @@ public async Task Proximity_Ordered()
605605 await using var context = DbFixture . CreateContext ( ) ;
606606
607607 var query = context . MockItems . Where ( p =>
608- EF . Functions . Proximity (
608+ EF . Functions . Query (
609609 p . Description ,
610610 Pdb . Proximity ( "sleek" ) . Within ( 1 , "shoes" , ordered : true )
611611 )
@@ -631,7 +631,7 @@ public async Task Proximity_WithVariableArguments()
631631 int distance = 1 ;
632632
633633 var query = context . MockItems . Where ( p =>
634- EF . Functions . Proximity ( p . Description , Pdb . Proximity ( left ) . Within ( distance , right ) )
634+ EF . Functions . Query ( p . Description , Pdb . Proximity ( left ) . Within ( distance , right ) )
635635 ) ;
636636
637637 var sql = """
@@ -653,7 +653,7 @@ public async Task Proximity_WithRegex()
653653 await using var context = DbFixture . CreateContext ( ) ;
654654
655655 var query = context . MockItems . Where ( p =>
656- EF . Functions . Proximity ( p . Description , Pdb . ProximityRegex ( "sl.*" ) . Within ( 1 , "shoes" ) )
656+ EF . Functions . Query ( p . Description , Pdb . ProximityRegex ( "sl.*" ) . Within ( 1 , "shoes" ) )
657657 ) ;
658658
659659 var sql = """
@@ -674,7 +674,7 @@ public async Task Proximity_WithRegexVariablePattern()
674674 string pattern = "sl.*" ;
675675
676676 var query = context . MockItems . Where ( p =>
677- EF . Functions . Proximity ( p . Description , Pdb . ProximityRegex ( pattern ) . Within ( 1 , "shoes" ) )
677+ EF . Functions . Query ( p . Description , Pdb . ProximityRegex ( pattern ) . Within ( 1 , "shoes" ) )
678678 ) ;
679679
680680 var sql = """
@@ -694,10 +694,7 @@ public async Task Proximity_WithRegexAndMaxExpansions()
694694 await using var context = DbFixture . CreateContext ( ) ;
695695
696696 var query = context . MockItems . Where ( p =>
697- EF . Functions . Proximity (
698- p . Description ,
699- Pdb . ProximityRegex ( "sl.*" , 100 ) . Within ( 1 , "shoes" )
700- )
697+ EF . Functions . Query ( p . Description , Pdb . ProximityRegex ( "sl.*" , 100 ) . Within ( 1 , "shoes" ) )
701698 ) ;
702699
703700 var sql = """
@@ -716,7 +713,7 @@ public async Task Proximity_WithArrayOfTokens()
716713 await using var context = DbFixture . CreateContext ( ) ;
717714
718715 var query = context . MockItems . Where ( p =>
719- EF . Functions . Proximity (
716+ EF . Functions . Query (
720717 p . Description ,
721718 Pdb . ProximityArray ( "sleek" , "white" ) . Within ( 1 , "shoes" )
722719 )
@@ -741,7 +738,7 @@ public async Task Proximity_WithArrayOfVariableTokens()
741738 string t2 = "white" ;
742739
743740 var query = context . MockItems . Where ( p =>
744- EF . Functions . Proximity ( p . Description , Pdb . ProximityArray ( t1 , t2 ) . Within ( 1 , "shoes" ) )
741+ EF . Functions . Query ( p . Description , Pdb . ProximityArray ( t1 , t2 ) . Within ( 1 , "shoes" ) )
745742 ) ;
746743
747744 var sql = """
@@ -762,7 +759,7 @@ public async Task Proximity_WithArrayOfMixedOperands()
762759 await using var context = DbFixture . CreateContext ( ) ;
763760
764761 var query = context . MockItems . Where ( p =>
765- EF . Functions . Proximity (
762+ EF . Functions . Query (
766763 p . Description ,
767764 Pdb . ProximityArray ( Pdb . ProximityRegex ( "sl.*" ) , Pdb . ProximityArray ( "white" ) )
768765 . Within ( 1 , "shoes" )
@@ -785,7 +782,7 @@ public async Task Proximity_Chained()
785782 await using var context = DbFixture . CreateContext ( ) ;
786783
787784 var query = context . MockItems . Where ( p =>
788- EF . Functions . Proximity (
785+ EF . Functions . Query (
789786 p . Description ,
790787 Pdb . Proximity ( "sleek" ) . Within ( 1 , "running" ) . Within ( 2 , "shoes" )
791788 )
@@ -825,6 +822,23 @@ FROM mock_items AS m
825822 await query . ToListAsync ( ) ;
826823 }
827824
825+ [ Test ]
826+ public async Task All ( )
827+ {
828+ await using var context = DbFixture . CreateContext ( ) ;
829+
830+ var query = context . MockItems . Where ( p => EF . Functions . Query ( p . Id , Pdb . All ( ) ) ) ;
831+
832+ var sql = """
833+ SELECT m.id, m.category, m.created_at, m.description, m.in_stock, m.last_updated_date, m.latest_available_time, m.metadata, m.rating, m.weight_range
834+ FROM mock_items AS m
835+ WHERE m.id @@@ pdb."all"()
836+ """ ;
837+
838+ AssertSql ( query , sql ) ;
839+ await query . ToListAsync ( ) ;
840+ }
841+
828842 [ Test ]
829843 public async Task Snippet ( )
830844 {
0 commit comments