mirror of
https://github.com/go-gitea/gitea.git
synced 2025-09-03 14:27:02 +09:00
Retry create issue to cope with duplicate keys (#7898)
* Retry create issue to cope with duplicate keys * Use .SetExpr().Where().Insert()
This commit is contained in:
committed by
techknowlogick
parent
541fab196f
commit
5fe2ec264f
7
vendor/github.com/go-xorm/xorm/README.md
generated
vendored
7
vendor/github.com/go-xorm/xorm/README.md
generated
vendored
@ -284,6 +284,13 @@ counts, err := engine.Count(&user)
|
||||
// SELECT count(*) AS total FROM user
|
||||
```
|
||||
|
||||
* `FindAndCount` combines function `Find` with `Count` which is usually used in query by page
|
||||
|
||||
```Go
|
||||
var users []User
|
||||
counts, err := engine.FindAndCount(&users)
|
||||
```
|
||||
|
||||
* `Sum` sum functions
|
||||
|
||||
```Go
|
||||
|
Reference in New Issue
Block a user