Skip to content

Commit

Permalink
expose joinOn and leftJoinOn
Browse files Browse the repository at this point in the history
after #101 they do make a lot of sense to use
  • Loading branch information
oyvindberg committed May 28, 2024
1 parent 249a516 commit ecf7d8c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
4 changes: 2 additions & 2 deletions typo-dsl-anorm/src/scala/typo/dsl/SelectBuilder.scala
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,11 @@ trait SelectBuilder[Fields, Row] {

protected def withParams(sqlParams: SelectParams[Fields, Row]): SelectBuilder[Fields, Row]

protected def joinOn[Fields2, N[_]: Nullability, Row2](other: SelectBuilder[Fields2, Row2])(
def joinOn[Fields2, N[_]: Nullability, Row2](other: SelectBuilder[Fields2, Row2])(
pred: Joined[Fields, Fields2] => SqlExpr[Boolean, N]
): SelectBuilder[Joined[Fields, Fields2], (Row, Row2)]

protected def leftJoinOn[Fields2, N[_]: Nullability, Row2](other: SelectBuilder[Fields2, Row2])(
def leftJoinOn[Fields2, N[_]: Nullability, Row2](other: SelectBuilder[Fields2, Row2])(
pred: Joined[Fields, Fields2] => SqlExpr[Boolean, N]
): SelectBuilder[LeftJoined[Fields, Fields2], (Row, Option[Row2])]
}
4 changes: 2 additions & 2 deletions typo-dsl-doobie/src/scala/typo/dsl/SelectBuilder.scala
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,11 @@ trait SelectBuilder[Fields, Row] {

protected def withParams(sqlParams: SelectParams[Fields, Row]): SelectBuilder[Fields, Row]

protected def joinOn[Fields2, N[_]: Nullability, Row2](other: SelectBuilder[Fields2, Row2])(
def joinOn[Fields2, N[_]: Nullability, Row2](other: SelectBuilder[Fields2, Row2])(
pred: Joined[Fields, Fields2] => SqlExpr[Boolean, N]
): SelectBuilder[Joined[Fields, Fields2], (Row, Row2)]

protected def leftJoinOn[Fields2, N[_]: Nullability, Row2](other: SelectBuilder[Fields2, Row2])(
def leftJoinOn[Fields2, N[_]: Nullability, Row2](other: SelectBuilder[Fields2, Row2])(
pred: Joined[Fields, Fields2] => SqlExpr[Boolean, N]
): SelectBuilder[LeftJoined[Fields, Fields2], (Row, Option[Row2])]
}
6 changes: 2 additions & 4 deletions typo-dsl-zio-jdbc/src/scala/typo/dsl/SelectBuilder.scala
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,9 @@ trait SelectBuilder[Fields, Row] {

protected def withParams(sqlParams: SelectParams[Fields, Row]): SelectBuilder[Fields, Row]

protected def joinOn[Fields2, N[_]: Nullability, Row2](other: SelectBuilder[Fields2, Row2])(
pred: Joined[Fields, Fields2] => SqlExpr[Boolean, N]
): SelectBuilder[Joined[Fields, Fields2], (Row, Row2)]
def joinOn[Fields2, N[_]: Nullability, Row2](other: SelectBuilder[Fields2, Row2])(pred: Joined[Fields, Fields2] => SqlExpr[Boolean, N]): SelectBuilder[Joined[Fields, Fields2], (Row, Row2)]

protected def leftJoinOn[Fields2, N[_]: Nullability, Row2](other: SelectBuilder[Fields2, Row2])(
def leftJoinOn[Fields2, N[_]: Nullability, Row2](other: SelectBuilder[Fields2, Row2])(
pred: Joined[Fields, Fields2] => SqlExpr[Boolean, N]
): SelectBuilder[LeftJoined[Fields, Fields2], (Row, Option[Row2])]
}

0 comments on commit ecf7d8c

Please sign in to comment.