Making private some sqlstore methods (#13895)

* Making private some sqlstore methods

* Calling for create indexes on missing stores

Co-authored-by: mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
Jesús Espino
2020-03-03 11:45:49 +01:00
коммит произвёл GitHub
родитель aec606500f
Коммит 2a5d30f8f3
33 изменённых файлов: 124 добавлений и 121 удалений

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

@@ -20,7 +20,7 @@ type SqlSessionStore struct {
SqlStore
}
func NewSqlSessionStore(sqlStore SqlStore) store.SessionStore {
func newSqlSessionStore(sqlStore SqlStore) store.SessionStore {
us := &SqlSessionStore{sqlStore}
for _, db := range sqlStore.GetAllConns() {
@@ -36,7 +36,7 @@ func NewSqlSessionStore(sqlStore SqlStore) store.SessionStore {
return us
}
func (me SqlSessionStore) CreateIndexesIfNotExists() {
func (me SqlSessionStore) createIndexesIfNotExists() {
me.CreateIndexIfNotExists("idx_sessions_user_id", "Sessions", "UserId")
me.CreateIndexIfNotExists("idx_sessions_token", "Sessions", "Token")
me.CreateIndexIfNotExists("idx_sessions_expires_at", "Sessions", "ExpiresAt")