Skip to content
This repository has been archived by the owner on Aug 1, 2024. It is now read-only.

Commit

Permalink
add join on delete
Browse files Browse the repository at this point in the history
  • Loading branch information
tss182 committed Jul 22, 2020
1 parent b91add9 commit 5586209
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,11 @@ func (sql *Database) Delete() error {
}
}
whereBuild(sql)
querySql := "DELETE FROM " + sql.from + " "
var join = ""
if sql.join != "" {
join = " \n" + sql.join
}
querySql := "DELETE FROM " + sql.from + join + " "
sql.query = querySql
if sql.whereResult != "" {
sql.query += "\nWHERE " + sql.whereResult
Expand Down

0 comments on commit 5586209

Please sign in to comment.