postgres

package
v1.9.0-beta.4 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TransactionPostgreSQLRepository

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

TransactionPostgreSQLRepository is a Postgresql-specific implementation of the TransactionRepository.

func NewTransactionPostgreSQLRepository

func NewTransactionPostgreSQLRepository(pc *mpostgres.PostgresConnection) *TransactionPostgreSQLRepository

NewTransactionPostgreSQLRepository returns a new instance of TransactionPostgreSQLRepository using the given Postgres connection.

func (*TransactionPostgreSQLRepository) Create

Create a new Transaction entity into Postgresql and returns it.

func (*TransactionPostgreSQLRepository) Delete

func (r *TransactionPostgreSQLRepository) Delete(ctx context.Context, organizationID, ledgerID, id uuid.UUID) error

Delete removes a Transaction entity from the database using the provided IDs.

func (*TransactionPostgreSQLRepository) Find

func (r *TransactionPostgreSQLRepository) Find(ctx context.Context, organizationID, ledgerID, id uuid.UUID) (*t.Transaction, error)

Find retrieves a Transaction entity from the database using the provided ID.

func (*TransactionPostgreSQLRepository) FindAll

func (r *TransactionPostgreSQLRepository) FindAll(ctx context.Context, organizationID, ledgerID uuid.UUID, limit, page int) ([]*t.Transaction, error)

FindAll retrieves Transactions entities from the database.

func (*TransactionPostgreSQLRepository) ListByIDs

func (r *TransactionPostgreSQLRepository) ListByIDs(ctx context.Context, organizationID, ledgerID uuid.UUID, ids []uuid.UUID) ([]*t.Transaction, error)

ListByIDs retrieves Transaction entities from the database using the provided IDs.

func (*TransactionPostgreSQLRepository) Update

func (r *TransactionPostgreSQLRepository) Update(ctx context.Context, organizationID, ledgerID, id uuid.UUID, transaction *t.Transaction) (*t.Transaction, error)

Update a Transaction entity into Postgresql and returns the Transaction updated.

Jump to

Keyboard shortcuts

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