postgres

package
v0.23.0 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package postgres provides the PostgreSQL-backed implementation of the action.AttemptRepository port, reading the action_attempt table (vogel/action/migrations) with native pgx.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AttemptRepository

type AttemptRepository struct{}

AttemptRepository implements action.AttemptRepository using pgx. It is stateless: every method receives the pgxtx.DBTX to run against.

func NewAttemptRepository

func NewAttemptRepository() *AttemptRepository

NewAttemptRepository creates a stateless PostgreSQL-backed attempt repository.

func (*AttemptRepository) ListByCase

func (r *AttemptRepository) ListByCase(ctx context.Context, db pgxtx.DBTX, caseID uuid.UUID) ([]action.Attempt, error)

ListByCase returns every attempt of caseID, ordered by seq, then attempt.

func (*AttemptRepository) ListByEvent

func (r *AttemptRepository) ListByEvent(ctx context.Context, db pgxtx.DBTX, caseID uuid.UUID, seq int64) ([]action.Attempt, error)

ListByEvent returns the attempts of the effects the event at seq of caseID triggered, in the ListByCase order.

Jump to

Keyboard shortcuts

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