Removing unnecesary SqlStore interface (#16057)

Этот коммит содержится в:
Jesús Espino
2020-11-20 10:51:58 +01:00
коммит произвёл GitHub
родитель 5b1a716e2c
Коммит d274cf8afa
39 изменённых файлов: 538 добавлений и 1591 удалений

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

@@ -15,20 +15,20 @@ import (
)
type SqlWebhookStore struct {
SqlStore
*SqlSupplier
metrics einterfaces.MetricsInterface
}
func (s SqlWebhookStore) ClearCaches() {
}
func newSqlWebhookStore(sqlStore SqlStore, metrics einterfaces.MetricsInterface) store.WebhookStore {
func newSqlWebhookStore(sqlSupplier *SqlSupplier, metrics einterfaces.MetricsInterface) store.WebhookStore {
s := &SqlWebhookStore{
SqlStore: sqlStore,
metrics: metrics,
SqlSupplier: sqlSupplier,
metrics: metrics,
}
for _, db := range sqlStore.GetAllConns() {
for _, db := range sqlSupplier.GetAllConns() {
table := db.AddTableWithName(model.IncomingWebhook{}, "IncomingWebhooks").SetKeys(false, "Id")
table.ColMap("Id").SetMaxSize(26)
table.ColMap("UserId").SetMaxSize(26)