alist/model/util.go

14 lines
221 B
Go

package model
import (
"fmt"
"github.com/Xhofe/alist/conf"
)
func columnName(name string) string {
if conf.Conf.Database.Type == "postgres" {
return fmt.Sprintf(`"%s"`, name)
}
return fmt.Sprintf("`%s`", name)
}