Fix quotes

This commit is contained in:
Jamie Curnow committed 2024-09-11 19:38:41 +10:00
1 parent e78dd069f1
commit c4db4a2647
4 files changed
+12 -11

No files matched your search

+5 -4
View File
@@ -18,11 +18,12 @@ const (
// is for special cases where we run raw sql
func QuoteTableName(tbl string) string {
switch strings.ToLower(config.Configuration.DB.Driver) {
case config.DatabasePostgres:
return fmt.Sprintf(`"%s"`, tbl)
default:
// This is the same for Mysql and Sqlite
case config.DatabaseMysql:
// backticks for mysql
return fmt.Sprintf("`%s`", tbl)
default:
// double quotes for everything else
return fmt.Sprintf(`"%s"`, tbl)
}
}