food

package
v0.0.0-...-a9a8373 Latest Latest
Warning

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

Go to latest
Published: May 27, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the food type in the database.
	Label = "food"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldKey holds the string denoting the key field in the database.
	FieldKey = "key"
	// FieldName holds the string denoting the name field in the database.
	FieldName = "name"
	// FieldBrand holds the string denoting the brand field in the database.
	FieldBrand = "brand"
	// FieldCal100 holds the string denoting the cal100 field in the database.
	FieldCal100 = "cal100"
	// FieldProt100 holds the string denoting the prot100 field in the database.
	FieldProt100 = "prot100"
	// FieldFat100 holds the string denoting the fat100 field in the database.
	FieldFat100 = "fat100"
	// FieldCarb100 holds the string denoting the carb100 field in the database.
	FieldCarb100 = "carb100"
	// FieldComment holds the string denoting the comment field in the database.
	FieldComment = "comment"
	// EdgeJournals holds the string denoting the journals edge name in mutations.
	EdgeJournals = "journals"
	// Table holds the table name of the food in the database.
	Table = "foods"
	// JournalsTable is the table that holds the journals relation/edge.
	JournalsTable = "journals"
	// JournalsInverseTable is the table name for the Journal entity.
	// It exists in this package in order to avoid circular dependency with the "journal" package.
	JournalsInverseTable = "journals"
	// JournalsColumn is the table column denoting the journals relation/edge.
	JournalsColumn = "food_journals"
)

Variables

Columns holds all SQL columns for food fields.

View Source
var (
	// NameValidator is a validator for the "name" field. It is called by the builders before save.
	NameValidator func(string) error
)

Functions

func And

func And(predicates ...predicate.Food) predicate.Food

And groups predicates with the AND operator between them.

func Brand

func Brand(v string) predicate.Food

Brand applies equality check predicate on the "brand" field. It's identical to BrandEQ.

func BrandContains

func BrandContains(v string) predicate.Food

BrandContains applies the Contains predicate on the "brand" field.

func BrandContainsFold

func BrandContainsFold(v string) predicate.Food

BrandContainsFold applies the ContainsFold predicate on the "brand" field.

func BrandEQ

func BrandEQ(v string) predicate.Food

BrandEQ applies the EQ predicate on the "brand" field.

func BrandEqualFold

func BrandEqualFold(v string) predicate.Food

BrandEqualFold applies the EqualFold predicate on the "brand" field.

func BrandGT

func BrandGT(v string) predicate.Food

BrandGT applies the GT predicate on the "brand" field.

func BrandGTE

func BrandGTE(v string) predicate.Food

BrandGTE applies the GTE predicate on the "brand" field.

func BrandHasPrefix

func BrandHasPrefix(v string) predicate.Food

BrandHasPrefix applies the HasPrefix predicate on the "brand" field.

func BrandHasSuffix

func BrandHasSuffix(v string) predicate.Food

BrandHasSuffix applies the HasSuffix predicate on the "brand" field.

func BrandIn

func BrandIn(vs ...string) predicate.Food

BrandIn applies the In predicate on the "brand" field.

func BrandIsNil

func BrandIsNil() predicate.Food

BrandIsNil applies the IsNil predicate on the "brand" field.

func BrandLT

func BrandLT(v string) predicate.Food

BrandLT applies the LT predicate on the "brand" field.

func BrandLTE

func BrandLTE(v string) predicate.Food

BrandLTE applies the LTE predicate on the "brand" field.

func BrandNEQ

func BrandNEQ(v string) predicate.Food

BrandNEQ applies the NEQ predicate on the "brand" field.

func BrandNotIn

func BrandNotIn(vs ...string) predicate.Food

BrandNotIn applies the NotIn predicate on the "brand" field.

func BrandNotNil

func BrandNotNil() predicate.Food

BrandNotNil applies the NotNil predicate on the "brand" field.

func Cal100

func Cal100(v float64) predicate.Food

Cal100 applies equality check predicate on the "cal100" field. It's identical to Cal100EQ.

func Cal100EQ

func Cal100EQ(v float64) predicate.Food

