* replace interface{} with any
Этот коммит содержится в:
Ibrahim Serdar Acikgoz
2022-07-05 09:46:50 +03:00
коммит произвёл GitHub
родитель b45ff0be5d
Коммит 717a4d04a9
258 изменённых файлов: 1286 добавлений и 1286 удалений

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

@@ -30,14 +30,14 @@ type SqlStore interface {
}
type SqlXExecutor interface {
Get(dest interface{}, query string, args ...interface{}) error
NamedExec(query string, arg interface{}) (sql.Result, error)
Exec(query string, args ...interface{}) (sql.Result, error)
ExecRaw(query string, args ...interface{}) (sql.Result, error)
NamedQuery(query string, arg interface{}) (*sqlx.Rows, error)
QueryRowX(query string, args ...interface{}) *sqlx.Row
QueryX(query string, args ...interface{}) (*sqlx.Rows, error)
Select(dest interface{}, query string, args ...interface{}) error
Get(dest any, query string, args ...any) error
NamedExec(query string, arg any) (sql.Result, error)
Exec(query string, args ...any) (sql.Result, error)
ExecRaw(query string, args ...any) (sql.Result, error)
NamedQuery(query string, arg any) (*sqlx.Rows, error)
QueryRowX(query string, args ...any) *sqlx.Row
QueryX(query string, args ...any) (*sqlx.Rows, error)
Select(dest any, query string, args ...any) error
}
func cleanupChannels(t *testing.T, ss store.Store) {
@@ -7337,7 +7337,7 @@ func testMaterializedPublicChannels(t *testing.T, ss store.Store, s SqlStore) {
PublicChannels(Id, DeleteAt, TeamId, DisplayName, Name, Header, Purpose)
VALUES
(:id, :deleteat, :teamid, :displayname, :name, :header, :purpose);
`, map[string]interface{}{
`, map[string]any{
"id": o3.Id,
"deleteat": o3.DeleteAt,
"teamid": o3.TeamId,
@@ -7355,7 +7355,7 @@ func testMaterializedPublicChannels(t *testing.T, ss store.Store, s SqlStore) {
Channels(Id, CreateAt, UpdateAt, DeleteAt, TeamId, Type, DisplayName, Name, Header, Purpose, LastPostAt, LastRootPostAt, TotalMsgCount, ExtraUpdateAt, CreatorId, TotalMsgCountRoot)
VALUES
(:id, :createat, :updateat, :deleteat, :teamid, :type, :displayname, :name, :header, :purpose, :lastpostat, :lastrootpostat, :totalmsgcount, :extraupdateat, :creatorid, 0);
`, map[string]interface{}{
`, map[string]any{
"id": o3.Id,
"createat": o3.CreateAt,
"updateat": o3.UpdateAt,

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

@@ -1050,7 +1050,7 @@ func testDeleteExportMessage(t *testing.T, ss store.Store) {
assert.Equal(t, postDeleteTime, *v.PostUpdateAt)
assert.NotNil(t, v.PostProps)
props := map[string]interface{}{}
props := map[string]any{}
e := json.Unmarshal([]byte(*v.PostProps), &props)
require.NoError(t, e)
@@ -1153,7 +1153,7 @@ func testDeleteAfterExportMessage(t *testing.T, ss store.Store) {
assert.Equal(t, postDeleteTime, *v.PostUpdateAt)
assert.NotNil(t, v.PostProps)
props := map[string]interface{}{}
props := map[string]any{}
e := json.Unmarshal([]byte(*v.PostProps), &props)
require.NoError(t, e)

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

@@ -383,7 +383,7 @@ func testReactionGetForPostSince(t *testing.T, ss store.Store, s SqlStore) {
}
func forceUpdateAt(reaction *model.Reaction, updateAt int64, s SqlStore) error {
params := map[string]interface{}{
params := map[string]any{
"userid": reaction.UserId,
"postid": reaction.PostId,
"emojiname": reaction.EmojiName,