MM-11781: Basic Data Export Command Line. (#9296)

* MM-11781: Basic Data Export Command Line.

* ChannelStore new unit tests.

* TeamStore new unit tests.

* Unit test for new UserStore function.

* Unit tests for post store new methods.

* Review fixes.

* Fix duplicate command name.
Этот коммит содержится в:
George Goldberg
2018-09-17 15:51:26 +01:00
коммит произвёл GitHub
родитель 5786b0d6d5
Коммит ab99f0656f
24 изменённых файлов: 1106 добавлений и 46 удалений

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

@@ -332,6 +332,17 @@ func (us SqlUserStore) GetAll() store.StoreChannel {
})
}
func (us SqlUserStore) GetAllAfter(limit int, afterId string) store.StoreChannel {
return store.Do(func(result *store.StoreResult) {
var data []*model.User
if _, err := us.GetReplica().Select(&data, "SELECT * FROM Users WHERE Id > :AfterId ORDER BY Id LIMIT :Limit", map[string]interface{}{"AfterId": afterId, "Limit": limit}); err != nil {
result.Err = model.NewAppError("SqlUserStore.GetAllAfter", "store.sql_user.get.app_error", nil, err.Error(), http.StatusInternalServerError)
}
result.Data = data
})
}
func (s SqlUserStore) GetEtagForAllProfiles() store.StoreChannel {
return store.Do(func(result *store.StoreResult) {
updateAt, err := s.GetReplica().SelectInt("SELECT UpdateAt FROM Users ORDER BY UpdateAt DESC LIMIT 1")