[v11.2.x] Annotations: Fix composite store read (#94182)
Annotations: Fix composite store read (#94158)
* Annotations: Fix composite store read
* Add test
* check error
(cherry picked from commit bd1741653d)
This commit is contained in:
@@ -245,7 +245,7 @@ func tagSet[T any](fn func(T) int64, list []T) map[int64]struct{} {
|
||||
return set
|
||||
}
|
||||
|
||||
func (r *xormRepositoryImpl) Get(ctx context.Context, query *annotations.ItemQuery, accessResources *accesscontrol.AccessResources) ([]*annotations.ItemDTO, error) {
|
||||
func (r *xormRepositoryImpl) Get(ctx context.Context, query annotations.ItemQuery, accessResources *accesscontrol.AccessResources) ([]*annotations.ItemDTO, error) {
|
||||
var sql bytes.Buffer
|
||||
params := make([]interface{}, 0)
|
||||
items := make([]*annotations.ItemDTO, 0)
|
||||
@@ -446,7 +446,7 @@ func (r *xormRepositoryImpl) Delete(ctx context.Context, params *annotations.Del
|
||||
})
|
||||
}
|
||||
|
||||
func (r *xormRepositoryImpl) GetTags(ctx context.Context, query *annotations.TagsQuery) (annotations.FindTagsResult, error) {
|
||||
func (r *xormRepositoryImpl) GetTags(ctx context.Context, query annotations.TagsQuery) (annotations.FindTagsResult, error) {
|
||||
var items []*annotations.Tag
|
||||
err := r.db.WithDbSession(ctx, func(dbSession *db.Session) error {
|
||||
if query.Limit == 0 {
|
||||
|
||||
Reference in New Issue
Block a user