* Migrating OAuthStore to sqlx

https://community-daily.mattermost.com/boards/workspace/zyoahc9uapdn3xdptac6jb69ic/285b80a3-257d-41f6-8cf4-ed80ca9d92e5/495cdb4d-c13a-4992-8eb9-80cfee2819a4?c=71efa7c4-53be-4732-87cc-d53726d2cd53

```release-note
NONE
```

* Fixing some broken tests

```release-note
NONE
```

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
Agniva De Sarker
2021-09-13 19:23:58 +05:30
коммит произвёл GitHub
родитель bbd5ba9ff2
Коммит 17fe158f5e
3 изменённых файлов: 108 добавлений и 54 удалений

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

@@ -55,6 +55,14 @@ func finalizeTransaction(transaction *gorp.Transaction) {
}
}
// finalizeTransactionX ensures a transaction is closed after use, rolling back if not already committed.
func finalizeTransactionX(transaction *sqlxTxWrapper) {
// Rollback returns sql.ErrTxDone if the transaction was already closed.
if err := transaction.Rollback(); err != nil && err != sql.ErrTxDone {
mlog.Error("Failed to rollback transaction", mlog.Err(err))
}
}
// removeNonAlphaNumericUnquotedTerms removes all unquoted words that only contain
// non-alphanumeric chars from given line
func removeNonAlphaNumericUnquotedTerms(line, separator string) string {