repository

package
v0.0.0-...-90e0d95 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSessionPostgresqlRepository

func NewSessionPostgresqlRepository(db *sql.DB) category.Repository

Types

type PostgresqlRepository

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

func (*PostgresqlRepository) GetBordersOfBranch

func (r *PostgresqlRepository) GetBordersOfBranch(categoryId uint64) (uint64, uint64, error)

Get left and right border of branch

func (*PostgresqlRepository) GetCategoriesByLevel

func (r *PostgresqlRepository) GetCategoriesByLevel(level uint64) ([]*models.CategoriesCatalog, error)

Get categories in select level

func (*PostgresqlRepository) GetNextLevelCategories

func (r *PostgresqlRepository) GetNextLevelCategories(categoryId uint64) ([]*models.CategoriesCatalog, error)

Get lower level in categories tree

func (*PostgresqlRepository) GetPathToCategory

func (r *PostgresqlRepository) GetPathToCategory(categoryId uint64) ([]*models.CategoriesCatalog, error)

Get path from root to category

Jump to

Keyboard shortcuts

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