postgres

package
v0.0.0-...-92c1c4b Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2026 License: CC0-1.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PgxRepository

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

PgxRepository provides repository methods that work with pgx transactions

func NewPgxRepositoryWithPool

func NewPgxRepositoryWithPool(pool *pgxv5Pool.Pool) *PgxRepository

NewPgxRepositoryWithPool creates a new pgx repository instance with a connection pool

func (*PgxRepository) CreateCCLFFile

func (r *PgxRepository) CreateCCLFFile(ctx context.Context, cclfFile models.CCLFFile) (uint, error)

CreateCCLFFile creates a CCLF file record using the repository's pool

func (*PgxRepository) CreateCCLFFileTx

func (r *PgxRepository) CreateCCLFFileTx(ctx context.Context, tx pgxv5.Tx, cclfFile models.CCLFFile) (uint, error)

CreateCCLFFileTx creates a CCLF file record using pgx transaction

func (*PgxRepository) FindOrCreateWarningAndInfoJobKey

func (r *PgxRepository) FindOrCreateWarningAndInfoJobKey(ctx context.Context, jobID uint) error

func (*PgxRepository) GetCCLFFileExistsByName

func (r *PgxRepository) GetCCLFFileExistsByName(ctx context.Context, name string) (bool, error)

GetCCLFFileExistsByName checks if a CCLF file exists by name using the repository's pool

func (*PgxRepository) GetCCLFFileExistsByNameTx

func (r *PgxRepository) GetCCLFFileExistsByNameTx(ctx context.Context, tx pgxv5.Tx, name string) (bool, error)

GetCCLFFileExistsByNameTx checks if a CCLF file exists by name using pgx transaction

func (*PgxRepository) UpdateCCLFFileImportStatus

func (r *PgxRepository) UpdateCCLFFileImportStatus(ctx context.Context, fileID uint, importStatus string) error

UpdateCCLFFileImportStatus updates the import status of a CCLF file using the repository's pool

func (*PgxRepository) UpdateCCLFFileImportStatusTx

func (r *PgxRepository) UpdateCCLFFileImportStatusTx(ctx context.Context, tx pgxv5.Tx, fileID uint, importStatus string) error

UpdateCCLFFileImportStatusTx updates the import status of a CCLF file using pgx transaction

type Repository

type Repository struct {
	database.Queryable
	database.Executable
}

func NewRepository

func NewRepository(db *sql.DB) *Repository

func NewRepositoryTx

func NewRepositoryTx(tx *sql.Tx) *Repository

func (*Repository) CreateACO

func (r *Repository) CreateACO(ctx context.Context, aco models.ACO) error

func (*Repository) CreateBenePrefsFile

func (r *Repository) CreateBenePrefsFile(ctx context.Context, file models.BenePrefsFile) (uint, error)

func (*Repository) CreateBenePrefsRecord

func (r *Repository) CreateBenePrefsRecord(ctx context.Context, record models.BenePrefsRecord) error

func (*Repository) CreateCCLFFile

func (r *Repository) CreateCCLFFile(ctx context.Context, cclfFile models.CCLFFile) (uint, error)

func (*Repository) CreateJob

func (r *Repository) CreateJob(ctx context.Context, j models.Job) (uint, error)

func (*Repository) GetACOByCMSID

func (r *Repository) GetACOByCMSID(ctx context.Context, cmsID string) (*models.ACO, error)

func (*Repository) GetACOByClientID

func (r *Repository) GetACOByClientID(ctx context.Context, clientID string) (*models.ACO, error)

func (*Repository) GetACOByUUID

func (r *Repository) GetACOByUUID(ctx context.Context, uuid uuid.UUID) (*models.ACO, error)

func (*Repository) GetCCLFBeneficiaries

func (r *Repository) GetCCLFBeneficiaries(ctx context.Context, cclfFileID uint, ignoredMBIs []string) ([]*models.CCLFBeneficiary, error)

func (*Repository) GetCCLFBeneficiaryMBIs

func (r *Repository) GetCCLFBeneficiaryMBIs(ctx context.Context, cclfFileID uint) ([]string, error)

func (*Repository) GetCCLFFileByID

func (r *Repository) GetCCLFFileByID(ctx context.Context, ID uint) (*models.CCLFFile, error)

func (*Repository) GetCCLFFileExistsByName

func (r *Repository) GetCCLFFileExistsByName(ctx context.Context, name string) (bool, error)

func (*Repository) GetCMSIDByClientID

func (r *Repository) GetCMSIDByClientID(ctx context.Context, clientID string) (string, error)

func (*Repository) GetJobByID

func (r *Repository) GetJobByID(ctx context.Context, jobID uint) (*models.Job, error)

func (*Repository) GetJobKey

func (r *Repository) GetJobKey(ctx context.Context, jobID uint, fileName string) (*models.JobKey, error)

func (*Repository) GetJobKeys

func (r *Repository) GetJobKeys(ctx context.Context, jobID uint) ([]*models.JobKey, error)

func (*Repository) GetJobs

func (r *Repository) GetJobs(ctx context.Context, acoID uuid.UUID, statuses ...models.JobStatus) ([]*models.Job, error)

func (*Repository) GetJobsByUpdateTimeAndStatus

func (r *Repository) GetJobsByUpdateTimeAndStatus(ctx context.Context, lowerBound, upperBound time.Time, statuses ...models.JobStatus) ([]*models.Job, error)

func (*Repository) GetLatestCCLFFile

func (r *Repository) GetLatestCCLFFile(ctx context.Context, cmsID string, cclfNum int, importStatus string, earlierTime time.Time, laterTime time.Time, fileType models.CCLFFileType) (*models.CCLFFile, error)

earliertime: closest to now and latertime: older in time.

func (*Repository) GetSuppressedMBIs

func (r *Repository) GetSuppressedMBIs(ctx context.Context, lookbackDays int, upperBound time.Time) ([]string, error)

func (*Repository) UpdateACO

func (r *Repository) UpdateACO(ctx context.Context, acoUUID uuid.UUID, fieldsAndValues map[string]interface{}) error

func (*Repository) UpdateBenePrefsImportStatus

func (r *Repository) UpdateBenePrefsImportStatus(ctx context.Context, fileID uint, status string) error

func (*Repository) UpdateCCLFFileImportStatus

func (r *Repository) UpdateCCLFFileImportStatus(ctx context.Context, fileID uint, importStatus string) error

func (*Repository) UpdateJob

func (r *Repository) UpdateJob(ctx context.Context, j models.Job) error

Directories

Path Synopsis
Package postgrestest provides CRUD utilities for the postgres database.
Package postgrestest provides CRUD utilities for the postgres database.

Jump to

Keyboard shortcuts

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