repositories

package
v0.0.0-...-8f7c90a Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const CAKES_REPOSITORY_CREATE_SQL = `
INSERT INTO cakes (
	title, description, rating, image
)
VALUES (
	:title, :description, :rating, :image
);
`
View Source
const CAKES_REPOSITORY_DELETE_SQL = `
UPDATE cakes 
SET deleted_at = NOW()
WHERE id = ?
`
View Source
const CAKES_REPOSITORY_GET_SQL = `` /* 189-byte string literal not displayed */
View Source
const CAKES_REPOSITORY_LIST_SQL = `` /* 204-byte string literal not displayed */
View Source
const CAKES_REPOSITORY_UPDATE_SQL = `` /* 165-byte string literal not displayed */

Variables

This section is empty.

Functions

func NewCakesRepository

func NewCakesRepository(
	db *sqlx.DB,
	logger grpclog.LoggerV2,
) repositories.CakesRepository

Types

type CakesRepositoryImpl

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

func (*CakesRepositoryImpl) Create

func (s *CakesRepositoryImpl) Create(ctx context.Context, cake *models.Cakes) (*int64, error)

func (*CakesRepositoryImpl) Delete

func (s *CakesRepositoryImpl) Delete(ctx context.Context, id int) error

func (*CakesRepositoryImpl) Get

func (r *CakesRepositoryImpl) Get(ctx context.Context, id int) (*models.Cakes, error)

func (*CakesRepositoryImpl) List

func (*CakesRepositoryImpl) Update

func (s *CakesRepositoryImpl) Update(ctx context.Context, cake *models.Cakes) error

Jump to

Keyboard shortcuts

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