postgres

package
v1.27.0-beta.8 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: Apache-2.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 AssetRatePostgreSQLRepository added in v1.24.0

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

AssetRatePostgreSQLRepository is a Postgresql-specific implementation of the AssetRateRepository.

func NewAssetRatePostgreSQLRepository added in v1.24.0

func NewAssetRatePostgreSQLRepository(pc *mpostgres.PostgresConnection) *AssetRatePostgreSQLRepository

NewAssetRatePostgreSQLRepository returns a new instance of AssetRatePostgreSQLRepository using the given Postgres connection.

func (*AssetRatePostgreSQLRepository) Create added in v1.24.0

func (r *AssetRatePostgreSQLRepository) Create(ctx context.Context, assetRate *ar.AssetRate) (*ar.AssetRate, error)

Create a new AssetRate entity into Postgresql and returns it.

func (*AssetRatePostgreSQLRepository) Find added in v1.25.0

func (r *AssetRatePostgreSQLRepository) Find(ctx context.Context, organizationID, ledgerID, assetRateID uuid.UUID) (*ar.AssetRate, error)

Find an AssetRate entity by its ID in Postgresql and returns it.

type OperationPostgreSQLRepository added in v1.13.0

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

OperationPostgreSQLRepository is a Postgresql-specific implementation of the OperationRepository.

func NewOperationPostgreSQLRepository added in v1.13.0

func NewOperationPostgreSQLRepository(pc *mpostgres.PostgresConnection) *OperationPostgreSQLRepository

NewOperationPostgreSQLRepository returns a new instance of OperationPostgreSQLRepository using the given Postgres connection.

func (*OperationPostgreSQLRepository) Create added in v1.13.0

func (r *OperationPostgreSQLRepository) Create(ctx context.Context, operation *o.Operation) (*o.Operation, error)

Create a new Operation entity into Postgresql and returns it.

func (*OperationPostgreSQLRepository) Delete added in v1.13.0

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

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

func (*OperationPostgreSQLRepository) Find added in v1.13.0

func (r *OperationPostgreSQLRepository) Find(ctx context.Context, organizationID, ledgerID, transactionID, id uuid.UUID) (*o.Operation, error)

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

func (*OperationPostgreSQLRepository) FindAll added in v1.13.0

func (r *OperationPostgreSQLRepository) FindAll(ctx context.Context, organizationID, ledgerID, transactionID uuid.UUID, limit, page int) ([]*o.Operation, error)

FindAll retrieves Operations entities from the database.

func (*OperationPostgreSQLRepository) FindAllByAccount added in v1.15.0

func (r *OperationPostgreSQLRepository) FindAllByAccount(ctx context.Context, organizationID, ledgerID, accountID uuid.UUID, limit, page int) ([]*o.Operation, error)

FindAllByAccount retrieves Operations entities from the database using the provided account ID.

func (*OperationPostgreSQLRepository) FindAllByPortfolio added in v1.15.0

func (r *OperationPostgreSQLRepository) FindAllByPortfolio(ctx context.Context, organizationID, ledgerID, portfolioID uuid.UUID, limit, page int) ([]*o.Operation, error)

FindAllByPortfolio retrieves Operations entities from the database using the provided portfolio ID.

func (*OperationPostgreSQLRepository) FindByAccount added in v1.15.0

func (r *OperationPostgreSQLRepository) FindByAccount(ctx context.Context, organizationID, ledgerID, accountID, id uuid.UUID) (*o.Operation, error)

FindByAccount retrieves a Operation entity from the database using the provided account ID.

func (*OperationPostgreSQLRepository) FindByPortfolio added in v1.16.0

func (r *OperationPostgreSQLRepository) FindByPortfolio(ctx context.Context, organizationID, ledgerID, portfolioID, id uuid.UUID) (*o.Operation, error)

FindByPortfolio retrieves a Operation entity from the database using the provided portfolio ID.

func (*OperationPostgreSQLRepository) ListByIDs added in v1.13.0

func (r *OperationPostgreSQLRepository) ListByIDs(ctx context.Context, organizationID, ledgerID uuid.UUID, ids []uuid.UUID) ([]*o.Operation, error)

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

func (*OperationPostgreSQLRepository) Update added in v1.13.0

func (r *OperationPostgreSQLRepository) Update(ctx context.Context, organizationID, ledgerID, transactionID, id uuid.UUID, operation *o.Operation) (*o.Operation, error)

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

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