Skip to content

Commit

Permalink
fix: don't call hooks twice for whereExists
Browse files Browse the repository at this point in the history
  • Loading branch information
vmihailenco committed Nov 23, 2022
1 parent d368bbe commit 9057857
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
7 changes: 1 addition & 6 deletions query_select.go
Original file line number Diff line number Diff line change
Expand Up @@ -1034,12 +1034,7 @@ func (q *SelectQuery) whereExists(ctx context.Context) (bool, error) {
}

query := internal.String(queryBytes)
ctx, event := q.db.beforeQuery(ctx, qq, query, nil, query, q.model)

res, err := q.exec(ctx, q, query)

q.db.afterQuery(ctx, event, nil, err)

res, err := q.exec(ctx, qq, query)
if err != nil {
return false, err
}
Expand Down
1 change: 0 additions & 1 deletion scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ do
"s/uptrace\/bun\([^ ]*\) v.*/uptrace\/bun\1 ${TAG}/" "${dir}/go.mod"
done


sed --in-place "s/\(return \)\"[^\"]*\"/\1\"${TAG#v}\"/" ./version.go
sed --in-place "s/\(return \)\"[^\"]*\"/\1\"${TAG#v}\"/" ./dialect/mysqldialect/version.go
sed --in-place "s/\(return \)\"[^\"]*\"/\1\"${TAG#v}\"/" ./dialect/mssqldialect/version.go
Expand Down

0 comments on commit 9057857

Please sign in to comment.