mirror of
https://github.com/HChaZZY/alist.git
synced 2025-12-06 11:03:49 +08:00
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