Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"database/sql"
"encoding/json"
"fmt"
"strconv"
"strings"
"time"

Expand Down Expand Up @@ -258,6 +259,9 @@ func (c *Config) DriverNameAndDSN() (driverName, dsn string) {
case DialectPostgres:
return "postgres", MakePostgresDSN(&c.Postgres)
case DialectPgx:
c.Postgres.AdditionalParameters["pool_max_conns"] = strconv.Itoa(c.MaxOpenConns)
c.Postgres.AdditionalParameters["pool_min_conns"] = strconv.Itoa(c.MaxIdleConns)
c.Postgres.AdditionalParameters["pool_max_conn_lifetime"] = c.ConnMaxLifetime.String()
return "pgx", MakePostgresDSN(&c.Postgres)
case DialectMSSQL:
return "mssql", MakeMSSQLDSN(&c.MSSQL)
Expand Down
21 changes: 10 additions & 11 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ go 1.20

require (
github.com/DATA-DOG/go-sqlmock v1.5.2
github.com/acronis/go-appkit v1.17.0
github.com/acronis/go-appkit v1.24.0
github.com/cenkalti/backoff/v4 v4.3.0
github.com/doug-martin/goqu/v9 v9.19.0
github.com/go-sql-driver/mysql v1.8.1
github.com/gocraft/dbr/v2 v2.7.6
github.com/google/uuid v1.6.0
github.com/jackc/pgx/v5 v5.6.0
github.com/jackc/pgx/v5 v5.7.6
github.com/lib/pq v1.10.9
github.com/mattn/go-sqlite3 v1.14.24
github.com/microsoft/go-mssqldb v1.8.1-0.20250219145450-ba24acc31dbe
github.com/mitchellh/mapstructure v1.5.0
github.com/prometheus/client_golang v1.20.5
github.com/rubenv/sql-migrate v1.0.0
github.com/rubenv/sql-migrate v1.8.0
github.com/spf13/viper v1.19.0
github.com/stretchr/testify v1.10.0
github.com/testcontainers/testcontainers-go v0.33.0
Expand Down Expand Up @@ -46,6 +46,7 @@ require (
github.com/docker/go-units v0.5.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/go-gorp/gorp/v3 v3.1.0 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect
Expand All @@ -55,8 +56,8 @@ require (
github.com/hashicorp/golang-lru v1.0.2 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/jackc/pgpassfile v1.0.0 // indirect
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect
github.com/jackc/puddle/v2 v2.2.1 // indirect
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect
github.com/jackc/puddle/v2 v2.2.2 // indirect
github.com/klauspost/compress v1.17.9 // indirect
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect
github.com/magiconair/properties v1.8.7 // indirect
Expand Down Expand Up @@ -93,19 +94,17 @@ require (
github.com/tklauser/go-sysconf v0.3.12 // indirect
github.com/tklauser/numcpus v0.6.1 // indirect
github.com/yusufpapurcu/wmi v1.2.3 // indirect
github.com/ziutek/mymysql v1.5.4 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect
go.opentelemetry.io/otel v1.24.0 // indirect
go.opentelemetry.io/otel/metric v1.24.0 // indirect
go.opentelemetry.io/otel/trace v1.24.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/crypto v0.33.0 // indirect
golang.org/x/crypto v0.37.0 // indirect
golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa // indirect
golang.org/x/sync v0.11.0 // indirect
golang.org/x/sys v0.30.0 // indirect
golang.org/x/text v0.22.0 // indirect
golang.org/x/sync v0.13.0 // indirect
golang.org/x/sys v0.32.0 // indirect
golang.org/x/text v0.24.0 // indirect
google.golang.org/protobuf v1.34.2 // indirect
gopkg.in/gorp.v1 v1.7.2 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
)
Loading