Documentation
¶
Index ¶
- Constants
- Variables
- func Amount(v int64) predicate.Product
- func AmountEQ(v int64) predicate.Product
- func AmountGT(v int64) predicate.Product
- func AmountGTE(v int64) predicate.Product
- func AmountIn(vs ...int64) predicate.Product
- func AmountLT(v int64) predicate.Product
- func AmountLTE(v int64) predicate.Product
- func AmountNEQ(v int64) predicate.Product
- func AmountNotIn(vs ...int64) predicate.Product
- func And(predicates ...predicate.Product) predicate.Product
- func CategoryID(v int64) predicate.Product
- func CategoryIDEQ(v int64) predicate.Product
- func CategoryIDIn(vs ...int64) predicate.Product
- func CategoryIDNEQ(v int64) predicate.Product
- func CategoryIDNotIn(vs ...int64) predicate.Product
- func CreatedAt(v time.Time) predicate.Product
- func CreatedAtEQ(v time.Time) predicate.Product
- func CreatedAtGT(v time.Time) predicate.Product
- func CreatedAtGTE(v time.Time) predicate.Product
- func CreatedAtIn(vs ...time.Time) predicate.Product
- func CreatedAtLT(v time.Time) predicate.Product
- func CreatedAtLTE(v time.Time) predicate.Product
- func CreatedAtNEQ(v time.Time) predicate.Product
- func CreatedAtNotIn(vs ...time.Time) predicate.Product
- func Description(v string) predicate.Product
- func DescriptionContains(v string) predicate.Product
- func DescriptionContainsFold(v string) predicate.Product
- func DescriptionEQ(v string) predicate.Product
- func DescriptionEqualFold(v string) predicate.Product
- func DescriptionGT(v string) predicate.Product
- func DescriptionGTE(v string) predicate.Product
- func DescriptionHasPrefix(v string) predicate.Product
- func DescriptionHasSuffix(v string) predicate.Product
- func DescriptionIn(vs ...string) predicate.Product
- func DescriptionIsNil() predicate.Product
- func DescriptionLT(v string) predicate.Product
- func DescriptionLTE(v string) predicate.Product
- func DescriptionNEQ(v string) predicate.Product
- func DescriptionNotIn(vs ...string) predicate.Product
- func DescriptionNotNil() predicate.Product
- func HasCarts() predicate.Product
- func HasCartsWith(preds ...predicate.Cart) predicate.Product
- func HasCategories() predicate.Product
- func HasCategoriesWith(preds ...predicate.Category) predicate.Product
- func HasOrderProducts() predicate.Product
- func HasOrderProductsWith(preds ...predicate.OrderProduct) predicate.Product
- func HasProductImages() predicate.Product
- func HasProductImagesWith(preds ...predicate.ProductImage) predicate.Product
- func ID(id int64) predicate.Product
- func IDEQ(id int64) predicate.Product
- func IDGT(id int64) predicate.Product
- func IDGTE(id int64) predicate.Product
- func IDIn(ids ...int64) predicate.Product
- func IDLT(id int64) predicate.Product
- func IDLTE(id int64) predicate.Product
- func IDNEQ(id int64) predicate.Product
- func IDNotIn(ids ...int64) predicate.Product
- func Name(v string) predicate.Product
- func NameContains(v string) predicate.Product
- func NameContainsFold(v string) predicate.Product
- func NameEQ(v string) predicate.Product
- func NameEqualFold(v string) predicate.Product
- func NameGT(v string) predicate.Product
- func NameGTE(v string) predicate.Product
- func NameHasPrefix(v string) predicate.Product
- func NameHasSuffix(v string) predicate.Product
- func NameIn(vs ...string) predicate.Product
- func NameLT(v string) predicate.Product
- func NameLTE(v string) predicate.Product
- func NameNEQ(v string) predicate.Product
- func NameNotIn(vs ...string) predicate.Product
- func Not(p predicate.Product) predicate.Product
- func Or(predicates ...predicate.Product) predicate.Product
- func Price(v int64) predicate.Product
- func PriceEQ(v int64) predicate.Product
- func PriceGT(v int64) predicate.Product
- func PriceGTE(v int64) predicate.Product
- func PriceIn(vs ...int64) predicate.Product
- func PriceLT(v int64) predicate.Product
- func PriceLTE(v int64) predicate.Product
- func PriceNEQ(v int64) predicate.Product
- func PriceNotIn(vs ...int64) predicate.Product
- func UpdatedAt(v time.Time) predicate.Product
- func UpdatedAtEQ(v time.Time) predicate.Product
- func UpdatedAtGT(v time.Time) predicate.Product
- func UpdatedAtGTE(v time.Time) predicate.Product
- func UpdatedAtIn(vs ...time.Time) predicate.Product
- func UpdatedAtLT(v time.Time) predicate.Product
- func UpdatedAtLTE(v time.Time) predicate.Product
- func UpdatedAtNEQ(v time.Time) predicate.Product
- func UpdatedAtNotIn(vs ...time.Time) predicate.Product
- func ValidColumn(column string) bool
- type OrderOption
- func ByAmount(opts ...sql.OrderTermOption) OrderOption
- func ByCarts(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByCartsCount(opts ...sql.OrderTermOption) OrderOption
- func ByCategoriesField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByCategoryID(opts ...sql.OrderTermOption) OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByDescription(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByName(opts ...sql.OrderTermOption) OrderOption
- func ByOrderProducts(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByOrderProductsCount(opts ...sql.OrderTermOption) OrderOption
- func ByPrice(opts ...sql.OrderTermOption) OrderOption
- func ByProductImages(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByProductImagesCount(opts ...sql.OrderTermOption) OrderOption
- func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
Constants ¶
const ( // Label holds the string label denoting the product type in the database. Label = "product" // FieldID holds the string denoting the id field in the database. FieldID = "id" // FieldCreatedAt holds the string denoting the created_at field in the database. FieldCreatedAt = "created_at" // FieldUpdatedAt holds the string denoting the updated_at field in the database. FieldUpdatedAt = "updated_at" // FieldCategoryID holds the string denoting the category_id field in the database. FieldCategoryID = "category_id" // FieldName holds the string denoting the name field in the database. FieldName = "name" // FieldDescription holds the string denoting the description field in the database. FieldDescription = "description" // FieldAmount holds the string denoting the amount field in the database. FieldAmount = "amount" // FieldPrice holds the string denoting the price field in the database. FieldPrice = "price" // EdgeCategories holds the string denoting the categories edge name in mutations. EdgeCategories = "categories" // EdgeCarts holds the string denoting the carts edge name in mutations. EdgeCarts = "carts" // EdgeProductImages holds the string denoting the product_images edge name in mutations. EdgeProductImages = "product_images" // EdgeOrderProducts holds the string denoting the order_products edge name in mutations. EdgeOrderProducts = "order_products" // Table holds the table name of the product in the database. Table = "products" // CategoriesTable is the table that holds the categories relation/edge. CategoriesTable = "products" // CategoriesInverseTable is the table name for the Category entity. // It exists in this package in order to avoid circular dependency with the "category" package. CategoriesInverseTable = "categories" // CategoriesColumn is the table column denoting the categories relation/edge. CategoriesColumn = "category_id" // CartsTable is the table that holds the carts relation/edge. CartsTable = "carts" // CartsInverseTable is the table name for the Cart entity. // It exists in this package in order to avoid circular dependency with the "cart" package. CartsInverseTable = "carts" // CartsColumn is the table column denoting the carts relation/edge. CartsColumn = "product_id" // ProductImagesTable is the table that holds the product_images relation/edge. ProductImagesTable = "product_images" // ProductImagesInverseTable is the table name for the ProductImage entity. // It exists in this package in order to avoid circular dependency with the "productimage" package. ProductImagesInverseTable = "product_images" // ProductImagesColumn is the table column denoting the product_images relation/edge. ProductImagesColumn = "product_id" // OrderProductsTable is the table that holds the order_products relation/edge. OrderProductsTable = "order_products" // OrderProductsInverseTable is the table name for the OrderProduct entity. // It exists in this package in order to avoid circular dependency with the "orderproduct" package. OrderProductsInverseTable = "order_products" // OrderProductsColumn is the table column denoting the order_products relation/edge. OrderProductsColumn = "product_id" )
Variables ¶
var ( // DefaultCreatedAt holds the default value on creation for the "created_at" field. DefaultCreatedAt func() time.Time // DefaultUpdatedAt holds the default value on creation for the "updated_at" field. DefaultUpdatedAt func() time.Time // UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field. UpdateDefaultUpdatedAt func() time.Time // NameValidator is a validator for the "name" field. It is called by the builders before save. NameValidator func(string) error // DefaultAmount holds the default value on creation for the "amount" field. DefaultAmount int64 // AmountValidator is a validator for the "amount" field. It is called by the builders before save. AmountValidator func(int64) error // PriceValidator is a validator for the "price" field. It is called by the builders before save. PriceValidator func(int64) error )
var Columns = []string{ FieldID, FieldCreatedAt, FieldUpdatedAt, FieldCategoryID, FieldName, FieldDescription, FieldAmount, FieldPrice, }
Columns holds all SQL columns for product fields.
Functions ¶
func Amount ¶
Amount applies equality check predicate on the "amount" field. It's identical to AmountEQ.
func AmountNotIn ¶
AmountNotIn applies the NotIn predicate on the "amount" field.
func CategoryID ¶
CategoryID applies equality check predicate on the "category_id" field. It's identical to CategoryIDEQ.
func CategoryIDEQ ¶
CategoryIDEQ applies the EQ predicate on the "category_id" field.
func CategoryIDIn ¶
CategoryIDIn applies the In predicate on the "category_id" field.
func CategoryIDNEQ ¶
CategoryIDNEQ applies the NEQ predicate on the "category_id" field.
func CategoryIDNotIn ¶
CategoryIDNotIn applies the NotIn predicate on the "category_id" field.
func CreatedAt ¶
CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
func CreatedAtEQ ¶
CreatedAtEQ applies the EQ predicate on the "created_at" field.
func CreatedAtGT ¶
CreatedAtGT applies the GT predicate on the "created_at" field.
func CreatedAtGTE ¶
CreatedAtGTE applies the GTE predicate on the "created_at" field.
func CreatedAtIn ¶
CreatedAtIn applies the In predicate on the "created_at" field.
func CreatedAtLT ¶
CreatedAtLT applies the LT predicate on the "created_at" field.
func CreatedAtLTE ¶
CreatedAtLTE applies the LTE predicate on the "created_at" field.
func CreatedAtNEQ ¶
CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
func CreatedAtNotIn ¶
CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
func Description ¶
Description applies equality check predicate on the "description" field. It's identical to DescriptionEQ.
func DescriptionContains ¶
DescriptionContains applies the Contains predicate on the "description" field.
func DescriptionContainsFold ¶
DescriptionContainsFold applies the ContainsFold predicate on the "description" field.
func DescriptionEQ ¶
DescriptionEQ applies the EQ predicate on the "description" field.
func DescriptionEqualFold ¶
DescriptionEqualFold applies the EqualFold predicate on the "description" field.
func DescriptionGT ¶
DescriptionGT applies the GT predicate on the "description" field.
func DescriptionGTE ¶
DescriptionGTE applies the GTE predicate on the "description" field.
func DescriptionHasPrefix ¶
DescriptionHasPrefix applies the HasPrefix predicate on the "description" field.
func DescriptionHasSuffix ¶
DescriptionHasSuffix applies the HasSuffix predicate on the "description" field.
func DescriptionIn ¶
DescriptionIn applies the In predicate on the "description" field.
func DescriptionIsNil ¶
DescriptionIsNil applies the IsNil predicate on the "description" field.
func DescriptionLT ¶
DescriptionLT applies the LT predicate on the "description" field.
func DescriptionLTE ¶
DescriptionLTE applies the LTE predicate on the "description" field.
func DescriptionNEQ ¶
DescriptionNEQ applies the NEQ predicate on the "description" field.
func DescriptionNotIn ¶
DescriptionNotIn applies the NotIn predicate on the "description" field.
func DescriptionNotNil ¶
DescriptionNotNil applies the NotNil predicate on the "description" field.
func HasCartsWith ¶
HasCartsWith applies the HasEdge predicate on the "carts" edge with a given conditions (other predicates).
func HasCategories ¶
HasCategories applies the HasEdge predicate on the "categories" edge.
func HasCategoriesWith ¶
HasCategoriesWith applies the HasEdge predicate on the "categories" edge with a given conditions (other predicates).
func HasOrderProducts ¶
HasOrderProducts applies the HasEdge predicate on the "order_products" edge.
func HasOrderProductsWith ¶
func HasOrderProductsWith(preds ...predicate.OrderProduct) predicate.Product
HasOrderProductsWith applies the HasEdge predicate on the "order_products" edge with a given conditions (other predicates).
func HasProductImages ¶
HasProductImages applies the HasEdge predicate on the "product_images" edge.
func HasProductImagesWith ¶
func HasProductImagesWith(preds ...predicate.ProductImage) predicate.Product
HasProductImagesWith applies the HasEdge predicate on the "product_images" edge with a given conditions (other predicates).
func NameContains ¶
NameContains applies the Contains predicate on the "name" field.
func NameContainsFold ¶
NameContainsFold applies the ContainsFold predicate on the "name" field.
func NameEqualFold ¶
NameEqualFold applies the EqualFold predicate on the "name" field.
func NameHasPrefix ¶
NameHasPrefix applies the HasPrefix predicate on the "name" field.
func NameHasSuffix ¶
NameHasSuffix applies the HasSuffix predicate on the "name" field.
func Price ¶
Price applies equality check predicate on the "price" field. It's identical to PriceEQ.
func PriceNotIn ¶
PriceNotIn applies the NotIn predicate on the "price" field.
func UpdatedAt ¶
UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.
func UpdatedAtEQ ¶
UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
func UpdatedAtGT ¶
UpdatedAtGT applies the GT predicate on the "updated_at" field.
func UpdatedAtGTE ¶
UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
func UpdatedAtIn ¶
UpdatedAtIn applies the In predicate on the "updated_at" field.
func UpdatedAtLT ¶
UpdatedAtLT applies the LT predicate on the "updated_at" field.
func UpdatedAtLTE ¶
UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
func UpdatedAtNEQ ¶
UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
func UpdatedAtNotIn ¶
UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
func ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).
Types ¶
type OrderOption ¶
OrderOption defines the ordering options for the Product queries.
func ByAmount ¶
func ByAmount(opts ...sql.OrderTermOption) OrderOption
ByAmount orders the results by the amount field.
func ByCarts ¶
func ByCarts(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByCarts orders the results by carts terms.
func ByCartsCount ¶
func ByCartsCount(opts ...sql.OrderTermOption) OrderOption
ByCartsCount orders the results by carts count.
func ByCategoriesField ¶
func ByCategoriesField(field string, opts ...sql.OrderTermOption) OrderOption
ByCategoriesField orders the results by categories field.
func ByCategoryID ¶
func ByCategoryID(opts ...sql.OrderTermOption) OrderOption
ByCategoryID orders the results by the category_id field.
func ByCreatedAt ¶
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
ByCreatedAt orders the results by the created_at field.
func ByDescription ¶
func ByDescription(opts ...sql.OrderTermOption) OrderOption
ByDescription orders the results by the description field.
func ByID ¶
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func ByName ¶
func ByName(opts ...sql.OrderTermOption) OrderOption
ByName orders the results by the name field.
func ByOrderProducts ¶
func ByOrderProducts(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByOrderProducts orders the results by order_products terms.
func ByOrderProductsCount ¶
func ByOrderProductsCount(opts ...sql.OrderTermOption) OrderOption
ByOrderProductsCount orders the results by order_products count.
func ByPrice ¶
func ByPrice(opts ...sql.OrderTermOption) OrderOption
ByPrice orders the results by the price field.
func ByProductImages ¶
func ByProductImages(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByProductImages orders the results by product_images terms.
func ByProductImagesCount ¶
func ByProductImagesCount(opts ...sql.OrderTermOption) OrderOption
ByProductImagesCount orders the results by product_images count.
func ByUpdatedAt ¶
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
ByUpdatedAt orders the results by the updated_at field.