item

package
v0.0.0-...-02a5af8 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the item type in the database.
	Label = "item"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldProductID holds the string denoting the product_id field in the database.
	FieldProductID = "product_id"
	// FieldQty holds the string denoting the qty field in the database.
	FieldQty = "qty"
	// 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"
	// EdgeOrderID holds the string denoting the order_id edge name in mutations.
	EdgeOrderID = "order_id"
	// Table holds the table name of the item in the database.
	Table = "items"
	// OrderIDTable is the table the holds the order_id relation/edge. The primary key declared below.
	OrderIDTable = "order_items"
	// OrderIDInverseTable is the table name for the Order entity.
	// It exists in this package in order to avoid circular dependency with the "order" package.
	OrderIDInverseTable = "orders"
)

Variables

View Source
var (
	// DefaultQty holds the default value on creation for the "qty" field.
	DefaultQty int
	// 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 item fields.

View Source
var (
	// OrderIDPrimaryKey and OrderIDColumn2 are the table columns denoting the
	// primary key for the order_id relation (M2M).
	OrderIDPrimaryKey = []string{"order_id", "item_id"}
)

Functions

func And

func And(predicates ...predicate.Item) predicate.Item

And groups predicates with the AND operator between them.

func CreatedAt

func CreatedAt(v time.Time) predicate.Item

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

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Item

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

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Item

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

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Item

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

func CreatedAtIn

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

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

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Item

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

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Item

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

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Item

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

func CreatedAtNotIn

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

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

func HasOrderID

func HasOrderID() predicate.Item

HasOrderID applies the HasEdge predicate on the "order_id" edge.

func HasOrderIDWith

func HasOrderIDWith(preds ...predicate.Order) predicate.Item

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

func ID

func ID(id int) predicate.Item

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Item

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Item

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Item

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Item

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Item

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Item

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

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.Item) predicate.Item

Or groups predicates with the OR operator between them.

func ProductID

func ProductID(v int) predicate.Item

ProductID applies equality check predicate on the "product_id" field. It's identical to ProductIDEQ.

func ProductIDEQ

func ProductIDEQ(v int) predicate.Item

ProductIDEQ applies the EQ predicate on the "product_id" field.

func ProductIDGT

func ProductIDGT(v int) predicate.Item

ProductIDGT applies the GT predicate on the "product_id" field.

func ProductIDGTE

func ProductIDGTE(v int) predicate.Item

ProductIDGTE applies the GTE predicate on the "product_id" field.

func ProductIDIn

func ProductIDIn(vs ...int) predicate.Item

ProductIDIn applies the In predicate on the "product_id" field.

func ProductIDLT

func ProductIDLT(v int) predicate.Item

ProductIDLT applies the LT predicate on the "product_id" field.

func ProductIDLTE

func ProductIDLTE(v int) predicate.Item

ProductIDLTE applies the LTE predicate on the "product_id" field.

func ProductIDNEQ

func ProductIDNEQ(v int) predicate.Item

ProductIDNEQ applies the NEQ predicate on the "product_id" field.

func ProductIDNotIn

func ProductIDNotIn(vs ...int) predicate.Item

ProductIDNotIn applies the NotIn predicate on the "product_id" field.

func Qty

func Qty(v int) predicate.Item

Qty applies equality check predicate on the "qty" field. It's identical to QtyEQ.

func QtyEQ

func QtyEQ(v int) predicate.Item

QtyEQ applies the EQ predicate on the "qty" field.

func QtyGT

func QtyGT(v int) predicate.Item

QtyGT applies the GT predicate on the "qty" field.

func QtyGTE

func QtyGTE(v int) predicate.Item

QtyGTE applies the GTE predicate on the "qty" field.

func QtyIn

func QtyIn(vs ...int) predicate.Item

QtyIn applies the In predicate on the "qty" field.

func QtyLT

func QtyLT(v int) predicate.Item

QtyLT applies the LT predicate on the "qty" field.

func QtyLTE

func QtyLTE(v int) predicate.Item

QtyLTE applies the LTE predicate on the "qty" field.

func QtyNEQ

func QtyNEQ(v int) predicate.Item

QtyNEQ applies the NEQ predicate on the "qty" field.

func QtyNotIn

func QtyNotIn(vs ...int) predicate.Item

QtyNotIn applies the NotIn predicate on the "qty" field.

func UpdatedAt

func UpdatedAt(v time.Time) predicate.Item

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

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.Item

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

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.Item

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

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.Item

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

func UpdatedAtIn

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

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

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.Item

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

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.Item

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

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.Item

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

func UpdatedAtNotIn

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

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

This section is empty.

Jump to

Keyboard shortcuts

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