dbtrace

package
v0.0.0-...-7a23ab9 Latest Latest
Warning

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

Go to latest
Published: May 2, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	_, RowsPerQuery = convenience.NewCounter(queryOperation, "rows", "Number of rows per query")
	QueryTime       = convenience.NewTimer(queryOperation, "Time spent reading and processing query results, in microseconds")

	ExecTime        = convenience.NewTimer(execOperation, "Time spent reading and processing query results, in microseconds")
	_, RowsAffected = convenience.NewCounter(execOperation, "rows", "Rows affected")
)

Functions

This section is empty.

Types

type Exec

type Exec struct {
	Span   *trace.Span
	Query  string
	Result sql.Result
	Err    error
	// contains filtered or unexported fields
}

func StartExec

func StartExec(ctx context.Context, stmt string) *Exec

func (*Exec) End

func (e *Exec) End(ctx context.Context)

type Query

type Query struct {
	Span  *trace.Span
	Err   error
	Rows  *sql.Rows
	Query string
	// contains filtered or unexported fields
}

func StartQuery

func StartQuery(ctx context.Context, query string) *Query

func (*Query) End

func (q *Query) End(ctx context.Context)

func (*Query) NextResultSet

func (q *Query) NextResultSet() bool

func (*Query) NextRow

func (q *Query) NextRow() bool

Jump to

Keyboard shortcuts

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