Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
wubin1989 committed Dec 5, 2024
1 parent ce24985 commit b6b59f0
Showing 4 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions framework/config/config.go
Original file line number Diff line number Diff line change
@@ -541,6 +541,7 @@ type Config struct {
Postgres struct {
PreferSimpleProtocol bool
WithoutReturning bool
WithoutQuotingCheck bool
}
Pool struct {
MaxIdleConns int `default:"2"`
1 change: 1 addition & 0 deletions framework/database/database.go
Original file line number Diff line number Diff line change
@@ -235,6 +235,7 @@ func NewDb(conf config.Config) (db *gorm.DB) {
DSN: dsn,
PreferSimpleProtocol: conf.Db.Postgres.PreferSimpleProtocol,
WithoutReturning: conf.Db.Postgres.WithoutReturning,
WithoutQuotingCheck: conf.Db.Postgres.WithoutQuotingCheck,
}
db, err = gorm.Open(postgres.New(conf), gormConf)
case DriverSqlite:
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -32,7 +32,7 @@ require (
github.com/uber/jaeger-lib v2.4.1+incompatible
github.com/unionj-cloud/toolkit v0.0.2
github.com/wubin1989/dbresolver v0.0.2 // indirect
github.com/wubin1989/gen v0.0.4-0.20241120013357-f04cfd0a13ff
github.com/wubin1989/gen v0.0.4
github.com/wubin1989/gorm v0.0.5
golang.org/x/tools v0.26.0 // indirect
)
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1670,8 +1670,8 @@ github.com/wubin1989/datatypes v0.0.2 h1:a2ZiuWjqiYHRS+lkvan8QymxYtB1yvwJHf0kE7m
github.com/wubin1989/datatypes v0.0.2/go.mod h1:ifZrSL9ZeEfOqWxCvAx6ugbiMYcMPRyY2mSgN8qRdKE=
github.com/wubin1989/dbresolver v0.0.2 h1:nxZJa7TSPRWvrHyshbBhoiHFt3/cagHi1qOySrCyqjE=
github.com/wubin1989/dbresolver v0.0.2/go.mod h1:QCzD3CTzNXQ8Vk/V0WRdCQw2Mu8d/UGa3AyRIbbe9hc=
github.com/wubin1989/gen v0.0.4-0.20241120013357-f04cfd0a13ff h1:Zf86px+UxXbMXkRctTz4Fz+hUo4kt3zxoUH/bhQ8ht4=
github.com/wubin1989/gen v0.0.4-0.20241120013357-f04cfd0a13ff/go.mod h1:G4p5Jd41IKqHUyszLXt3eJI9nZyzB0XeFZWL3XaAgJU=
github.com/wubin1989/gen v0.0.4 h1:anmAYD1RYAXtzcPRaY9rnvVD7C6W9bEq5Wja/b6803I=
github.com/wubin1989/gen v0.0.4/go.mod h1:G4p5Jd41IKqHUyszLXt3eJI9nZyzB0XeFZWL3XaAgJU=
github.com/wubin1989/gorm v0.0.3/go.mod h1:sv3afa8/Q6XTgEbTTWTjJd0NIlBMH4bMq5VpEnXr/Cc=
github.com/wubin1989/gorm v0.0.5 h1:eI+zjoQ2GEURnPBEh+H4axSD4sM0wWpJCAQZw+FfZX8=
github.com/wubin1989/gorm v0.0.5/go.mod h1:q/wDV7AJMsbDdtv+K3eNX+VMpC0k1uxCqPBPXzHO90k=

0 comments on commit b6b59f0

Please sign in to comment.