orm

package
v0.0.0-...-31da580 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2022 License: MIT Imports: 5 Imported by: 0

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 NewConnection(opts ...Options) (Conn, error)

func NewDb

func NewDb(opts ...PoolOptions) (Conn, error)

type Option

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

func (*Option) GetDriver

func (o *Option) GetDriver() string

func (*Option) GetDriverSchema

func (o *Option) GetDriverSchema() string

func (*Option) GetSource

func (o *Option) GetSource() string

func (*Option) Option

func (o *Option) Option(opts ...Options)

type Options

type Options func(*Option)

func WithDriver

func WithDriver(driver string) Options

func WithSource

func WithSource(source string) Options

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

Jump to

Keyboard shortcuts

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