* Kill gorp

Gorp is dead. Long live Gorp.

```release-note
NONE
```
Этот коммит содержится в:
Agniva De Sarker
2022-03-15 19:49:19 +05:30
коммит произвёл GitHub
родитель c3ec0a145b
Коммит 4da98cb51a
47 изменённых файлов: 102 добавлений и 5179 удалений

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

@@ -5,8 +5,6 @@ package sqlstore
import (
"context"
"github.com/mattermost/gorp"
)
// storeContextKey is the base type for all context keys for the store.
@@ -35,14 +33,6 @@ func hasMaster(ctx context.Context) bool {
return false
}
// DBFromContext is a helper utility that returns the DB handle from a given context.
func (ss *SqlStore) DBFromContext(ctx context.Context) *gorp.DbMap {
if hasMaster(ctx) {
return ss.GetMaster()
}
return ss.GetReplica()
}
// DBXFromContext is a helper utility that returns the sqlx DB handle from a given context.
func (ss *SqlStore) DBXFromContext(ctx context.Context) *sqlxDBWrapper {
if hasMaster(ctx) {