dbwrapper

package
v0.0.0-...-f25badd Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultDBName = "test"

Variables

This section is empty.

Functions

This section is empty.

Types

type Columns

type Columns []string

type DBWrapper

type DBWrapper struct {
	Name     string
	Database *sql.DB
	Channels *callback.CallbackChannels
}

func New

func New(dbname, id string, functions []string, channels *callback.CallbackChannels) *DBWrapper

func (*DBWrapper) Close

func (w *DBWrapper) Close() error

func (*DBWrapper) Execute

func (w *DBWrapper) Execute(ctx context.Context, sql string, params ...interface{}) (insertId int64, affected int64, err error)

func (*DBWrapper) Open

func (w *DBWrapper) Open(driverName string) error

func (*DBWrapper) Query

func (w *DBWrapper) Query(ctx context.Context, sql string, params ...interface{}) ([]string, []string, []*pb.Row, error)

type RowFields

type RowFields *[]string

type Rows

type Rows []RowFields

Jump to

Keyboard shortcuts

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