Skip to content

Commit 6efa847

Browse files
committed
add test for custom join
1 parent 8169c34 commit 6efa847

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

select_dataset_test.go

+14
Original file line numberDiff line numberDiff line change
@@ -625,6 +625,20 @@ func (sds *selectDatasetSuite) TestCrossJoin() {
625625
)
626626
}
627627

628+
func (sds *selectDatasetSuite) TestCustomJoin() {
629+
bd := goqu.From("test")
630+
sds.assertCases(
631+
selectTestCase{
632+
ds: bd.CustomJoin(goqu.L("ARRAY JOIN tags").As("tag")),
633+
clauses: exp.NewSelectClauses().
634+
SetFrom(exp.NewColumnListExpression("test")).
635+
JoinsAppend(
636+
exp.NewUnConditionedJoinExpression(exp.CustomJoinType, goqu.L("ARRAY JOIN tags").As("tag")),
637+
),
638+
},
639+
)
640+
}
641+
628642
func (sds *selectDatasetSuite) TestWhere() {
629643
w := goqu.Ex{"a": 1}
630644
w2 := goqu.Ex{"b": "c"}

0 commit comments

Comments
 (0)