Cal100EQ applies the EQ predicate on the "cal100" field.

func Cal100GT

func Cal100GT(v float64) predicate.Food

Cal100GT applies the GT predicate on the "cal100" field.

func Cal100GTE

func Cal100GTE(v float64) predicate.Food

Cal100GTE applies the GTE predicate on the "cal100" field.

func Cal100In

func Cal100In(vs ...float64) predicate.Food

Cal100In applies the In predicate on the "cal100" field.

func Cal100LT

func Cal100LT(v float64) predicate.Food

Cal100LT applies the LT predicate on the "cal100" field.

func Cal100LTE

func Cal100LTE(v float64) predicate.Food

Cal100LTE applies the LTE predicate on the "cal100" field.

func Cal100NEQ

func Cal100NEQ(v float64) predicate.Food

Cal100NEQ applies the NEQ predicate on the "cal100" field.

func Cal100NotIn

func Cal100NotIn(vs ...float64) predicate.Food

Cal100NotIn applies the NotIn predicate on the "cal100" field.

func Carb100

func Carb100(v float64) predicate.Food

Carb100 applies equality check predicate on the "carb100" field. It's identical to Carb100EQ.

func Carb100EQ

func Carb100EQ(v float64) predicate.Food

Carb100EQ applies the EQ predicate on the "carb100" field.

func Carb100GT

func Carb100GT(v float64) predicate.Food

Carb100GT applies the GT predicate on the "carb100" field.

func Carb100GTE

func Carb100GTE(v float64) predicate.Food

Carb100GTE applies the GTE predicate on the "carb100" field.

func Carb100In

func Carb100In(vs ...float64) predicate.Food

Carb100In applies the In predicate on the "carb100" field.

func Carb100LT

func Carb100LT(v float64) predicate.Food

Carb100LT applies the LT predicate on the "carb100" field.

func Carb100LTE

func Carb100LTE(v float64) predicate.Food

Carb100LTE applies the LTE predicate on the "carb100" field.

func Carb100NEQ

func Carb100NEQ(v float64) predicate.Food

Carb100NEQ applies the NEQ predicate on the "carb100" field.

func Carb100NotIn

func Carb100NotIn(vs ...float64) predicate.Food

Carb100NotIn applies the NotIn predicate on the "carb100" field.

func Comment

func Comment(v string) predicate.Food

Comment applies equality check predicate on the "comment" field. It's identical to CommentEQ.

func CommentContains

func CommentContains(v string) predicate.Food

CommentContains applies the Contains predicate on the "comment" field.

func CommentContainsFold

func CommentContainsFold(v string) predicate.Food

CommentContainsFold applies the ContainsFold predicate on the "comment" field.

func CommentEQ

func CommentEQ(v string) predicate.Food

CommentEQ applies the EQ predicate on the "comment" field.

func CommentEqualFold

func CommentEqualFold(v string) predicate.Food

CommentEqualFold applies the EqualFold predicate on the "comment" field.

func CommentGT

func CommentGT(v string) predicate.Food

CommentGT applies the GT predicate on the "comment" field.

func CommentGTE

func CommentGTE(v string) predicate.Food

CommentGTE applies the GTE predicate on the "comment" field.

func CommentHasPrefix

func CommentHasPrefix(v string) predicate.Food

CommentHasPrefix applies the HasPrefix predicate on the "comment" field.

func CommentHasSuffix

func CommentHasSuffix(v string) predicate.Food

CommentHasSuffix applies the HasSuffix predicate on the "comment" field.

func CommentIn

func CommentIn(vs ...string) predicate.Food

CommentIn applies the In predicate on the "comment" field.

func CommentIsNil

func CommentIsNil() predicate.Food

CommentIsNil applies the IsNil predicate on the "comment" field.

func CommentLT

func CommentLT(v string) predicate.Food

CommentLT applies the LT predicate on the "comment" field.

func CommentLTE

func CommentLTE(v string) predicate.Food

CommentLTE applies the LTE predicate on the "comment" field.

func CommentNEQ

func CommentNEQ(v string) predicate.Food

CommentNEQ applies the NEQ predicate on the "comment" field.

func CommentNotIn

func CommentNotIn(vs ...string) predicate.Food

CommentNotIn applies the NotIn predicate on the "comment" field.

func CommentNotNil

func CommentNotNil() predicate.Food

CommentNotNil applies the NotNil predicate on the "comment" field.

func Fat100

func Fat100(v float64) predicate.Food

Fat100 applies equality check predicate on the "fat100" field. It's identical to Fat100EQ.

func Fat100EQ

func Fat100EQ(v float64) predicate.Food

Fat100EQ applies the EQ predicate on the "fat100" field.

func Fat100GT

func Fat100GT(v float64) predicate.Food

Fat100GT applies the GT predicate on the "fat100" field.

func Fat100GTE

func Fat100GTE(v float64) predicate.Food

Fat100GTE applies the GTE predicate on the "fat100" field.

func Fat100In

func Fat100In(vs ...float64) predicate.Food

Fat100In applies the In predicate on the "fat100" field.

func Fat100LT

func Fat100LT(v float64) predicate.Food

Fat100LT applies the LT predicate on the "fat100" field.

func Fat100LTE

func Fat100LTE(v float64) predicate.Food

Fat100LTE applies the LTE predicate on the "fat100" field.

func Fat100NEQ

func Fat100NEQ(v float64) predicate.Food

Fat100NEQ applies the NEQ predicate on the "fat100" field.

func Fat100NotIn

func Fat100NotIn(vs ...float64) predicate.Food

Fat100NotIn applies the NotIn predicate on the "fat100" field.

func HasJournals

func HasJournals() predicate.Food

HasJournals applies the HasEdge predicate on the "journals" edge.

func HasJournalsWith

func HasJournalsWith(preds ...predicate.Journal) predicate.Food

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

func ID

func ID(id int) predicate.Food

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Food

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Food

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Food

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Food

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Food

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Food

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

IDNotIn applies the NotIn predicate on the ID field.

func Key

func Key(v string) predicate.Food

Key applies equality check predicate on the "key" field. It's identical to KeyEQ.

func KeyContains

func KeyContains(v string) predicate.Food

KeyContains applies the Contains predicate on the "key" field.

func KeyContainsFold

func KeyContainsFold(v string) predicate.Food

KeyContainsFold applies the ContainsFold predicate on the "key" field.

func KeyEQ

func KeyEQ(v string) predicate.Food

KeyEQ applies the EQ predicate on the "key" field.

func KeyEqualFold

func KeyEqualFold(v string) predicate.Food

KeyEqualFold applies the EqualFold predicate on the "key" field.

func KeyGT

func KeyGT(v string) predicate.Food

KeyGT applies the GT predicate on the "key" field.

func KeyGTE

func KeyGTE(v string) predicate.Food

KeyGTE applies the GTE predicate on the "key" field.

func KeyHasPrefix

func KeyHasPrefix(v string) predicate.Food

KeyHasPrefix applies the HasPrefix predicate on the "key" field.

func KeyHasSuffix

func KeyHasSuffix(v string) predicate.Food

KeyHasSuffix applies the HasSuffix predicate on the "key" field.

func KeyIn

func KeyIn(vs ...string) predicate.Food

KeyIn applies the In predicate on the "key" field.

func KeyLT

func KeyLT(v string) predicate.Food

KeyLT applies the LT predicate on the "key" field.

func KeyLTE

func KeyLTE(v string) predicate.Food

KeyLTE applies the LTE predicate on the "key" field.

func KeyNEQ

func KeyNEQ(v string) predicate.Food

KeyNEQ applies the NEQ predicate on the "key" field.

func KeyNotIn

func KeyNotIn(vs ...string) predicate.Food

KeyNotIn applies the NotIn predicate on the "key" field.

func Name

func Name(v string) predicate.Food

Name applies equality check predicate on the "name" field. It's identical to NameEQ.

func NameContains

func NameContains(v string) predicate.Food

NameContains applies the Contains predicate on the "name" field.

func NameContainsFold

func NameContainsFold(v string) predicate.Food

NameContainsFold applies the ContainsFold predicate on the "name" field.

func NameEQ

func NameEQ(v string) predicate.Food

NameEQ applies the EQ predicate on the "name" field.

func NameEqualFold

func NameEqualFold(v string) predicate.Food

NameEqualFold applies the EqualFold predicate on the "name" field.

func NameGT

func NameGT(v string) predicate.Food

NameGT applies the GT predicate on the "name" field.

func NameGTE

func NameGTE(v string) predicate.Food

NameGTE applies the GTE predicate on the "name" field.

func NameHasPrefix

func NameHasPrefix(v string) predicate.Food

NameHasPrefix applies the HasPrefix predicate on the "name" field.

func NameHasSuffix

func NameHasSuffix(v string) predicate.Food

NameHasSuffix applies the HasSuffix predicate on the "name" field.

func NameIn

func NameIn(vs ...string) predicate.Food

NameIn applies the In predicate on the "name" field.

func NameLT

func NameLT(v string) predicate.Food

NameLT applies the LT predicate on the "name" field.

func NameLTE

func NameLTE(v string) predicate.Food

NameLTE applies the LTE predicate on the "name" field.

func NameNEQ

func NameNEQ(v string) predicate.Food

NameNEQ applies the NEQ predicate on the "name" field.

func NameNotIn

func NameNotIn(vs ...string) predicate.Food

NameNotIn applies the NotIn predicate on the "name" field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Food) predicate.Food

Or groups predicates with the OR operator between them.

func Prot100

func Prot100(v float64) predicate.Food

Prot100 applies equality check predicate on the "prot100" field. It's identical to Prot100EQ.

func Prot100EQ

func Prot100EQ(v float64) predicate.Food

Prot100EQ applies the EQ predicate on the "prot100" field.

func Prot100GT

func Prot100GT(v float64) predicate.Food

Prot100GT applies the GT predicate on the "prot100" field.

func Prot100GTE

func Prot100GTE(v float64) predicate.Food

Prot100GTE applies the GTE predicate on the "prot100" field.

func Prot100In

func Prot100In(vs ...float64) predicate.Food

Prot100In applies the In predicate on the "prot100" field.

func Prot100LT

func Prot100LT(v float64) predicate.Food

Prot100LT applies the LT predicate on the "prot100" field.

func Prot100LTE

func Prot100LTE(v float64) predicate.Food

Prot100LTE applies the LTE predicate on the "prot100" field.

func Prot100NEQ

func Prot100NEQ(v float64) predicate.Food

Prot100NEQ applies the NEQ predicate on the "prot100" field.

func Prot100NotIn

func Prot100NotIn(vs ...float64) predicate.Food

Prot100NotIn applies the NotIn predicate on the "prot100" 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 Food queries.

func ByBrand

func ByBrand(opts ...sql.OrderTermOption) OrderOption

ByBrand orders the results by the brand field.

func ByCal100

func ByCal100(opts ...sql.OrderTermOption) OrderOption

ByCal100 orders the results by the cal100 field.

func ByCarb100

func ByCarb100(opts ...sql.OrderTermOption) OrderOption

ByCarb100 orders the results by the carb100 field.

func ByComment

func ByComment(opts ...sql.OrderTermOption) OrderOption

ByComment orders the results by the comment field.

func ByFat100

func ByFat100(opts ...sql.OrderTermOption) OrderOption

ByFat100 orders the results by the fat100 field.

func ByID

func ByID(opts ...sql.OrderTermOption) OrderOption

ByID orders the results by the id field.

func ByJournals

func ByJournals(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption

ByJournals orders the results by journals terms.

func ByJournalsCount

func ByJournalsCount(opts ...sql.OrderTermOption) OrderOption

ByJournalsCount orders the results by journals count.

func ByKey

func ByKey(opts ...sql.OrderTermOption) OrderOption

ByKey orders the results by the key field.

func ByName

func ByName(opts ...sql.OrderTermOption) OrderOption

ByName orders the results by the name field.

func ByProt100

func ByProt100(opts ...sql.OrderTermOption) OrderOption

ByProt100 orders the results by the prot100 field.

Jump to

Keyboard shortcuts

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