Documentation ¶
Index ¶
- Constants
- func Dsn2DB(dsnURL string, withLog bool) (*gorm.DB, error)
- func ForUpdate(db *gorm.DB, lock bool) *gorm.DB
- func IsDupError(err error) bool
- func IsNotFoundErr(err error) bool
- func New(dsn string, opts ...Option) (*gorm.DB, error)
- func NewGorm(dsn string, maxOpenConn, maxIdle int, maxLifeTime time.Duration, log bool) (*gorm.DB, error)
- func ToGRPCDupErr(err error) error
- func ToGRPCNotFoundErr(err error) error
- func Transact(db *gorm.DB, fnList ...GormProcFn) (err error)
- type Dsn
- type GormProcFn
- type Option
Constants ¶
View Source
const ( DefaultMaxOpenCount = 40 DefaultMaxIdleCount = 20 DefaultMaxLifeTime = time.Hour )
Variables ¶
This section is empty.
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.