Documentation ¶
Index ¶
- type Category
- type CreateChildCategoryIfNotExistsRow
- type DBTX
- type GetCategoryRow
- type GetCategoryWithAncestorsRow
- type Querier
- type Queries
- func (q *Queries) CreateChildCategoryIfNotExists(ctx context.Context, category string, handle string, parentID *int32) (*CreateChildCategoryIfNotExistsRow, error)
- func (q *Queries) CreateTopCategory(ctx context.Context, category string, handle string) (*Category, error)
- func (q *Queries) GetCategory(ctx context.Context, id int32) (*GetCategoryRow, error)
- func (q *Queries) GetCategoryByName(ctx context.Context, category string) (*Category, error)
- func (q *Queries) GetCategoryWithAncestors(ctx context.Context, id int32) ([]*GetCategoryWithAncestorsRow, error)
- func (q *Queries) GetCategoryWithSiblings(ctx context.Context, id int32) ([]*Category, error)
- func (q *Queries) GetChildCategories(ctx context.Context, parentID *int32) ([]*Category, error)
- func (q *Queries) GetLeafCategoryIDs(ctx context.Context, id int32) ([][]int32, error)
- func (q *Queries) GetRootCategories(ctx context.Context) ([]*Category, error)
- func (q *Queries) WithTx(tx pgx.Tx) *Queries
- type Repository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetCategoryRow ¶
type Querier ¶
type Querier interface { CreateChildCategoryIfNotExists(ctx context.Context, category string, handle string, parentID *int32) (*CreateChildCategoryIfNotExistsRow, error) CreateTopCategory(ctx context.Context, category string, handle string) (*Category, error) GetCategory(ctx context.Context, id int32) (*GetCategoryRow, error) GetCategoryByName(ctx context.Context, category string) (*Category, error) GetCategoryWithAncestors(ctx context.Context, id int32) ([]*GetCategoryWithAncestorsRow, error) GetCategoryWithSiblings(ctx context.Context, id int32) ([]*Category, error) GetChildCategories(ctx context.Context, parentID *int32) ([]*Category, error) GetLeafCategoryIDs(ctx context.Context, id int32) ([][]int32, error) GetRootCategories(ctx context.Context) ([]*Category, error) }
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) CreateChildCategoryIfNotExists ¶
func (*Queries) CreateTopCategory ¶
func (*Queries) GetCategory ¶
func (*Queries) GetCategoryByName ¶
func (*Queries) GetCategoryWithAncestors ¶
func (*Queries) GetCategoryWithSiblings ¶
func (*Queries) GetChildCategories ¶
func (*Queries) GetLeafCategoryIDs ¶
func (*Queries) GetRootCategories ¶
type Repository ¶
type Repository interface { Querier }
func NewRepository ¶
func NewRepository(db *pgxpool.Pool) Repository
Click to show internal directories.
Click to hide internal directories.