pgbatch

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 21, 2025 License: MIT Imports: 7 Imported by: 0

README

pgBatch

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PgBatch

type PgBatch struct {
	Query func(ctx context.Context, q string, param ...any) *QueryResult
}

func Connect

func Connect(c context.Context, p *pgxpool.Pool) *PgBatch

type QueryResult

type QueryResult struct {
	// contains filtered or unexported fields
}

func NewQueryResult

func NewQueryResult(rows []map[string]any) *QueryResult

NewQueryResult creates a new QueryResult instance

func (*QueryResult) Get

func (qr *QueryResult) Get(column string) (any, error)

Get retrieves the raw value of a column in the current row

func (*QueryResult) GetBool

func (qr *QueryResult) GetBool(column string) (bool, error)

GetBool returns the column value as a boolean

func (*QueryResult) GetInt

func (qr *QueryResult) GetInt(column string) (int, error)

GetInt returns the column value as an int (accepts int32, int64, float64)

func (*QueryResult) GetString

func (qr *QueryResult) GetString(column string) (string, error)

GetString returns the column value as a string

func (*QueryResult) Next

func (qr *QueryResult) Next() bool

Next moves the cursor to the next row,

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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