feat: adapt postgres (close #740)
This commit is contained in:
13
model/util.go
Normal file
13
model/util.go
Normal file
@ -0,0 +1,13 @@
|
||||
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)
|
||||
}
|
Reference in New Issue
Block a user