Use xorm quoter for feed query (#5018)

This commit is contained in:
6543 2025-03-26 19:37:38 +01:00 committed by GitHub
parent d53fa6d74d
commit c4b22cc493
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 13 deletions

View File

@ -41,7 +41,7 @@ pipelines.author as pipeline_author,
pipelines.email as pipeline_email,
pipelines.avatar as pipeline_avatar`
return fmt.Sprintf(feedTemplate, s.quoteIdentifier("commit"))
return fmt.Sprintf(feedTemplate, s.engine.Dialect().Quoter().Quote("commit"))
}
func (s storage) GetPipelineQueue() ([]*model.Feed, error) {

View File

@ -76,15 +76,3 @@ func callerName(skip int) string {
}
return fnName
}
func (s storage) quoteIdentifier(identifier string) string {
driver := s.engine.DriverName()
switch driver {
case DriverMysql:
return "`" + identifier + "`"
case DriverPostgres, DriverSqlite:
return "\"" + identifier + "\""
default:
return identifier
}
}