gitea/models/db
Lunny Xiao dd30d9d5c0
Remove GetByBean method because sometimes it's danger when query condition parameter is zero and also introduce new generic methods ()
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})
```
..
install
paginator make writing main test easier ()
common.go Fix NuGet search endpoints ()
consistency.go
context.go Remove GetByBean method because sometimes it's danger when query condition parameter is zero and also introduce new generic methods ()
context_committer_test.go Fix halfCommitter and WithTx ()
context_test.go Always reuse transaction ()
convert.go Support converting varchar to nvarchar for mssql database ()
engine.go Rename `Sync2` -> `Sync` ()
engine_test.go Rename `Sync2` -> `Sync` ()
error.go Remove GetByBean method because sometimes it's danger when query condition parameter is zero and also introduce new generic methods ()
index.go Fix index generation parallelly failure ()
index_test.go
iterate.go refactor: make db iterate context aware ()
iterate_test.go Remove GetByBean method because sometimes it's danger when query condition parameter is zero and also introduce new generic methods ()
list.go Use db.Find instead of writing methods for every object ()
list_test.go Use db.Find instead of writing methods for every object ()
log.go Replace `interface{}` with `any` ()
main_test.go make writing main test easier ()
name.go
search.go Split lfs size from repository size ()
sequence.go Refactor `setting.Database.UseXXX` to methods ()
sql_postgres_with_schema.go Fix .golangci.yml ()