feat: channel sub
This commit is contained in:
@@ -90,9 +90,7 @@ class ProductRepository:
|
||||
*,
|
||||
include_hidden: bool = False,
|
||||
) -> int:
|
||||
stmt = select(func.count()).select_from(Product).where(
|
||||
Product.category_id == category_id
|
||||
)
|
||||
stmt = select(func.count()).select_from(Product).where(Product.category_id == category_id)
|
||||
|
||||
if not include_hidden:
|
||||
stmt = stmt.where(Product.is_hidden.is_(False))
|
||||
@@ -108,8 +106,10 @@ class ProductRepository:
|
||||
) -> int:
|
||||
ts_query = func.plainto_tsquery("simple", query)
|
||||
|
||||
stmt = select(func.count()).select_from(Product).where(
|
||||
Product.search_vector.op("@@")(ts_query)
|
||||
stmt = (
|
||||
select(func.count())
|
||||
.select_from(Product)
|
||||
.where(Product.search_vector.op("@@")(ts_query))
|
||||
)
|
||||
|
||||
if not include_hidden:
|
||||
|
||||
Reference in New Issue
Block a user