driver

package
v0.0.0-...-19e0465 Latest Latest
Warning

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

Go to latest
Published: May 12, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Master

func Master(name ...string) (drv *sql.Driver, err error)

Master 主数据库驱动

func NewDriver

func NewDriver(opts ...DriverOption) (*multiDriver, error)

func Slave

func Slave(name ...string) (drv *sql.Driver, err error)

Slave 从数据库驱动

Types

type DriverOption

type DriverOption func(md *multiDriver)

func WithMasterDriver

func WithMasterDriver(d dialect.Driver) DriverOption

func WithSlaveDriver

func WithSlaveDriver(d dialect.Driver) DriverOption

Jump to

Keyboard shortcuts

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