connection

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2019 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 MysqlConnection

type MysqlConnection sql.DB

func (*MysqlConnection) Exec

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

func (*MysqlConnection) Prepare

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

func (*MysqlConnection) Query

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

type MysqlStatement

type MysqlStatement sql.Stmt

func (*MysqlStatement) Close

func (s *MysqlStatement) Close()

func (*MysqlStatement) Exec

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

func (*MysqlStatement) Query

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

Source Files

  • connection.go
  • mysql_connection.go

Jump to

Keyboard shortcuts

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