Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrConnectionNotFound = errors.New("connection not found")
)
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config interface { // SetConnMaxIdleTime configures the sql.DB setting of the same name // (default: 0 - no expiration) SetConnMaxIdleTime(maxIdle time.Duration) Config // SetConnMaxLifetime configures the sql.DB setting of the same name // (default: 0 - no expiration) SetConnMaxLifetime(maxLifetime time.Duration) Config // SetMaxIdleConns configures the sql.DB setting of the same name // (default: 2) SetMaxIdleConns(maxIdle int) Config // SetMaxOpenConns configures the sql.DB setting of the same name // (default: 0 - unlimited) SetMaxOpenConns(maxOpen int) Config // SetSlowThreshold specifies the corresponding logger.Config setting SetSlowThreshold(threshold time.Duration) Config // SetIgnoreRecordNotFoundError specifies the corresponding logger.Config setting SetIgnoreRecordNotFoundError(ignore bool) Config // SetParameterizedQueries specifies the corresponding logger.Config setting SetParameterizedQueries(parameterized bool) Config // SetLogLevel specifies the corresponding logger.Config setting SetLogLevel(level logger.LogLevel) Config // contains filtered or unexported methods }
Config is a buildable interface for configuring the sql.DB and logger.Config settings used by Gorm and SQL drivers
Click to show internal directories.
Click to hide internal directories.