Replace remaining GetMaster() queries (#19545)

There are still some remaining which
access the raw DB struct. There will be
a separate PR to clean those up.

```release-note
NONE
```
Этот коммит содержится в:
Agniva De Sarker
2022-02-16 22:30:27 +05:30
коммит произвёл GitHub
родитель 256427f7f9
Коммит 678c7d3b8c
26 изменённых файлов: 178 добавлений и 518 удалений

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

@@ -821,7 +821,8 @@ func TestCreatePost(t *testing.T) {
sqlStore := th.GetSqlStore()
sql := fmt.Sprintf("select count(*) from Posts where Id = '%[1]s' or OriginalId = '%[1]s';", previewPost.Id)
val, err2 := sqlStore.GetMaster().SelectInt(sql)
var val int64
err2 := sqlStore.GetMasterX().Get(&val, sql)
require.NoError(t, err2)
require.EqualValues(t, int64(1), val)