MM-55295: Improve DB performance of some (Take 2) (#25865)

* Revert "Revert "MM-55295: Improve DB performance of some APIs (#25318)" (#25852)"

This reverts commit 077221a940.

* Fix the issue

```release-note
NONE
```

* lint fix

```release-note
NONE
```
Этот коммит содержится в:
Agniva De Sarker
2024-01-11 10:18:36 +05:30
коммит произвёл GitHub
родитель 43cca04f04
Коммит 1d879ed0f4
12 изменённых файлов: 232 добавлений и 56 удалений

Просмотреть файл

@@ -432,8 +432,8 @@ func (_m *ChannelStore) GetAll(teamID string) ([]*model.Channel, error) {
return r0, r1
}
// GetAllChannelMembersById provides a mock function with given fields: id
func (_m *ChannelStore) GetAllChannelMembersById(id string) ([]string, error) {
// GetAllChannelMemberIdsByChannelId provides a mock function with given fields: id
func (_m *ChannelStore) GetAllChannelMemberIdsByChannelId(id string) ([]string, error) {
ret := _m.Called(id)
var r0 []string
@@ -1314,6 +1314,30 @@ func (_m *ChannelStore) GetMemberForPost(postID string, userID string, includeAr
return r0, r1
}
// GetMemberLastViewedAt provides a mock function with given fields: ctx, channelID, userID
func (_m *ChannelStore) GetMemberLastViewedAt(ctx context.Context, channelID string, userID string) (int64, error) {
ret := _m.Called(ctx, channelID, userID)
var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, string) (int64, error)); ok {
return rf(ctx, channelID, userID)
}
if rf, ok := ret.Get(0).(func(context.Context, string, string) int64); ok {
r0 = rf(ctx, channelID, userID)
} else {
r0 = ret.Get(0).(int64)
}
if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
r1 = rf(ctx, channelID, userID)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetMembers provides a mock function with given fields: channelID, offset, limit
func (_m *ChannelStore) GetMembers(channelID string, offset int, limit int) (model.ChannelMembers, error) {
ret := _m.Called(channelID, offset, limit)