0
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-09-26 05:24:05 -04:00

Refactor db package (#35380)

Remove unnecessary code
This commit is contained in:
wxiaoguang
2025-08-30 01:04:06 +08:00
committed by GitHub
parent aef4a3514c
commit 1f50048ac9
11 changed files with 37 additions and 52 deletions

View File

@@ -159,7 +159,7 @@ func DumpQueryResult(t require.TestingT, sqlOrBean any, sqlArgs ...any) {
goDB := x.DB().DB
sql, ok := sqlOrBean.(string)
if !ok {
sql = "SELECT * FROM " + db.TableName(sqlOrBean)
sql = "SELECT * FROM " + x.TableName(sqlOrBean)
} else if !strings.Contains(sql, " ") {
sql = "SELECT * FROM " + sql
}