Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Order) predicate.Order
- func CreatedAt(v time.Time) predicate.Order
- func CreatedAtEQ(v time.Time) predicate.Order
- func CreatedAtGT(v time.Time) predicate.Order
- func CreatedAtGTE(v time.Time) predicate.Order
- func CreatedAtIn(vs ...time.Time) predicate.Order
- func CreatedAtLT(v time.Time) predicate.Order
- func CreatedAtLTE(v time.Time) predicate.Order
- func CreatedAtNEQ(v time.Time) predicate.Order
- func CreatedAtNotIn(vs ...time.Time) predicate.Order
- func HasOrderProducts() predicate.Order
- func HasOrderProductsWith(preds ...predicate.OrderProduct) predicate.Order
- func HasUsers() predicate.Order
- func HasUsersWith(preds ...predicate.User) predicate.Order
- func ID(id int64) predicate.Order
- func IDEQ(id int64) predicate.Order
- func IDGT(id int64) predicate.Order
- func IDGTE(id int64) predicate.Order
- func IDIn(ids ...int64) predicate.Order
- func IDLT(id int64) predicate.Order
- func IDLTE(id int64) predicate.Order
- func IDNEQ(id int64) predicate.Order
- func IDNotIn(ids ...int64) predicate.Order
- func Not(p predicate.Order) predicate.Order
- func Or(predicates ...predicate.Order) predicate.Order
- func StatusEQ(v Status) predicate.Order
- func StatusIn(vs ...Status) predicate.Order
- func StatusNEQ(v Status) predicate.Order
- func StatusNotIn(vs ...Status) predicate.Order
- func StatusValidator(s Status) error
- func UpdatedAt(v time.Time) predicate.Order
- func UpdatedAtEQ(v time.Time) predicate.Order
- func UpdatedAtGT(v time.Time) predicate.Order
- func UpdatedAtGTE(v time.Time) predicate.Order
- func UpdatedAtIn(vs ...time.Time) predicate.Order
- func UpdatedAtLT(v time.Time) predicate.Order
- func UpdatedAtLTE(v time.Time) predicate.Order
- func UpdatedAtNEQ(v time.Time) predicate.Order
- func UpdatedAtNotIn(vs ...time.Time) predicate.Order
- func UserID(v int64) predicate.Order
- func UserIDEQ(v int64) predicate.Order
- func UserIDIn(vs ...int64) predicate.Order
- func UserIDNEQ(v int64) predicate.Order
- func UserIDNotIn(vs ...int64) predicate.Order
- func ValidColumn(column string) bool
- type OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByOrderProducts(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByOrderProductsCount(opts ...sql.OrderTermOption) OrderOption
- func ByStatus(opts ...sql.OrderTermOption) OrderOption
- func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByUserID(opts ...sql.OrderTermOption) OrderOption
- func ByUsersField(field string, opts ...sql.OrderTermOption) OrderOption
- type Status
Constants ¶
const ( // Label holds the string label denoting the order type in the database. Label = "order" // 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" // FieldUserID holds the string denoting the user_id field in the database. FieldUserID = "user_id" // FieldStatus holds the string denoting the status field in the database. FieldStatus = "status" // EdgeUsers holds the string denoting the users edge name in mutations. EdgeUsers = "users" // EdgeOrderProducts holds the string denoting the order_products edge name in mutations. EdgeOrderProducts = "order_products" // Table holds the table name of the order in the database. Table = "orders" // UsersTable is the table that holds the users relation/edge. UsersTable = "orders" // UsersInverseTable is the table name for the User entity. // It exists in this package in order to avoid circular dependency with the "user" package. UsersInverseTable = "users" // UsersColumn is the table column denoting the users relation/edge. UsersColumn = "user_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 = "order_id" )
const DefaultStatus = StatusCREATED
StatusCREATED is the default value of the Status enum.
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 )
var Columns = []string{ FieldID, FieldCreatedAt, FieldUpdatedAt, FieldUserID, FieldStatus, }
Columns holds all SQL columns for order 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 HasOrderProducts ¶
HasOrderProducts applies the HasEdge predicate on the "order_products" edge.
func HasOrderProductsWith ¶
func HasOrderProductsWith(preds ...predicate.OrderProduct) predicate.Order
HasOrderProductsWith applies the HasEdge predicate on the "order_products" edge with a given conditions (other predicates).
func HasUsersWith ¶
HasUsersWith applies the HasEdge predicate on the "users" edge with a given conditions (other predicates).
func StatusNotIn ¶
StatusNotIn applies the NotIn predicate on the "status" field.
func StatusValidator ¶
StatusValidator is a validator for the "status" field enum values. It is called by the builders before save.
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 UserID ¶
UserID applies equality check predicate on the "user_id" field. It's identical to UserIDEQ.
func UserIDNotIn ¶
UserIDNotIn applies the NotIn predicate on the "user_id" 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 Order 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 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 ByStatus ¶
func ByStatus(opts ...sql.OrderTermOption) OrderOption
ByStatus orders the results by the status field.
func ByUpdatedAt ¶
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
ByUpdatedAt orders the results by the updated_at field.
func ByUserID ¶
func ByUserID(opts ...sql.OrderTermOption) OrderOption
ByUserID orders the results by the user_id field.
func ByUsersField ¶
func ByUsersField(field string, opts ...sql.OrderTermOption) OrderOption
ByUsersField orders the results by users field.