gitea/models/issues
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})
```
2023-12-07 15:27:36 +08:00
..
assignees_test.go Even more db.DefaultContext refactor (#27352) 2023-10-03 10:30:41 +00:00
assignees.go Remove GetByBean method because sometimes it's danger when query condition parameter is zero and also introduce new generic methods (#28220) 2023-12-07 15:27:36 +08:00
comment_code.go Penultimate round of db.DefaultContext refactor (#27414) 2023-10-11 04:24:07 +00:00
comment_list.go Add logs for data broken of comment review (#27326) 2023-09-29 02:31:36 +00:00
comment_test.go More db.DefaultContext refactor (#27265) 2023-09-29 12:12:54 +00:00
comment.go Fix comment permissions (#28213) 2023-11-25 17:21:21 +00:00
content_history_test.go Fix comment permissions (#28213) 2023-11-25 17:21:21 +00:00
content_history.go Fix comment permissions (#28213) 2023-11-25 17:21:21 +00:00
dependency_test.go Penultimate round of db.DefaultContext refactor (#27414) 2023-10-11 04:24:07 +00:00
dependency.go Penultimate round of db.DefaultContext refactor (#27414) 2023-10-11 04:24:07 +00:00
issue_index.go
issue_label_test.go Penultimate round of db.DefaultContext refactor (#27414) 2023-10-11 04:24:07 +00:00
issue_label.go Penultimate round of db.DefaultContext refactor (#27414) 2023-10-11 04:24:07 +00:00
issue_list_test.go
issue_list.go
issue_lock.go Penultimate round of db.DefaultContext refactor (#27414) 2023-10-11 04:24:07 +00:00
issue_project.go Clean some functions about project issue (#27705) 2023-10-20 14:01:25 +02:00
issue_search.go Include public repos in doer's dashboard for issue search (#28304) 2023-12-07 13:26:18 +08:00
issue_stats.go
issue_test.go Show total TrackedTime on issue/pull/milestone lists (#26672) 2023-10-19 14:08:31 +00:00
issue_update.go Don't use subselect in DeleteIssuesByRepoID (#27332) 2023-10-03 08:17:28 +00:00
issue_user_test.go
issue_user.go
issue_watch_test.go
issue_watch.go Even more db.DefaultContext refactor (#27352) 2023-10-03 10:30:41 +00:00
issue_xref_test.go
issue_xref.go More db.DefaultContext refactor (#27265) 2023-09-29 12:12:54 +00:00
issue.go Display issue task list on project cards (#27865) 2023-11-02 11:42:02 +01:00
label_test.go Penultimate round of db.DefaultContext refactor (#27414) 2023-10-11 04:24:07 +00:00
label.go Remove GetByBean method because sometimes it's danger when query condition parameter is zero and also introduce new generic methods (#28220) 2023-12-07 15:27:36 +08:00
main_test.go
milestone_list.go Penultimate round of db.DefaultContext refactor (#27414) 2023-10-11 04:24:07 +00:00
milestone_test.go Penultimate round of db.DefaultContext refactor (#27414) 2023-10-11 04:24:07 +00:00
milestone.go
pull_list.go
pull_test.go Penultimate round of db.DefaultContext refactor (#27414) 2023-10-11 04:24:07 +00:00
pull.go Remove GetByBean method because sometimes it's danger when query condition parameter is zero and also introduce new generic methods (#28220) 2023-12-07 15:27:36 +08:00
reaction_test.go
reaction.go
review_list.go
review_test.go Fix 500 when deleting a dismissed review (#27903) 2023-11-05 13:25:40 +00:00
review.go Fix 500 when deleting a dismissed review (#27903) 2023-11-05 13:25:40 +00:00
stopwatch_test.go
stopwatch.go
tracked_time_test.go Show total TrackedTime on issue/pull/milestone lists (#26672) 2023-10-19 14:08:31 +00:00
tracked_time.go Show total TrackedTime on issue/pull/milestone lists (#26672) 2023-10-19 14:08:31 +00:00