pgx

package module
v0.0.0-...-e070c8a Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(db *pgxpool.Pool) *Client

func (*Client) Create

func (c *Client) Create(ctx context.Context, messages []gooutstore.Message) error

func (*Client) FromContext

func (c *Client) FromContext(ctx context.Context) TX

func (*Client) IncRetry

func (c *Client) IncRetry(ctx context.Context, m gooutstore.Message) error

func (*Client) ReadBatch

func (c *Client) ReadBatch(ctx context.Context, messageType string, batchSize int) ([]gooutstore.Message, error)

func (*Client) SetBroken

func (c *Client) SetBroken(ctx context.Context, m gooutstore.Message) error

func (*Client) SetDone

func (c *Client) SetDone(ctx context.Context, m gooutstore.Message) error

func (*Client) ToContext

func (c *Client) ToContext(ctx context.Context, tx pgx.Tx) context.Context

func (*Client) WithTransaction

func (c *Client) WithTransaction(ctx context.Context, fn func(context.Context) error) (err error)

type TX

type TX interface {
	Query(ctx context.Context, query string, args ...any) (pgx.Rows, error)
	Exec(ctx context.Context, query string, args ...any) (pgconn.CommandTag, error)
}

Jump to

Keyboard shortcuts

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