order

package
v1.0.1-a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 11, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
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

View Source
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
)

Columns holds all SQL columns for order fields.

View Source
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 And

func And(predicates ...predicate.Order) predicate.Order

And groups predicates with the AND operator between them.

func CreatedAt

func CreatedAt(v time.Time) predicate.Order

CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Order

CreatedAtEQ applies the EQ predicate on the "created_at" field.

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Order

CreatedAtGT applies the GT predicate on the "created_at" field.

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Order

CreatedAtGTE applies the GTE predicate on the "created_at" field.

func CreatedAtIn

func CreatedAtIn(vs ...time.Time) predicate.Order

CreatedAtIn applies the In predicate on the "created_at" field.

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Order

CreatedAtLT applies the LT predicate on the "created_at" field.

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Order

CreatedAtLTE applies the LTE predicate on the "created_at" field.

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Order

CreatedAtNEQ applies the NEQ predicate on the "created_at" field.

func CreatedAtNotIn

func CreatedAtNotIn(vs ...time.Time) predicate.Order

CreatedAtNotIn applies the NotIn predicate on the "created_at" field.

func HasAddress

func HasAddress() predicate.Order

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

func HasCustomer() predicate.Order

HasCustomer applies the HasEdge predicate on the "customer" edge.

func HasCustomerWith

func HasCustomerWith(preds ...predicate.Customer) predicate.Order

HasCustomerWith applies the HasEdge predicate on the "customer" edge with a given conditions (other predicates).

func HasNotes

func HasNotes() predicate.Order

HasNotes applies the HasEdge predicate on the "notes" edge.

func HasNotesWith

func HasNotesWith(preds ...predicate.Note) predicate.Order

HasNotesWith applies the HasEdge predicate on the "notes" edge with a given conditions (other predicates).

func ID

func ID(id int) predicate.Order

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Order

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Order

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Order

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...int) predicate.Order

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Order

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Order

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Order

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...int) predicate.Order

IDNotIn applies the NotIn predicate on the ID field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Order) predicate.Order

Or groups predicates with the OR operator between them.

func Status

func Status(v string) predicate.Order

Status applies equality check predicate on the "status" field. It's identical to StatusEQ.

func StatusContains

func StatusContains(v string) predicate.Order

StatusContains applies the Contains predicate on the "status" field.

func StatusContainsFold

func StatusContainsFold(v string) predicate.Order

StatusContainsFold applies the ContainsFold predicate on the "status" field.

func StatusEQ

func StatusEQ(v string) predicate.Order

StatusEQ applies the EQ predicate on the "status" field.

func StatusEqualFold

func StatusEqualFold(v string) predicate.Order

StatusEqualFold applies the EqualFold predicate on the "status" field.

func StatusGT

func StatusGT(v string) predicate.Order

StatusGT applies the GT predicate on the "status" field.

func StatusGTE

func StatusGTE(v string) predicate.Order

StatusGTE applies the GTE predicate on the "status" field.

func StatusHasPrefix

func StatusHasPrefix(v string) predicate.Order

StatusHasPrefix applies the HasPrefix predicate on the "status" field.

func StatusHasSuffix

func StatusHasSuffix(v string) predicate.Order

StatusHasSuffix applies the HasSuffix predicate on the "status" field.

func StatusIn

func StatusIn(vs ...string) predicate.Order

StatusIn applies the In predicate on the "status" field.

func StatusLT

func StatusLT(v string) predicate.Order

StatusLT applies the LT predicate on the "status" field.

func StatusLTE

func StatusLTE(v string) predicate.Order

StatusLTE applies the LTE predicate on the "status" field.

func StatusNEQ

func StatusNEQ(v string) predicate.Order

StatusNEQ applies the NEQ predicate on the "status" field.

func StatusNotIn

func StatusNotIn(vs ...string) predicate.Order

StatusNotIn applies the NotIn predicate on the "status" field.

func UpdatedAt

func UpdatedAt(v time.Time) predicate.Order

UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.Order

UpdatedAtEQ applies the EQ predicate on the "updated_at" field.

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.Order

UpdatedAtGT applies the GT predicate on the "updated_at" field.

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.Order

UpdatedAtGTE applies the GTE predicate on the "updated_at" field.

func UpdatedAtIn

func UpdatedAtIn(vs ...time.Time) predicate.Order

UpdatedAtIn applies the In predicate on the "updated_at" field.

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.Order

UpdatedAtLT applies the LT predicate on the "updated_at" field.

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.Order

UpdatedAtLTE applies the LTE predicate on the "updated_at" field.

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.Order

UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.

func UpdatedAtNotIn

func UpdatedAtNotIn(vs ...time.Time) predicate.Order

UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.

func ValidColumn

func ValidColumn(column string) bool

ValidColumn reports if the column name is valid (part of the table columns).

Types

type OrderOption

type OrderOption func(*sql.Selector)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL