pgxtype

package
v1.14.3 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 License: MIT Imports: 5 Imported by: 23

README

pgxtype

pgxtype is a helper module that connects pgx and pgtype. This package is not currently covered by semantic version guarantees. i.e. The interfaces may change without a major version release of pgtype.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetArrayElementOID

func GetArrayElementOID(ctx context.Context, conn Querier, oid uint32) (uint32, error)

func GetCompositeFields

func GetCompositeFields(ctx context.Context, conn Querier, oid uint32) ([]pgtype.CompositeTypeField, error)

GetCompositeFields gets the fields of a composite type.

func GetEnumMembers

func GetEnumMembers(ctx context.Context, conn Querier, oid uint32) ([]string, error)

GetEnumMembers gets the possible values of the enum by oid.

func LoadDataType

func LoadDataType(ctx context.Context, conn Querier, ci *pgtype.ConnInfo, typeName string) (pgtype.DataType, error)

LoadDataType uses conn to inspect the database for typeName and produces a pgtype.DataType suitable for registration on ci.

Types

type Querier

type Querier interface {
	Exec(ctx context.Context, sql string, arguments ...interface{}) (pgconn.CommandTag, error)
	Query(ctx context.Context, sql string, optionsAndArgs ...interface{}) (pgx.Rows, error)
	QueryRow(ctx context.Context, sql string, optionsAndArgs ...interface{}) pgx.Row
}

Jump to

Keyboard shortcuts

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