@@ -307,6 +307,7 @@ defmodule Ecto.Adapters.SQLite3.ConnectionTest do
307
307
from ( c in "categories" ,
308
308
as: :parent_category ,
309
309
left_lateral_join: b in subquery ( breadcrumbs_query ) ,
310
+ on: true ,
310
311
select: % { id: c . id , breadcrumbs: b . breadcrumbs }
311
312
)
312
313
|> plan ( )
@@ -1409,7 +1410,10 @@ defmodule Ecto.Adapters.SQLite3.ConnectionTest do
1409
1410
test "join with hints" do
1410
1411
assert_raise Ecto.QueryError , ~r/ join hints are not supported by SQLite3/ , fn ->
1411
1412
Schema
1412
- |> join ( :inner , [ p ] , q in Schema2 , hints: [ "USE INDEX FOO" , "USE INDEX BAR" ] )
1413
+ |> join ( :inner , [ p ] , q in Schema2 ,
1414
+ hints: [ "USE INDEX FOO" , "USE INDEX BAR" ] ,
1415
+ on: true
1416
+ )
1413
1417
|> select ( [ ] , true )
1414
1418
|> plan ( )
1415
1419
|> all ( )
@@ -1475,7 +1479,7 @@ defmodule Ecto.Adapters.SQLite3.ConnectionTest do
1475
1479
query =
1476
1480
"comments"
1477
1481
|> from ( as: :comment )
1478
- |> join ( :inner , [ c ] , p in subquery ( posts ) )
1482
+ |> join ( :inner , [ c ] , p in subquery ( posts ) , on: true )
1479
1483
|> select ( [ _ , p ] , p )
1480
1484
|> plan ( )
1481
1485
@@ -1519,7 +1523,8 @@ defmodule Ecto.Adapters.SQLite3.ConnectionTest do
1519
1523
"SELECT * FROM schema2 AS s2 WHERE s2.id = ? AND s2.field = ?" ,
1520
1524
p . x ,
1521
1525
^ 10
1522
- )
1526
+ ) ,
1527
+ on: true
1523
1528
)
1524
1529
|> select ( [ p ] , { p . id , ^ 0 } )
1525
1530
|> where ( [ p ] , p . id > 0 and p . id < ^ 100 )
@@ -1545,7 +1550,10 @@ defmodule Ecto.Adapters.SQLite3.ConnectionTest do
1545
1550
1546
1551
test "join with query interpolation" do
1547
1552
inner = Ecto.Queryable . to_query ( Schema2 )
1548
- query = from ( p in Schema , left_join: c in ^ inner , select: { p . id , c . id } ) |> plan ( )
1553
+
1554
+ query =
1555
+ from ( p in Schema , left_join: c in ^ inner , on: true , select: { p . id , c . id } )
1556
+ |> plan ( )
1549
1557
1550
1558
assert all ( query ) ==
1551
1559
"SELECT s0.\" id\" , s1.\" id\" FROM \" schema\" AS s0 LEFT OUTER JOIN \" schema2\" AS s1 ON 1"
@@ -1561,7 +1569,8 @@ defmodule Ecto.Adapters.SQLite3.ConnectionTest do
1561
1569
"SELECT * FROM schema2 AS s2 WHERE s2.id = ? AND s2.field = ?" ,
1562
1570
p . x ,
1563
1571
^ 10
1564
- )
1572
+ ) ,
1573
+ on: true
1565
1574
)
1566
1575
|> select ( [ p , q ] , { p . id , q . z } )
1567
1576
|> where ( [ p ] , p . id > 0 and p . id < ^ 100 )
0 commit comments