Removing supplier concept from the sql store (#16355)
* Removing supplier concept from the sql store * Removing other metions to supplier * Fixing gofmt * Fixing gofmt * Renaming NewSqlStore to New * Fixing tests Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
11248831b8
Коммит
a74fe05695
@@ -16,18 +16,18 @@ import (
|
||||
)
|
||||
|
||||
type SqlThreadStore struct {
|
||||
*SqlSupplier
|
||||
*SqlStore
|
||||
}
|
||||
|
||||
func (s *SqlThreadStore) ClearCaches() {
|
||||
}
|
||||
|
||||
func newSqlThreadStore(sqlSupplier *SqlSupplier) store.ThreadStore {
|
||||
func newSqlThreadStore(sqlStore *SqlStore) store.ThreadStore {
|
||||
s := &SqlThreadStore{
|
||||
SqlSupplier: sqlSupplier,
|
||||
SqlStore: sqlStore,
|
||||
}
|
||||
|
||||
for _, db := range sqlSupplier.GetAllConns() {
|
||||
for _, db := range sqlStore.GetAllConns() {
|
||||
tableThreads := db.AddTableWithName(model.Thread{}, "Threads").SetKeys(false, "PostId")
|
||||
tableThreads.ColMap("PostId").SetMaxSize(26)
|
||||
tableThreads.ColMap("ChannelId").SetMaxSize(26)
|
||||
|
||||
Ссылка в новой задаче
Block a user