1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2026-06-03 16:35:37 +02:00

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
2 changed files with 1 additions and 13 deletions
+1 -1
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) {
-12
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
}
}