postgres

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProductsRepository

type ProductsRepository struct{}

func NewProducts

func NewProducts() *ProductsRepository

func (*ProductsRepository) CreateProduct

func (r *ProductsRepository) CreateProduct(tx *sqlx.Tx, product products.Product) (uint64, error)

func (*ProductsRepository) DeleteProduct

func (r *ProductsRepository) DeleteProduct(tx *sqlx.Tx, id uint64) error

func (*ProductsRepository) FindProduct

func (r *ProductsRepository) FindProduct(tx *sqlx.Tx, id uint64) (products.Product, error)

func (*ProductsRepository) FindProductList

func (r *ProductsRepository) FindProductList(tx *sqlx.Tx, username string, productName string, sortBy products.SortType) ([]products.Product, error)

func (*ProductsRepository) UpdateProduct

func (r *ProductsRepository) UpdateProduct(tx *sqlx.Tx, newProduct products.Product) (products.Product, error)

Jump to

Keyboard shortcuts

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