Skip to content

Commit

Permalink
example
Browse files Browse the repository at this point in the history
  • Loading branch information
mstgnz committed Oct 18, 2024
1 parent d72c441 commit c8e9a37
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions example/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,5 @@ func main() {
subBuilder.Table("users").Select("id").Where("age", ">", 30)
mainBuilder.Table("orders").Select("order_id", "user_id").Where("user_id", "IN", subBuilder)

fmt.Println(mainBuilder.ToSql())
// SELECT order_id, user_id FROM orders WHERE user_id IN (SELECT id FROM users WHERE age > '30')

fmt.Printf("SubQuery: \n%s\n\n", mainBuilder.ToSql())
}

0 comments on commit c8e9a37

Please sign in to comment.