pg

package
v0.0.0-...-f15602e Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package pg contains implementations for order repositories

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OrderProductRepository

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

OrderProductRepository pg repository implementation.

func NewOrderProductRepository

func NewOrderProductRepository(client *ent.Client, logger *zap.Logger) *OrderProductRepository

NewOrderProductRepository create instance of OrderProductRepository.

func (*OrderProductRepository) BulkCreateTx

func (r *OrderProductRepository) BulkCreateTx(ctx context.Context, products order.Products) (order.Products, error)

BulkCreateTx order products in db with transaction.

type OrderRepository

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

OrderRepository pg repository implementation.

func NewOrderRepository

func NewOrderRepository(client *ent.Client, logger *zap.Logger) *OrderRepository

NewOrderRepository create instance of OrderRepository.

func (OrderRepository) Create

func (r OrderRepository) Create(ctx context.Context, or *order.Order) (*order.Order, error)

Create order in db.

func (OrderRepository) Get

func (r OrderRepository) Get(ctx context.Context, filter *order.Filter) (*order.Order, error)

Get order from db.

func (OrderRepository) Query

Query orders from db.

Jump to

Keyboard shortcuts

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