Commit Graph
6 Commits
Author SHA1 Message Date
778ad795fd Refactor deletion (#28610)
Introduce the new generic deletion methods
- `func DeleteByID[T any](ctx context.Context, id int64) (int64, error)`
- `func DeleteByIDs[T any](ctx context.Context, ids ...int64) error`
- `func Delete[T any](ctx context.Context, opts FindOptions) (int64,
error)`

So, we no longer need any specific deletion method and can just use
the generic ones instead.

Replacement of #28450

Closes #28450

---------

Co-authored-by: Lunny Xiao <[email protected]>
2023-12-25 21:25:29 +01:00
cc5df26680 Even more db.DefaultContext refactor (#27352)
Part of #27065

---------

Co-authored-by: Lunny Xiao <[email protected]>
Co-authored-by: delvh <[email protected]>
2023-10-03 10:30:41 +00:00
7047df36d4 Another round of db.DefaultContext refactor (#27103)
Part of #27065

---------

Co-authored-by: KN4CK3R <[email protected]>
2023-09-25 13:17:37 +00:00
silverwindandGitHub 88f835192d Replace interface{} with any (#25686)
Result of running `perl -p -i -e 's#interface\{\}#any#g' **/*` and `make fmt`.

Basically the same [as golang did](https://github.com/golang/go/commit/2580d0e08d5e9f979b943758d3c49877fb2324cb).
2023-07-04 18:36:08 +00:00
e81ccc406b Implement FSFE REUSE for golang files (#21840)
Change all license headers to comply with REUSE specification.

Fix #16132

Co-authored-by: flynnnnnnnnnn <flynnnnnnnnnn@github>
Co-authored-by: John Olheiser <[email protected]>
2022-11-27 18:20:29 +00:00
Lunny XiaoandGitHub f860a6d2e4 Add system setting table with cache and also add cache supports for user setting (#18058) 2022-10-17 07:29:26 +08:00