@@ -9,10 +9,11 @@ import {
99 eq ,
1010 gt ,
1111 gte ,
12- isNotUndefined ,
12+ isUndefined ,
1313 lt ,
1414 max ,
1515 min ,
16+ not ,
1617 or ,
1718 sum ,
1819} from "../../src/query/builder/functions.js"
@@ -1097,7 +1098,7 @@ function createGroupByTests(autoIndex: `off` | `eager`): void {
10971098 query : ( q ) =>
10981099 q
10991100 . from ( { orders : ordersCollection } )
1100- . where ( ( { orders } ) => isNotUndefined ( orders . customer ) )
1101+ . where ( ( { orders } ) => not ( isUndefined ( orders . customer ) ) )
11011102 . groupBy ( ( { orders } ) => orders . customer ?. tier )
11021103 . select ( ( { orders } ) => ( {
11031104 tier : orders . customer ?. tier ,
@@ -1127,7 +1128,7 @@ function createGroupByTests(autoIndex: `off` | `eager`): void {
11271128 query : ( q ) =>
11281129 q
11291130 . from ( { orders : ordersCollection } )
1130- . where ( ( { orders } ) => isNotUndefined ( orders . customer ?. address ) )
1131+ . where ( ( { orders } ) => not ( isUndefined ( orders . customer ?. address ) ) )
11311132 . groupBy ( ( { orders } ) => orders . customer ?. address . state )
11321133 . select ( ( { orders } ) => ( {
11331134 state : orders . customer ?. address . state ,
@@ -1156,7 +1157,7 @@ function createGroupByTests(autoIndex: `off` | `eager`): void {
11561157 query : ( q ) =>
11571158 q
11581159 . from ( { orders : ordersCollection } )
1159- . where ( ( { orders } ) => isNotUndefined ( orders . shipping ) )
1160+ . where ( ( { orders } ) => not ( isUndefined ( orders . shipping ) ) )
11601161 . groupBy ( ( { orders } ) => orders . shipping ?. method )
11611162 . select ( ( { orders } ) => ( {
11621163 method : orders . shipping ?. method ,
@@ -1191,8 +1192,8 @@ function createGroupByTests(autoIndex: `off` | `eager`): void {
11911192 . from ( { orders : ordersCollection } )
11921193 . where ( ( { orders } ) =>
11931194 and (
1194- isNotUndefined ( orders . customer ) ,
1195- isNotUndefined ( orders . shipping )
1195+ not ( isUndefined ( orders . customer ) ) ,
1196+ not ( isUndefined ( orders . shipping ) )
11961197 )
11971198 )
11981199 . groupBy ( ( { orders } ) => orders . customer ?. tier )
@@ -1231,7 +1232,7 @@ function createGroupByTests(autoIndex: `off` | `eager`): void {
12311232 q
12321233 . from ( { orders : ordersCollection } )
12331234 . where ( ( { orders } ) =>
1234- isNotUndefined ( orders . customer ?. preferences )
1235+ not ( isUndefined ( orders . customer ?. preferences ) )
12351236 )
12361237 . groupBy ( ( { orders } ) => orders . customer ?. preferences . newsletter )
12371238 . select ( ( { orders } ) => ( {
@@ -1267,10 +1268,10 @@ function createGroupByTests(autoIndex: `off` | `eager`): void {
12671268 q
12681269 . from ( { orders : ordersCollection } )
12691270 . groupBy ( ( { orders } ) =>
1270- isNotUndefined ( orders . shipping ?. tracking )
1271+ not ( isUndefined ( orders . shipping ?. tracking ) )
12711272 )
12721273 . select ( ( { orders } ) => ( {
1273- tracking_status : isNotUndefined ( orders . shipping ?. tracking ) ,
1274+ tracking_status : not ( isUndefined ( orders . shipping ?. tracking ) ) ,
12741275 order_count : count ( orders . id ) ,
12751276 total_amount : sum ( orders . amount ) ,
12761277 } ) ) ,
@@ -1295,7 +1296,7 @@ function createGroupByTests(autoIndex: `off` | `eager`): void {
12951296 query : ( q ) =>
12961297 q
12971298 . from ( { orders : ordersCollection } )
1298- . where ( ( { orders } ) => isNotUndefined ( orders . customer ) )
1299+ . where ( ( { orders } ) => not ( isUndefined ( orders . customer ) ) )
12991300 . groupBy ( ( { orders } ) => orders . customer ?. tier )
13001301 . select ( ( { orders } ) => ( {
13011302 tier : orders . customer ?. tier ,
0 commit comments