Documentation ¶
Index ¶
Constants ¶
View Source
const (
DriverMysql = "mysql"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conn ¶
type Conn = xorm.EngineInterface
func NewConnection ¶
func NewDb ¶
func NewDb(opts ...PoolOptions) (Conn, error)
type Option ¶
type Option struct {
// contains filtered or unexported fields
}
func (*Option) GetDriverSchema ¶
type PoolOption ¶
type PoolOption struct {
// contains filtered or unexported fields
}
func (*PoolOption) GetDriver ¶
func (o *PoolOption) GetDriver() string
func (*PoolOption) GetDriverSchema ¶
func (o *PoolOption) GetDriverSchema() string
func (*PoolOption) GetSources ¶
func (o *PoolOption) GetSources() []string
func (*PoolOption) Option ¶
func (o *PoolOption) Option(opts ...PoolOptions)
type PoolOptions ¶
type PoolOptions func(*PoolOption)
func WithPoolDriver ¶
func WithPoolDriver(driver string) PoolOptions
func WithPoolPolices ¶
func WithPoolPolices(polices ...xorm.GroupPolicy) PoolOptions
func WithPoolSources ¶
func WithPoolSources(sources ...string) PoolOptions
Click to show internal directories.
Click to hide internal directories.