function

package
v0.0.0-...-64f415b Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Batcher

type Batcher interface {
	Queue(query string, arguments ...any) *pgx.QueuedQuery
}

type DBQuerier

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

func NewQuerier

func NewQuerier(ctx context.Context, conn genericConn) (*DBQuerier, error)

NewQuerier creates a DBQuerier

func (*DBQuerier) OutParams

func (q *DBQuerier) OutParams(ctx context.Context) ([]OutParamsRow, error)

OutParams implements Querier.OutParams.

func (*DBQuerier) QueueOutParams

func (q *DBQuerier) QueueOutParams(batch Batcher) *QueuedOutParams

QueueOutParams implements Querier.QueueOutParams.

type ListItem

type ListItem struct {
	Name  *string `json:"name"`
	Color *string `json:"color"`
}

ListItem represents the Postgres composite type "list_item".

type ListStats

type ListStats struct {
	Val1 *string  `json:"val1"`
	Val2 []*int32 `json:"val2"`
}

ListStats represents the Postgres composite type "list_stats".

type OutParamsRow

type OutParamsRow struct {
	Items []ListItem `json:"_items"`
	Stats ListStats  `json:"_stats"`
}

type Querier

type Querier interface {
	OutParams(ctx context.Context) ([]OutParamsRow, error)

	QueueOutParams(batch Batcher) *QueuedOutParams
}

Querier is a typesafe Go interface backed by SQL queries.

type QueryName

type QueryName struct{}

type QueuedOutParams

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

func (*QueuedOutParams) OnResult

func (q *QueuedOutParams) OnResult(onResult func([]OutParamsRow) error)

func (*QueuedOutParams) WrapError

func (q *QueuedOutParams) WrapError(wrapError func(err error) error)

Jump to

Keyboard shortcuts

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