connection

package
Version: v0.2.6 Latest Latest
Warning

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

Go to latest
Published: May 11, 2020 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.0.5

type DefaultConnection sql.DB

func (*DefaultConnection) Exec added in v0.0.5

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

func (*DefaultConnection) Prepare added in v0.0.5

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

func (*DefaultConnection) Query added in v0.0.5

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

type DefaultStatement added in v0.0.5

type DefaultStatement sql.Stmt

func (*DefaultStatement) Close added in v0.0.5

func (s *DefaultStatement) Close()

func (*DefaultStatement) Exec added in v0.0.5

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

func (*DefaultStatement) Query added in v0.0.5

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
t or T : Toggle theme light dark auto
y or Y : Canonical URL