Removing unnecesary SqlStore interface (#16057)

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

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

@@ -14,18 +14,18 @@ import (
)
type SqlCommandStore struct {
SqlStore
*SqlSupplier
commandsQuery sq.SelectBuilder
}
func newSqlCommandStore(sqlStore SqlStore) store.CommandStore {
s := &SqlCommandStore{SqlStore: sqlStore}
func newSqlCommandStore(sqlSupplier *SqlSupplier) store.CommandStore {
s := &SqlCommandStore{SqlSupplier: sqlSupplier}
s.commandsQuery = s.getQueryBuilder().
Select("*").
From("Commands")
for _, db := range sqlStore.GetAllConns() {
for _, db := range sqlSupplier.GetAllConns() {
tableo := db.AddTableWithName(model.Command{}, "Commands").SetKeys(false, "Id")
tableo.ColMap("Id").SetMaxSize(26)
tableo.ColMap("Token").SetMaxSize(26)