Another tweak for postgres sigh

This commit is contained in:
Jamie Curnow
2023-05-31 15:11:25 +10:00
parent 4b4c7baea4
commit 63845377d9
2 changed files with 16 additions and 3 deletions

View File

@ -25,3 +25,14 @@ func QuoteTableName(tbl string) string {
return fmt.Sprintf("`%s`", tbl)
}
}
// GetCaseInsensitiveLike returns a different operator based on
// the db driver
func GetCaseInsensitiveLike() string {
switch strings.ToLower(config.Configuration.DB.Driver) {
case config.DatabasePostgres:
return "ILIKE"
default:
return "LIKE"
}
}