Kill gorp (#19786)
* Kill gorp Gorp is dead. Long live Gorp. ```release-note NONE ```
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
c3ec0a145b
Коммит
4da98cb51a
@@ -14,7 +14,6 @@ import (
|
||||
|
||||
"github.com/jmoiron/sqlx"
|
||||
|
||||
"github.com/mattermost/gorp"
|
||||
"github.com/mattermost/mattermost-server/v6/model"
|
||||
"github.com/mattermost/mattermost-server/v6/shared/mlog"
|
||||
"github.com/mattermost/mattermost-server/v6/store/storetest"
|
||||
@@ -28,10 +27,6 @@ func NewStoreTestWrapper(orig *SqlStore) *StoreTestWrapper {
|
||||
return &StoreTestWrapper{orig}
|
||||
}
|
||||
|
||||
func (w *StoreTestWrapper) GetMaster() *gorp.DbMap {
|
||||
return w.orig.GetMaster()
|
||||
}
|
||||
|
||||
func (w *StoreTestWrapper) GetMasterX() storetest.SqlXExecutor {
|
||||
return w.orig.GetMasterX()
|
||||
}
|
||||
@@ -251,6 +246,18 @@ func (w *sqlxTxWrapper) Exec(query string, args ...interface{}) (sql.Result, err
|
||||
return w.ExecRaw(query, args...)
|
||||
}
|
||||
|
||||
func (w *sqlxTxWrapper) ExecNoTimeout(query string, args ...interface{}) (sql.Result, error) {
|
||||
query = w.Tx.Rebind(query)
|
||||
|
||||
if w.trace {
|
||||
defer func(then time.Time) {
|
||||
printArgs(query, time.Since(then), args)
|
||||
}(time.Now())
|
||||
}
|
||||
|
||||
return w.Tx.ExecContext(context.Background(), query, args...)
|
||||
}
|
||||
|
||||
// ExecRaw is like Exec but without any rebinding of params. You need to pass
|
||||
// the exact param types of your target database.
|
||||
func (w *sqlxTxWrapper) ExecRaw(query string, args ...interface{}) (sql.Result, error) {
|
||||
|
||||
Ссылка в новой задаче
Block a user