Skip to content

Commit

Permalink
WS-707 seems like AWS RDS doesn't support prefer
Browse files Browse the repository at this point in the history
  • Loading branch information
akeemphilbert committed Apr 19, 2024
1 parent 45bb21f commit 0730add
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rest/gorm.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func NewGORM(p GORMParams) (GORMResult, error) {
connStr = fmt.Sprintf("%s:%s@tcp(%s:%s)/%s?sql_mode='ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'&parseTime=true",
config.User, config.Password, config.Host, strconv.Itoa(config.Port), config.Database)
case "postgres", "pgx":
connStr = fmt.Sprintf("host=%s port=%s user=%s password=%s dbname=%s sslmode=prefer",
connStr = fmt.Sprintf("host=%s port=%s user=%s password=%s dbname=%s sslmode=disable",
config.Host, strconv.Itoa(config.Port), config.User, config.Password, config.Database)
default:
return GORMResult{}, errors.New(fmt.Sprintf("db driver '%s' is not supported ", config.Driver))
Expand Down

0 comments on commit 0730add

Please sign in to comment.