Migrate post_store to sqlx (#19241)
* Migrate post_store to sqlx There are several queries which should improve further if re-written with squirrel. HW tickets will be opened for those. https://community-daily.mattermost.com/boards/workspace/zyoahc9uapdn3xdptac6jb69ic/285b80a3-257d-41f6-8cf4-ed80ca9d92e5/495cdb4d-c13a-4992-8eb9-80cfee2819a4/ctnryw9mga7fu9kc16xsap4phuw ```release-note NONE ``` * Remove struct ```release-note NONE ``` * fix tests ```release-note NONE ```
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
aa0b717af7
Коммит
cfcdce9ae7
@@ -135,6 +135,11 @@ func (si *StringInterface) Scan(value interface{}) error {
|
||||
return errors.New("received value is neither a byte slice nor string")
|
||||
}
|
||||
|
||||
// Value converts StringInterface to database value
|
||||
func (si StringInterface) Value() (driver.Value, error) {
|
||||
return json.Marshal(si)
|
||||
}
|
||||
|
||||
var translateFunc i18n.TranslateFunc
|
||||
var translateFuncOnce sync.Once
|
||||
|
||||
|
||||
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
@@ -1818,7 +1818,7 @@ func testPostStoreGetPostBeforeAfter(t *testing.T, ss store.Store) {
|
||||
require.NoError(t, err)
|
||||
|
||||
rPost3, err := ss.Post().GetPostAfterTime(channelId, o2a.CreateAt, false)
|
||||
require.Empty(t, rPost3, "should return no post")
|
||||
require.Empty(t, rPost3.Id, "should return no post")
|
||||
require.NoError(t, err)
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user