db

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2019 License: MIT Imports: 8 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WrapWithRecorder

func WrapWithRecorder(driverName string, recorder *apitest.Recorder) driver.Driver

WrapWithRecorder wraps an existing driver with a Recorder

Types

type RecordingConn

type RecordingConn struct {
	Conn driver.Conn
	// contains filtered or unexported fields
}

func (*RecordingConn) Begin

func (conn *RecordingConn) Begin() (driver.Tx, error)

func (*RecordingConn) Close

func (conn *RecordingConn) Close() error

func (*RecordingConn) Prepare

func (conn *RecordingConn) Prepare(query string) (driver.Stmt, error)

type RecordingConnWithBeginTx

type RecordingConnWithBeginTx struct {
	*RecordingConn
}

func (*RecordingConnWithBeginTx) BeginTx

func (conn *RecordingConnWithBeginTx) BeginTx(ctx context.Context, opts driver.TxOptions) (driver.Tx, error)

type RecordingConnWithExec

type RecordingConnWithExec struct {
	*RecordingConn
}

func (*RecordingConnWithExec) Exec

func (conn *RecordingConnWithExec) Exec(query string, args []driver.Value) (driver.Result, error)

type RecordingConnWithExecContext

type RecordingConnWithExecContext struct {
	*RecordingConn
}

func (*RecordingConnWithExecContext) ExecContext

func (conn *RecordingConnWithExecContext) ExecContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Result, error)

type RecordingConnWithExecQuery

type RecordingConnWithExecQuery struct {
	*RecordingConn
	*RecordingConnWithExec
	*RecordingConnWithQuery
}

type RecordingConnWithPing

type RecordingConnWithPing struct {
	*RecordingConn
}

func (*RecordingConnWithPing) Ping

func (conn *RecordingConnWithPing) Ping(ctx context.Context) error

type RecordingConnWithPrepareContext

type RecordingConnWithPrepareContext struct {
	*RecordingConn
}

func (*RecordingConnWithPrepareContext) PrepareContext

func (conn *RecordingConnWithPrepareContext) PrepareContext(ctx context.Context, query string) (driver.Stmt, error)

type RecordingConnWithQuery

type RecordingConnWithQuery struct {
	*RecordingConn
}

func (*RecordingConnWithQuery) Query

func (conn *RecordingConnWithQuery) Query(query string, args []driver.Value) (driver.Rows, error)

type RecordingConnWithQueryContext

type RecordingConnWithQueryContext struct {
	*RecordingConn
}

func (*RecordingConnWithQueryContext) QueryContext

func (conn *RecordingConnWithQueryContext) QueryContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Rows, error)

type RecordingConnector

type RecordingConnector struct {
	Connector driver.Connector
	// contains filtered or unexported fields
}

func (*RecordingConnector) Connect

func (c *RecordingConnector) Connect(context context.Context) (driver.Conn, error)

func (*RecordingConnector) Driver

func (c *RecordingConnector) Driver() driver.Driver

type RecordingDriver

type RecordingDriver struct {
	Driver driver.Driver
	// contains filtered or unexported fields
}

func (*RecordingDriver) Open

func (d *RecordingDriver) Open(name string) (driver.Conn, error)

type RecordingDriverContext

type RecordingDriverContext struct {
	*RecordingDriver
}

func (*RecordingDriverContext) OpenConnector

func (d *RecordingDriverContext) OpenConnector(name string) (driver.Connector, error)

type RecordingRows

type RecordingRows struct {
	Rows driver.Rows

	RowsFound int
	// contains filtered or unexported fields
}

func (*RecordingRows) Close

func (rows *RecordingRows) Close() error

func (*RecordingRows) Columns

func (rows *RecordingRows) Columns() []string

func (*RecordingRows) Next

func (rows *RecordingRows) Next(dest []driver.Value) error

type RecordingStmt

type RecordingStmt struct {
	Stmt driver.Stmt
	// contains filtered or unexported fields
}

func (*RecordingStmt) Close

func (stmt *RecordingStmt) Close() error

func (*RecordingStmt) Exec

func (stmt *RecordingStmt) Exec(args []driver.Value) (driver.Result, error)

func (*RecordingStmt) NumInput

func (stmt *RecordingStmt) NumInput() int

func (*RecordingStmt) Query

func (stmt *RecordingStmt) Query(args []driver.Value) (driver.Rows, error)

type RecordingStmtWithExecContext

type RecordingStmtWithExecContext struct {
	*RecordingStmt
}

func (*RecordingStmtWithExecContext) ExecContext

func (stmt *RecordingStmtWithExecContext) ExecContext(ctx context.Context, args []driver.NamedValue) (driver.Result, error)

type RecordingStmtWithQueryContext

type RecordingStmtWithQueryContext struct {
	*RecordingStmt
}

func (*RecordingStmtWithQueryContext) QueryContext

func (stmt *RecordingStmtWithQueryContext) QueryContext(ctx context.Context, args []driver.NamedValue) (driver.Rows, error)

Jump to

Keyboard shortcuts

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