pgx

package
v0.0.0-...-c425583 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Beginner

type Beginner struct {
	Conn
}

func (Beginner) BeginTx

func (c Beginner) BeginTx(ctx context.Context, options *stdSQL.TxOptions) (sql.Tx, error)

func (Beginner) ExecContext

func (c Beginner) ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error)

func (Beginner) QueryContext

func (c Beginner) QueryContext(ctx context.Context, query string, args ...interface{}) (sql.Rows, error)

type Conn

type Conn interface {
	BeginTx(ctx context.Context, options pgx.TxOptions) (pgx.Tx, error)
	Exec(ctx context.Context, sql string, arguments ...interface{}) (pgconn.CommandTag, error)
	Query(ctx context.Context, sql string, arguments ...interface{}) (pgx.Rows, error)
}

type Result

type Result struct {
	pgconn.CommandTag
}

func (Result) RowsAffected

func (p Result) RowsAffected() (int64, error)

type Rows

type Rows struct {
	pgx.Rows
}

func (Rows) Close

func (p Rows) Close() error

type Tx

type Tx struct {
	pgx.Tx
}

func (Tx) Commit

func (t Tx) Commit() error

func (Tx) ExecContext

func (t Tx) ExecContext(ctx context.Context, query string, args ...any) (sql.Result, error)

func (Tx) QueryContext

func (t Tx) QueryContext(ctx context.Context, query string, args ...any) (sql.Rows, error)

func (Tx) Rollback

func (t Tx) Rollback() error

Jump to

Keyboard shortcuts

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