pg

package
v0.0.0-...-2c0343b Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2021 License: Apache-2.0, BSD-3-Clause, Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Example
conn := pg.Connect(&pg.Options{
	User:     "go-pg-test",
	Database: "datadog",
})

// Wrap the connection with the APM hook.
pgtrace.Wrap(conn)
var user struct {
	Name string
}
_, err := conn.QueryOne(&user, "SELECT name FROM users")
if err != nil {
	log.Fatal(err)
}
Output:

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func Wrap

func Wrap(db *pg.DB)

Wrap augments the given DB with tracing.

Types

This section is empty.

Jump to

Keyboard shortcuts

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