alist/internal/db/util.go

15 lines
235 B
Go
Raw Normal View History

2022-06-25 13:36:35 +00:00
package db
2022-06-09 09:11:46 +00:00
import (
"fmt"
2022-08-03 06:26:59 +00:00
2022-06-25 12:38:02 +00:00
"github.com/alist-org/alist/v3/internal/conf"
2022-06-09 09:11:46 +00:00
)
func columnName(name string) string {
if conf.Conf.Database.Type == "postgres" {
return fmt.Sprintf(`"%s"`, name)
}
return fmt.Sprintf("`%s`", name)
}