From 90578578e717f248e4b6eb114c5b495fd8d4ed41 Mon Sep 17 00:00:00 2001 From: Vladimir Mihailenco Date: Wed, 23 Nov 2022 09:27:51 +0200 Subject: [PATCH] fix: don't call hooks twice for whereExists --- query_select.go | 7 +------ scripts/release.sh | 1 - 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/query_select.go b/query_select.go index 3e919e67c..19db0bb3a 100644 --- a/query_select.go +++ b/query_select.go @@ -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 } diff --git a/scripts/release.sh b/scripts/release.sh index 76cb57b90..4844580c8 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -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