connection

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection interface {
	Prepare(sql string) (statement.Statement, error)
	Query(ctx context.Context, result reflection.Object, sql string, params ...interface{}) error
	Exec(ctx context.Context, sql string, params ...interface{}) (common.Result, error)
}

type DefaultConnection added in v0.2.7

type DefaultConnection sql.DB

func (*DefaultConnection) Exec added in v0.2.7

func (conn *DefaultConnection) Exec(ctx context.Context, sqlStr string, params ...interface{}) (common.Result, error)

func (*DefaultConnection) Prepare added in v0.2.7

func (conn *DefaultConnection) Prepare(sqlStr string) (statement.Statement, error)

func (*DefaultConnection) Query added in v0.2.7

func (conn *DefaultConnection) Query(ctx context.Context, result reflection.Object, sqlStr string, params ...interface{}) error

type DefaultStatement added in v0.2.7

type DefaultStatement sql.Stmt

func (*DefaultStatement) Close added in v0.2.7

func (s *DefaultStatement) Close()

func (*DefaultStatement) Exec added in v0.2.7

func (s *DefaultStatement) Exec(ctx context.Context, params ...interface{}) (common.Result, error)

func (*DefaultStatement) Query added in v0.2.7

func (s *DefaultStatement) Query(ctx context.Context, result reflection.Object, params ...interface{}) error

Jump to

Keyboard shortcuts

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