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
@@ -14,18 +14,18 @@ import (
|
||||
)
|
||||
|
||||
type SqlCommandStore struct {
|
||||
*SqlSupplier
|
||||
*SqlStore
|
||||
|
||||
commandsQuery sq.SelectBuilder
|
||||
}
|
||||
|
||||
func newSqlCommandStore(sqlSupplier *SqlSupplier) store.CommandStore {
|
||||
s := &SqlCommandStore{SqlSupplier: sqlSupplier}
|
||||
func newSqlCommandStore(sqlStore *SqlStore) store.CommandStore {
|
||||
s := &SqlCommandStore{SqlStore: sqlStore}
|
||||
|
||||
s.commandsQuery = s.getQueryBuilder().
|
||||
Select("*").
|
||||
From("Commands")
|
||||
for _, db := range sqlSupplier.GetAllConns() {
|
||||
for _, db := range sqlStore.GetAllConns() {
|
||||
tableo := db.AddTableWithName(model.Command{}, "Commands").SetKeys(false, "Id")
|
||||
tableo.ColMap("Id").SetMaxSize(26)
|
||||
tableo.ColMap("Token").SetMaxSize(26)
|
||||
|
||||
Ссылка в новой задаче
Block a user