db

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2024 License: Apache-2.0 Imports: 4 Imported by: 3

Documentation

Index

Constants

View Source
const ErrAbstractMethod = utils.Error("Abstract method")

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientInterface

type ClientInterface interface {
	GetClient() *sqlx.DB
	IsConnected() bool
	Connect() error
	Disconnect()
}

type Executor added in v0.1.4

type Executor interface {
	Exec(ctx context.Context, sql string, arguments ...any) (any, error)
}

type Querier added in v0.1.4

type Querier interface {
	Query(ctx context.Context, sql string, arguments ...any) (RowSet, error)
}

type RowSet added in v0.1.4

type RowSet interface {
	Scan(dest ...any) error
	Next() bool
	Err() error
}

type SqlClient added in v0.1.1

type SqlClient struct {
	Conn       *sqlx.DB
	Dsn        string
	DriverName string
}

func NewSqlClient added in v0.1.1

func NewSqlClient(dsn string, driverName string) *SqlClient

func (*SqlClient) Connect added in v0.1.1

func (c *SqlClient) Connect() error

func (*SqlClient) Disconnect added in v0.1.1

func (c *SqlClient) Disconnect()

func (*SqlClient) GetClient added in v0.1.1

func (c *SqlClient) GetClient() *sqlx.DB

func (*SqlClient) IsConnected added in v0.1.1

func (c *SqlClient) IsConnected() bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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