You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gitea/services/pull
Lunny Xiao dd30d9d5c0
Remove GetByBean method because sometimes it's danger when query condition parameter is zero and also introduce new generic methods (#28220)
The function `GetByBean` has an obvious defect that when the fields are
empty values, it will be ignored. Then users will get a wrong result
which is possibly used to make a security problem.

To avoid the possibility, this PR removed function `GetByBean` and all
references.
And some new generic functions have been introduced to be used.

The recommand usage like below.

```go
// if query an object according id
obj, err := db.GetByID[Object](ctx, id)
// query with other conditions
obj, err := db.Get[Object](ctx, builder.Eq{"a": a, "b":b})
```
1 year ago
..
check.go Penultimate round of `db.DefaultContext` refactor (#27414) 1 year ago
check_test.go Replace assert.Fail with assert.FailNow (#27578) 1 year ago
comment.go Delete `issue_service.CreateComment` (#26298) 2 years ago
commit_status.go Fix pull request check list is limited (#26179) 2 years ago
edits.go Implement FSFE REUSE for golang files (#21840) 2 years ago
lfs.go Remove GetByBean method because sometimes it's danger when query condition parameter is zero and also introduce new generic methods (#28220) 1 year ago
main_test.go make writing main test easier (#27270) 1 year ago
merge.go Fix poster is not loaded in get default merge message (#27657) 1 year ago
merge_merge.go Refactor and tidy-up the merge/update branch code (#22568) 2 years ago
merge_prepare.go Refactor merge/update git command calls (#23366) 2 years ago
merge_rebase.go Merge message template support for rebase without merge commit (#22669) 2 years ago
merge_squash.go Improve squash merge commit author and co-author with private emails (#22977) 2 years ago
merge_test.go Support template for merge message description (#22248) 2 years ago
patch.go Add transaction when creating pull request created dirty data (#26259) 2 years ago
patch_unmerged.go Implement FSFE REUSE for golang files (#21840) 2 years ago
pull.go Final round of `db.DefaultContext` refactor (#27587) 1 year ago
pull_test.go Support template for merge message description (#22248) 2 years ago
review.go Use db.Find instead of writing methods for every object (#28084) 1 year ago
temp_repo.go Sync branches into databases (#22743) 2 years ago
update.go Sync branches into databases (#22743) 2 years ago
update_rebase.go Refactor and tidy-up the merge/update branch code (#22568) 2 years ago