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 HasAddress() predicate.Order
- func HasAddressWith(preds ...predicate.BillingAddress) predicate.Order
- func HasCustomer() predicate.Order
- func HasCustomerWith(preds ...predicate.Customer) predicate.Order
- func HasNotes() predicate.Order
- func HasNotesWith(preds ...predicate.Note) predicate.Order
- func ID(id int) predicate.Order
- func IDEQ(id int) predicate.Order
- func IDGT(id int) predicate.Order
- func IDGTE(id int) predicate.Order
- func IDIn(ids ...int) predicate.Order
- func IDLT(id int) predicate.Order
- func IDLTE(id int) predicate.Order
- func IDNEQ(id int) predicate.Order
- func IDNotIn(ids ...int) predicate.Order
- func Not(p predicate.Order) predicate.Order
- func Or(predicates ...predicate.Order) predicate.Order
- func Status(v string) predicate.Order
- func StatusContains(v string) predicate.Order
- func StatusContainsFold(v string) predicate.Order
- func StatusEQ(v string) predicate.Order
- func StatusEqualFold(v string) predicate.Order
- func StatusGT(v string) predicate.Order
- func StatusGTE(v string) predicate.Order
- func StatusHasPrefix(v string) predicate.Order
- func StatusHasSuffix(v string) predicate.Order
- func StatusIn(vs ...string) predicate.Order
- func StatusLT(v string) predicate.Order
- func StatusLTE(v string) predicate.Order
- func StatusNEQ(v string) predicate.Order
- func StatusNotIn(vs ...string) predicate.Order
- 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 ValidColumn(column string) bool
- type OrderOption
- func ByAddressField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByCustomerField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByNotes(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByNotesCount(opts ...sql.OrderTermOption) OrderOption
- func ByStatus(opts ...sql.OrderTermOption) OrderOption
- func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
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" // FieldStatus holds the string denoting the status field in the database. FieldStatus = "status" // 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" // EdgeCustomer holds the string denoting the customer edge name in mutations. EdgeCustomer = "customer" // EdgeAddress holds the string denoting the address edge name in mutations. EdgeAddress = "address" // EdgeNotes holds the string denoting the notes edge name in mutations. EdgeNotes = "notes" // Table holds the table name of the order in the database. Table = "orders" // CustomerTable is the table that holds the customer relation/edge. CustomerTable = "orders" // CustomerInverseTable is the table name for the Customer entity. // It exists in this package in order to avoid circular dependency with the "customer" package. CustomerInverseTable = "customers" // CustomerColumn is the table column denoting the customer relation/edge. CustomerColumn = "order_customer" // AddressTable is the table that holds the address relation/edge. AddressTable = "orders" // AddressInverseTable is the table name for the BillingAddress entity. // It exists in this package in order to avoid circular dependency with the "billingaddress" package. AddressInverseTable = "billing_addresses" // AddressColumn is the table column denoting the address relation/edge. AddressColumn = "order_address" // NotesTable is the table that holds the notes relation/edge. NotesTable = "notes" // NotesInverseTable is the table name for the Note entity. // It exists in this package in order to avoid circular dependency with the "note" package. NotesInverseTable = "notes" // NotesColumn is the table column denoting the notes relation/edge. NotesColumn = "order_notes" )
Variables ¶
var ( // DefaultStatus holds the default value on creation for the "status" field. DefaultStatus string // 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, FieldStatus, FieldCreatedAt, FieldUpdatedAt, }
Columns holds all SQL columns for order fields.
var ForeignKeys = []string{
"customer_orders",
"order_customer",
"order_address",
}
ForeignKeys holds the SQL foreign-keys that are owned by the "orders" table and are not defined as standalone fields in the schema.
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 HasAddress ¶
HasAddress applies the HasEdge predicate on the "address" edge.
func HasAddressWith ¶
func HasAddressWith(preds ...predicate.BillingAddress) predicate.Order
HasAddressWith applies the HasEdge predicate on the "address" edge with a given conditions (other predicates).
func HasCustomer ¶
HasCustomer applies the HasEdge predicate on the "customer" edge.
func HasCustomerWith ¶
HasCustomerWith applies the HasEdge predicate on the "customer" edge with a given conditions (other predicates).
func HasNotesWith ¶
HasNotesWith applies the HasEdge predicate on the "notes" edge with a given conditions (other predicates).
func Status ¶
Status applies equality check predicate on the "status" field. It's identical to StatusEQ.
func StatusContains ¶
StatusContains applies the Contains predicate on the "status" field.
func StatusContainsFold ¶
StatusContainsFold applies the ContainsFold predicate on the "status" field.
func StatusEqualFold ¶
StatusEqualFold applies the EqualFold predicate on the "status" field.
func StatusHasPrefix ¶
StatusHasPrefix applies the HasPrefix predicate on the "status" field.
func StatusHasSuffix ¶
StatusHasSuffix applies the HasSuffix predicate on the "status" field.
func StatusNotIn ¶
StatusNotIn applies the NotIn predicate on the "status" 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 Order queries.
func ByAddressField ¶
func ByAddressField(field string, opts ...sql.OrderTermOption) OrderOption
ByAddressField orders the results by address field.
func ByCreatedAt ¶
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
ByCreatedAt orders the results by the created_at field.
func ByCustomerField ¶
func ByCustomerField(field string, opts ...sql.OrderTermOption) OrderOption
ByCustomerField orders the results by customer field.
func ByID ¶
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func ByNotes ¶
func ByNotes(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByNotes orders the results by notes terms.
func ByNotesCount ¶
func ByNotesCount(opts ...sql.OrderTermOption) OrderOption
ByNotesCount orders the results by notes 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.