Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Food) predicate.Food
- func Brand(v string) predicate.Food
- func BrandContains(v string) predicate.Food
- func BrandContainsFold(v string) predicate.Food
- func BrandEQ(v string) predicate.Food
- func BrandEqualFold(v string) predicate.Food
- func BrandGT(v string) predicate.Food
- func BrandGTE(v string) predicate.Food
- func BrandHasPrefix(v string) predicate.Food
- func BrandHasSuffix(v string) predicate.Food
- func BrandIn(vs ...string) predicate.Food
- func BrandIsNil() predicate.Food
- func BrandLT(v string) predicate.Food
- func BrandLTE(v string) predicate.Food
- func BrandNEQ(v string) predicate.Food
- func BrandNotIn(vs ...string) predicate.Food
- func BrandNotNil() predicate.Food
- func Cal100(v float64) predicate.Food
- func Cal100EQ(v float64) predicate.Food
- func Cal100GT(v float64) predicate.Food
- func Cal100GTE(v float64) predicate.Food
- func Cal100In(vs ...float64) predicate.Food
- func Cal100LT(v float64) predicate.Food
- func Cal100LTE(v float64) predicate.Food
- func Cal100NEQ(v float64) predicate.Food
- func Cal100NotIn(vs ...float64) predicate.Food
- func Carb100(v float64) predicate.Food
- func Carb100EQ(v float64) predicate.Food
- func Carb100GT(v float64) predicate.Food
- func Carb100GTE(v float64) predicate.Food
- func Carb100In(vs ...float64) predicate.Food
- func Carb100LT(v float64) predicate.Food
- func Carb100LTE(v float64) predicate.Food
- func Carb100NEQ(v float64) predicate.Food
- func Carb100NotIn(vs ...float64) predicate.Food
- func Comment(v string) predicate.Food
- func CommentContains(v string) predicate.Food
- func CommentContainsFold(v string) predicate.Food
- func CommentEQ(v string) predicate.Food
- func CommentEqualFold(v string) predicate.Food
- func CommentGT(v string) predicate.Food
- func CommentGTE(v string) predicate.Food
- func CommentHasPrefix(v string) predicate.Food
- func CommentHasSuffix(v string) predicate.Food
- func CommentIn(vs ...string) predicate.Food
- func CommentIsNil() predicate.Food
- func CommentLT(v string) predicate.Food
- func CommentLTE(v string) predicate.Food
- func CommentNEQ(v string) predicate.Food
- func CommentNotIn(vs ...string) predicate.Food
- func CommentNotNil() predicate.Food
- func Fat100(v float64) predicate.Food
- func Fat100EQ(v float64) predicate.Food
- func Fat100GT(v float64) predicate.Food
- func Fat100GTE(v float64) predicate.Food
- func Fat100In(vs ...float64) predicate.Food
- func Fat100LT(v float64) predicate.Food
- func Fat100LTE(v float64) predicate.Food
- func Fat100NEQ(v float64) predicate.Food
- func Fat100NotIn(vs ...float64) predicate.Food
- func HasJournals() predicate.Food
- func HasJournalsWith(preds ...predicate.Journal) predicate.Food
- func ID(id int) predicate.Food
- func IDEQ(id int) predicate.Food
- func IDGT(id int) predicate.Food
- func IDGTE(id int) predicate.Food
- func IDIn(ids ...int) predicate.Food
- func IDLT(id int) predicate.Food
- func IDLTE(id int) predicate.Food
- func IDNEQ(id int) predicate.Food
- func IDNotIn(ids ...int) predicate.Food
- func Key(v string) predicate.Food
- func KeyContains(v string) predicate.Food
- func KeyContainsFold(v string) predicate.Food
- func KeyEQ(v string) predicate.Food
- func KeyEqualFold(v string) predicate.Food
- func KeyGT(v string) predicate.Food
- func KeyGTE(v string) predicate.Food
- func KeyHasPrefix(v string) predicate.Food
- func KeyHasSuffix(v string) predicate.Food
- func KeyIn(vs ...string) predicate.Food
- func KeyLT(v string) predicate.Food
- func KeyLTE(v string) predicate.Food
- func KeyNEQ(v string) predicate.Food
- func KeyNotIn(vs ...string) predicate.Food
- func Name(v string) predicate.Food
- func NameContains(v string) predicate.Food
- func NameContainsFold(v string) predicate.Food
- func NameEQ(v string) predicate.Food
- func NameEqualFold(v string) predicate.Food
- func NameGT(v string) predicate.Food
- func NameGTE(v string) predicate.Food
- func NameHasPrefix(v string) predicate.Food
- func NameHasSuffix(v string) predicate.Food
- func NameIn(vs ...string) predicate.Food
- func NameLT(v string) predicate.Food
- func NameLTE(v string) predicate.Food
- func NameNEQ(v string) predicate.Food
- func NameNotIn(vs ...string) predicate.Food
- func Not(p predicate.Food) predicate.Food
- func Or(predicates ...predicate.Food) predicate.Food
- func Prot100(v float64) predicate.Food
- func Prot100EQ(v float64) predicate.Food
- func Prot100GT(v float64) predicate.Food
- func Prot100GTE(v float64) predicate.Food
- func Prot100In(vs ...float64) predicate.Food
- func Prot100LT(v float64) predicate.Food
- func Prot100LTE(v float64) predicate.Food
- func Prot100NEQ(v float64) predicate.Food
- func Prot100NotIn(vs ...float64) predicate.Food
- func ValidColumn(column string) bool
- type OrderOption
- func ByBrand(opts ...sql.OrderTermOption) OrderOption
- func ByCal100(opts ...sql.OrderTermOption) OrderOption
- func ByCarb100(opts ...sql.OrderTermOption) OrderOption
- func ByComment(opts ...sql.OrderTermOption) OrderOption
- func ByFat100(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByJournals(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByJournalsCount(opts ...sql.OrderTermOption) OrderOption
- func ByKey(opts ...sql.OrderTermOption) OrderOption
- func ByName(opts ...sql.OrderTermOption) OrderOption
- func ByProt100(opts ...sql.OrderTermOption) OrderOption
Constants ¶
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 ¶
var Columns = []string{ FieldID, FieldKey, FieldName, FieldBrand, FieldCal100, FieldProt100, FieldFat100, FieldCarb100, FieldComment, }
Columns holds all SQL columns for food fields.
var ( // NameValidator is a validator for the "name" field. It is called by the builders before save. NameValidator func(string) error )
Functions ¶
func Brand ¶
Brand applies equality check predicate on the "brand" field. It's identical to BrandEQ.
func BrandContains ¶
BrandContains applies the Contains predicate on the "brand" field.
func BrandContainsFold ¶
BrandContainsFold applies the ContainsFold predicate on the "brand" field.
func BrandEqualFold ¶
BrandEqualFold applies the EqualFold predicate on the "brand" field.
func BrandHasPrefix ¶
BrandHasPrefix applies the HasPrefix predicate on the "brand" field.
func BrandHasSuffix ¶
BrandHasSuffix applies the HasSuffix predicate on the "brand" field.
func BrandIsNil ¶
BrandIsNil applies the IsNil predicate on the "brand" field.
func BrandNotIn ¶
BrandNotIn applies the NotIn predicate on the "brand" field.
func BrandNotNil ¶
BrandNotNil applies the NotNil predicate on the "brand" field.
func Cal100 ¶
Cal100 applies equality check predicate on the "cal100" field. It's identical to Cal100EQ.
func Cal100NotIn ¶
Cal100NotIn applies the NotIn predicate on the "cal100" field.
func Carb100 ¶
Carb100 applies equality check predicate on the "carb100" field. It's identical to Carb100EQ.
func Carb100GTE ¶
Carb100GTE applies the GTE predicate on the "carb100" field.
func Carb100LTE ¶
Carb100LTE applies the LTE predicate on the "carb100" field.
func Carb100NEQ ¶
Carb100NEQ applies the NEQ predicate on the "carb100" field.
func Carb100NotIn ¶
Carb100NotIn applies the NotIn predicate on the "carb100" field.
func Comment ¶
Comment applies equality check predicate on the "comment" field. It's identical to CommentEQ.
func CommentContains ¶
CommentContains applies the Contains predicate on the "comment" field.
func CommentContainsFold ¶
CommentContainsFold applies the ContainsFold predicate on the "comment" field.
func CommentEqualFold ¶
CommentEqualFold applies the EqualFold predicate on the "comment" field.
func CommentGTE ¶
CommentGTE applies the GTE predicate on the "comment" field.
func CommentHasPrefix ¶
CommentHasPrefix applies the HasPrefix predicate on the "comment" field.
func CommentHasSuffix ¶
CommentHasSuffix applies the HasSuffix predicate on the "comment" field.
func CommentIsNil ¶
CommentIsNil applies the IsNil predicate on the "comment" field.
func CommentLTE ¶
CommentLTE applies the LTE predicate on the "comment" field.
func CommentNEQ ¶
CommentNEQ applies the NEQ predicate on the "comment" field.
func CommentNotIn ¶
CommentNotIn applies the NotIn predicate on the "comment" field.
func CommentNotNil ¶
CommentNotNil applies the NotNil predicate on the "comment" field.
func Fat100 ¶
Fat100 applies equality check predicate on the "fat100" field. It's identical to Fat100EQ.
func Fat100NotIn ¶
Fat100NotIn applies the NotIn predicate on the "fat100" field.
func HasJournals ¶
HasJournals applies the HasEdge predicate on the "journals" edge.
func HasJournalsWith ¶
HasJournalsWith applies the HasEdge predicate on the "journals" edge with a given conditions (other predicates).
func KeyContains ¶
KeyContains applies the Contains predicate on the "key" field.
func KeyContainsFold ¶
KeyContainsFold applies the ContainsFold predicate on the "key" field.
func KeyEqualFold ¶
KeyEqualFold applies the EqualFold predicate on the "key" field.
func KeyHasPrefix ¶
KeyHasPrefix applies the HasPrefix predicate on the "key" field.
func KeyHasSuffix ¶
KeyHasSuffix applies the HasSuffix predicate on the "key" field.
func NameContains ¶
NameContains applies the Contains predicate on the "name" field.
func NameContainsFold ¶
NameContainsFold applies the ContainsFold predicate on the "name" field.
func NameEqualFold ¶
NameEqualFold applies the EqualFold predicate on the "name" field.
func NameHasPrefix ¶
NameHasPrefix applies the HasPrefix predicate on the "name" field.
func NameHasSuffix ¶
NameHasSuffix applies the HasSuffix predicate on the "name" field.
func Prot100 ¶
Prot100 applies equality check predicate on the "prot100" field. It's identical to Prot100EQ.
func Prot100GTE ¶
Prot100GTE applies the GTE predicate on the "prot100" field.
func Prot100LTE ¶
Prot100LTE applies the LTE predicate on the "prot100" field.
func Prot100NEQ ¶
Prot100NEQ applies the NEQ predicate on the "prot100" field.
func Prot100NotIn ¶
Prot100NotIn applies the NotIn predicate on the "prot100" 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 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.