Skip to content

Commit

Permalink
add test for custom join
Browse files Browse the repository at this point in the history
  • Loading branch information
darwin67 committed Sep 9, 2024
1 parent 8169c34 commit 6efa847
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions select_dataset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -625,6 +625,20 @@ func (sds *selectDatasetSuite) TestCrossJoin() {
)
}

func (sds *selectDatasetSuite) TestCustomJoin() {
bd := goqu.From("test")
sds.assertCases(
selectTestCase{
ds: bd.CustomJoin(goqu.L("ARRAY JOIN tags").As("tag")),
clauses: exp.NewSelectClauses().
SetFrom(exp.NewColumnListExpression("test")).
JoinsAppend(
exp.NewUnConditionedJoinExpression(exp.CustomJoinType, goqu.L("ARRAY JOIN tags").As("tag")),
),
},
)
}

func (sds *selectDatasetSuite) TestWhere() {
w := goqu.Ex{"a": 1}
w2 := goqu.Ex{"b": "c"}
Expand Down

0 comments on commit 6efa847

Please sign in to comment.