rt

package
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 22, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option struct {
	Conext   context.Context
	Timezone *time.Location
	Logger   logger.GpaLogger
}

type Provider

type Provider struct {
	// contains filtered or unexported fields
}

func NewProvider

func NewProvider(dialect constants.DIALECT, source string, opt *Option) (*Provider, error)

func (*Provider) Executor

func (p *Provider) Executor() exec.SQLExecutor

func (*Provider) GetTimeStampzFormat

func (p *Provider) GetTimeStampzFormat() string

func (*Provider) GetTimezone

func (p *Provider) GetTimezone() *time.Location

func (*Provider) SetConnMaxIdleTime

func (p *Provider) SetConnMaxIdleTime(d time.Duration) *Provider

func (*Provider) SetConnMaxLifetime

func (p *Provider) SetConnMaxLifetime(d time.Duration) *Provider

func (*Provider) SetLogSQL

func (p *Provider) SetLogSQL(log bool) *Provider

func (*Provider) SetMaxIdleConns

func (p *Provider) SetMaxIdleConns(n int) *Provider

func (*Provider) SetMaxOpenConns

func (p *Provider) SetMaxOpenConns(n int) *Provider

func (*Provider) Transaction

func (p *Provider) Transaction(fn func() error) (err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL