driver

package
v1.0.1006 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

type Driver struct {

	// 配置
	Config map[string]any
	// contains filtered or unexported fields
}

*

  • 基础驱动 *
  • @create 2021-9-15
  • @author deatil

func New

func New(conf ...map[string]any) *Driver

func (*Driver) Close

func (this *Driver) Close()

*

  • 关闭

func (*Driver) CreateConnection

func (this *Driver) CreateConnection()

*

  • 初始化

func (*Driver) CreateOpenConnection

func (this *Driver) CreateOpenConnection(dia gorm.Dialector)

*

  • 初始化

func (*Driver) GetConfig

func (this *Driver) GetConfig(name string) any

获取配置

func (*Driver) GetConnection

func (this *Driver) GetConnection() *gorm.DB

*

  • 初始化

func (*Driver) GetConnectionWithDebug

func (this *Driver) GetConnectionWithDebug() *gorm.DB

*

  • 获取数据库连接对象db,带debug

func (*Driver) WithConfig

func (this *Driver) WithConfig(config map[string]any) interfaces.Driver

设置配置

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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