sqlclient

package
v0.0.0-...-f5c995d Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ISqlClientConn

type ISqlClientConn interface {
	GetDB() *bun.DB
}

func NewSqlClient

func NewSqlClient(config SqlConfig) ISqlClientConn

type SqlClientConn

type SqlClientConn struct {
	SqlConfig
	DB *bun.DB
}

func (*SqlClientConn) Connect

func (c *SqlClientConn) Connect() (err error)

func (*SqlClientConn) GetDB

func (c *SqlClientConn) GetDB() *bun.DB

type SqlConfig

type SqlConfig struct {
	Host         string
	Port         int
	Database     string
	Username     string
	Password     string
	Timeout      int
	DialTimeout  int
	ReadTimeout  int
	WriteTimeout int
	PoolSize     int
	MaxIdleConns int
	MaxOpenConns int
}

Jump to

Keyboard shortcuts

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