@@ -61,6 +61,9 @@ class QueryTests: XCTestCase {
61
61
62
62
func test_union_compilesUnionClause( ) {
63
63
assertSQL ( " SELECT * FROM \" users \" UNION SELECT * FROM \" posts \" " , users. union ( posts) )
64
+ }
65
+
66
+ func test_union_compilesUnionAllClause( ) {
64
67
assertSQL ( " SELECT * FROM \" users \" UNION ALL SELECT * FROM \" posts \" " , users. union ( all: true , posts) )
65
68
}
66
69
@@ -232,21 +235,22 @@ class QueryTests: XCTestCase {
232
235
temp. with ( temp, as: users) )
233
236
}
234
237
235
- func test_with_recursive_compilesWithClause ( ) {
238
+ func test_with_compilesWithRecursiveClause ( ) {
236
239
let temp = Table ( " temp " )
237
240
238
241
assertSQL ( " WITH RECURSIVE \" temp \" AS (SELECT * FROM \" users \" ) SELECT * FROM \" temp \" " ,
239
242
temp. with ( temp, recursive: true , as: users) )
240
-
241
- assertSQL ( " WITH \" temp \" AS (SELECT * FROM \" users \" ) SELECT * FROM \" temp \" " ,
242
- temp. with ( temp, recursive: false , as: users) )
243
243
}
244
244
245
- func test_with_materialization_compilesWithClause ( ) {
245
+ func test_with_compilesWithMaterializedClause ( ) {
246
246
let temp = Table ( " temp " )
247
247
248
248
assertSQL ( " WITH \" temp \" AS MATERIALIZED (SELECT * FROM \" users \" ) SELECT * FROM \" temp \" " ,
249
249
temp. with ( temp, hint: . materialized, as: users) )
250
+ }
251
+
252
+ func test_with_compilesWithNotMaterializedClause( ) {
253
+ let temp = Table ( " temp " )
250
254
251
255
assertSQL ( " WITH \" temp \" AS NOT MATERIALIZED (SELECT * FROM \" users \" ) SELECT * FROM \" temp \" " ,
252
256
temp. with ( temp, hint: . notMaterialized, as: users) )
0 commit comments