Skip to content
This repository has been archived by the owner on Mar 12, 2024. It is now read-only.

Commit

Permalink
option to use pgx instead pq (pressly#283)
Browse files Browse the repository at this point in the history
  • Loading branch information
gohryt authored Nov 24, 2021
1 parent 1f07599 commit 4148551
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion db.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func OpenDBWithDriver(driver string, dbstring string) (*sql.DB, error) {
}

switch driver {
case "postgres", "sqlite3", "mysql", "sqlserver", "clickhouse":
case "postgres", "pgx", "sqlite3", "mysql", "sqlserver", "clickhouse":
return sql.Open(driver, dbstring)
default:
return nil, fmt.Errorf("unsupported driver %s", driver)
Expand Down
2 changes: 1 addition & 1 deletion dialect.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func GetDialect() SQLDialect {
// SetDialect sets the SQLDialect
func SetDialect(d string) error {
switch d {
case "postgres":
case "postgres", "pgx":
dialect = &PostgresDialect{}
case "mysql":
dialect = &MySQLDialect{}
Expand Down

0 comments on commit 4148551

Please sign in to comment.