eventsql

package
v0.0.0-...-aa7570c Latest Latest
Warning

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

Go to latest
Published: May 13, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBatchAlreadyClosed = errors.New("batch already closed")
)

Functions

This section is empty.

Types

type DBTX

type DBTX interface {
	Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error)
	Query(context.Context, string, ...interface{}) (pgx.Rows, error)
	QueryRow(context.Context, string, ...interface{}) pgx.Row
	SendBatch(context.Context, *pgx.Batch) pgx.BatchResults
}

type Querier

type Querier interface {
	Upsert(ctx context.Context, arg []UpsertParams) *UpsertBatchResults
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) Upsert

func (q *Queries) Upsert(ctx context.Context, arg []UpsertParams) *UpsertBatchResults

func (*Queries) WithTx

func (q *Queries) WithTx(tx pgx.Tx) *Queries

type UpsertBatchResults

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

func (*UpsertBatchResults) Close

func (b *UpsertBatchResults) Close() error

func (*UpsertBatchResults) Exec

func (b *UpsertBatchResults) Exec(f func(int, error))

type UpsertParams

type UpsertParams struct {
	Uid               uuid.UUID
	EnvironmentName   string
	InvolvedKind      string
	InvolvedName      string
	InvolvedNamespace string
	Data              []byte
	Reason            string
	TriggeredAt       pgtype.Timestamptz
}

Jump to

Keyboard shortcuts

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