Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Category) predicate.Category
- func CreatedAt(v time.Time) predicate.Category
- func CreatedAtEQ(v time.Time) predicate.Category
- func CreatedAtGT(v time.Time) predicate.Category
- func CreatedAtGTE(v time.Time) predicate.Category
- func CreatedAtIn(vs ...time.Time) predicate.Category
- func CreatedAtLT(v time.Time) predicate.Category
- func CreatedAtLTE(v time.Time) predicate.Category
- func CreatedAtNEQ(v time.Time) predicate.Category
- func CreatedAtNotIn(vs ...time.Time) predicate.Category
- func HasProducts() predicate.Category
- func HasProductsWith(preds ...predicate.Product) predicate.Category
- func ID(id int64) predicate.Category
- func IDEQ(id int64) predicate.Category
- func IDGT(id int64) predicate.Category
- func IDGTE(id int64) predicate.Category
- func IDIn(ids ...int64) predicate.Category
- func IDLT(id int64) predicate.Category
- func IDLTE(id int64) predicate.Category
- func IDNEQ(id int64) predicate.Category
- func IDNotIn(ids ...int64) predicate.Category
- func Name(v string) predicate.Category
- func NameContains(v string) predicate.Category
- func NameContainsFold(v string) predicate.Category
- func NameEQ(v string) predicate.Category
- func NameEqualFold(v string) predicate.Category
- func NameGT(v string) predicate.Category
- func NameGTE(v string) predicate.Category
- func NameHasPrefix(v string) predicate.Category
- func NameHasSuffix(v string) predicate.Category
- func NameIn(vs ...string) predicate.Category
- func NameLT(v string) predicate.Category
- func NameLTE(v string) predicate.Category
- func NameNEQ(v string) predicate.Category
- func NameNotIn(vs ...string) predicate.Category
- func Not(p predicate.Category) predicate.Category
- func Or(predicates ...predicate.Category) predicate.Category
- func UpdatedAt(v time.Time) predicate.Category
- func UpdatedAtEQ(v time.Time) predicate.Category
- func UpdatedAtGT(v time.Time) predicate.Category
- func UpdatedAtGTE(v time.Time) predicate.Category
- func UpdatedAtIn(vs ...time.Time) predicate.Category
- func UpdatedAtLT(v time.Time) predicate.Category
- func UpdatedAtLTE(v time.Time) predicate.Category
- func UpdatedAtNEQ(v time.Time) predicate.Category
- func UpdatedAtNotIn(vs ...time.Time) predicate.Category
- func ValidColumn(column string) bool
- type OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByName(opts ...sql.OrderTermOption) OrderOption
- func ByProducts(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByProductsCount(opts ...sql.OrderTermOption) OrderOption
- func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
Constants ¶
const ( // Label holds the string label denoting the category type in the database. Label = "category" // 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" // FieldName holds the string denoting the name field in the database. FieldName = "name" // EdgeProducts holds the string denoting the products edge name in mutations. EdgeProducts = "products" // Table holds the table name of the category in the database. Table = "categories" // ProductsTable is the table that holds the products relation/edge. ProductsTable = "products" // ProductsInverseTable is the table name for the Product entity. // It exists in this package in order to avoid circular dependency with the "product" package. ProductsInverseTable = "products" // ProductsColumn is the table column denoting the products relation/edge. ProductsColumn = "category_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 )
var Columns = []string{ FieldID, FieldCreatedAt, FieldUpdatedAt, FieldName, }
Columns holds all SQL columns for category fields.
Functions ¶
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 HasProducts ¶
HasProducts applies the HasEdge predicate on the "products" edge.
func HasProductsWith ¶
HasProductsWith applies the HasEdge predicate on the "products" 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 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 Category queries.
func ByCreatedAt ¶
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
ByCreatedAt orders the results by the created_at 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 ByProducts ¶
func ByProducts(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByProducts orders the results by products terms.
func ByProductsCount ¶
func ByProductsCount(opts ...sql.OrderTermOption) OrderOption
ByProductsCount orders the results by products count.
func ByUpdatedAt ¶
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
ByUpdatedAt orders the results by the updated_at field.