MM-62142: remove SELECT * from status store (round 2) (#30060)
* Revert "Revert "[MM-62142] Avoid SELECT * in status_store.go (#29610)" (#29985)"
This reverts commit d345e92136.
* add tests for StatusGet and StatusGetByIds
* handle NULL columns in the Status Store
* simplify status store
* more builder simplifications and tests
* expose GetQueryPlaceholder
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
c4718e4542
Коммит
7d9521d783
@@ -20,6 +20,7 @@ import (
|
||||
"github.com/mattermost/mattermost/server/public/model"
|
||||
"github.com/mattermost/mattermost/server/public/shared/mlog"
|
||||
"github.com/mattermost/mattermost/server/v8/channels/store/storetest"
|
||||
sq "github.com/mattermost/squirrel"
|
||||
)
|
||||
|
||||
type StoreTestWrapper struct {
|
||||
@@ -38,6 +39,10 @@ func (w *StoreTestWrapper) DriverName() string {
|
||||
return w.orig.DriverName()
|
||||
}
|
||||
|
||||
func (w *StoreTestWrapper) GetQueryPlaceholder() sq.PlaceholderFormat {
|
||||
return w.orig.getQueryPlaceholder()
|
||||
}
|
||||
|
||||
type Builder interface {
|
||||
ToSql() (string, []any, error)
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user