mirror of
https://github.com/mattermost/focalboard.git
synced 2024-12-24 13:43:12 +02:00
fix linter errors
This commit is contained in:
parent
c6b2c28394
commit
0c19e1c950
@ -127,27 +127,6 @@ func (s *SQLStore) DBType() string {
|
||||
return s.dbType
|
||||
}
|
||||
|
||||
// DBVersion returns the DB version used for the store.
|
||||
func (s *SQLStore) DBVersion() string {
|
||||
var sql string
|
||||
switch s.dbType {
|
||||
case model.SqliteDBType:
|
||||
sql = "SELECT sqlite_version() AS version;"
|
||||
default:
|
||||
sql = "SELECT version() AS version"
|
||||
}
|
||||
|
||||
row := s.db.QueryRow(sql)
|
||||
|
||||
var version string
|
||||
if err := row.Scan(&version); err != nil {
|
||||
s.logger.Error("error getting database version", mlog.Err(err))
|
||||
return "unknown"
|
||||
}
|
||||
|
||||
return version
|
||||
}
|
||||
|
||||
func (s *SQLStore) getQueryBuilder(db sq.BaseRunner) sq.StatementBuilderType {
|
||||
builder := sq.StatementBuilder
|
||||
if s.dbType == model.PostgresDBType || s.dbType == model.SqliteDBType {
|
||||
@ -206,7 +185,7 @@ func (s *SQLStore) getChannel(db sq.BaseRunner, teamID, channel string) (*mmMode
|
||||
return nil, store.NewNotSupportedError("get channel not supported on standalone mode")
|
||||
}
|
||||
|
||||
func (s *SQLStore) dBVersion() string {
|
||||
func (s *SQLStore) DBVersion() string {
|
||||
var version string
|
||||
var row *sql.Row
|
||||
|
||||
|
@ -32,6 +32,7 @@ func createTestUsers(t *testing.T, store store.Store, num int) []*model.User {
|
||||
return users
|
||||
}
|
||||
|
||||
//nolint:unparam
|
||||
func createTestBlocks(t *testing.T, store store.Store, userID string, num int) []*model.Block {
|
||||
var blocks []*model.Block
|
||||
for i := 0; i < num; i++ {
|
||||
@ -72,6 +73,7 @@ func createTestBlocksForCard(t *testing.T, store store.Store, cardID string, num
|
||||
return blocks
|
||||
}
|
||||
|
||||
//nolint:unparam
|
||||
func createTestCards(t *testing.T, store store.Store, userID string, boardID string, num int) []*model.Block {
|
||||
var blocks []*model.Block
|
||||
for i := 0; i < num; i++ {
|
||||
@ -91,6 +93,7 @@ func createTestCards(t *testing.T, store store.Store, userID string, boardID str
|
||||
return blocks
|
||||
}
|
||||
|
||||
//nolint:unparam
|
||||
func createTestBoards(t *testing.T, store store.Store, teamID string, userID string, num int) []*model.Board {
|
||||
var boards []*model.Board
|
||||
for i := 0; i < num; i++ {
|
||||
@ -109,6 +112,7 @@ func createTestBoards(t *testing.T, store store.Store, teamID string, userID str
|
||||
return boards
|
||||
}
|
||||
|
||||
//nolint:unparam
|
||||
func deleteTestBoard(t *testing.T, store store.Store, boardID string, userID string) {
|
||||
err := store.DeleteBoard(boardID, userID)
|
||||
require.NoError(t, err)
|
||||
|
Loading…
Reference in New Issue
Block a user