nutrition

package
v0.0.0-...-6d1ceae Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2024 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the nutrition type in the database.
	Label = "nutrition"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldCalories holds the string denoting the calories field in the database.
	FieldCalories = "calories"
	// FieldFat holds the string denoting the fat field in the database.
	FieldFat = "fat"
	// FieldCarbs holds the string denoting the carbs field in the database.
	FieldCarbs = "carbs"
	// FieldProtein holds the string denoting the protein field in the database.
	FieldProtein = "protein"
	// FieldPrecision holds the string denoting the precision field in the database.
	FieldPrecision = "precision"
	// FieldBenefits holds the string denoting the benefits field in the database.
	FieldBenefits = "benefits"
	// EdgeRecipe holds the string denoting the recipe edge name in mutations.
	EdgeRecipe = "recipe"
	// Table holds the table name of the nutrition in the database.
	Table = "nutritions"
	// RecipeTable is the table that holds the recipe relation/edge.
	RecipeTable = "nutritions"
	// RecipeInverseTable is the table name for the Recipe entity.
	// It exists in this package in order to avoid circular dependency with the "recipe" package.
	RecipeInverseTable = "recipes"
	// RecipeColumn is the table column denoting the recipe relation/edge.
	RecipeColumn = "recipe_nutrition"
)

Variables

Columns holds all SQL columns for nutrition fields.

View Source
var ForeignKeys = []string{
	"recipe_nutrition",
}

ForeignKeys holds the SQL foreign-keys that are owned by the "nutritions" table and are not defined as standalone fields in the schema.

Functions

func And

func And(predicates ...predicate.Nutrition) predicate.Nutrition

And groups predicates with the AND operator between them.

func BenefitsIsNil

func BenefitsIsNil() predicate.Nutrition

BenefitsIsNil applies the IsNil predicate on the "benefits" field.

func BenefitsNotNil

func BenefitsNotNil() predicate.Nutrition

BenefitsNotNil applies the NotNil predicate on the "benefits" field.

func Calories

func Calories(v int) predicate.Nutrition

Calories applies equality check predicate on the "calories" field. It's identical to CaloriesEQ.

func CaloriesEQ

func CaloriesEQ(v int) predicate.Nutrition

CaloriesEQ applies the EQ predicate on the "calories" field.

func CaloriesGT

func CaloriesGT(v int) predicate.Nutrition

CaloriesGT applies the GT predicate on the "calories" field.

func CaloriesGTE

func CaloriesGTE(v int) predicate.Nutrition

CaloriesGTE applies the GTE predicate on the "calories" field.

func CaloriesIn

func CaloriesIn(vs ...int) predicate.Nutrition

CaloriesIn applies the In predicate on the "calories" field.

func CaloriesIsNil

func CaloriesIsNil() predicate.Nutrition

CaloriesIsNil applies the IsNil predicate on the "calories" field.

func CaloriesLT

func CaloriesLT(v int) predicate.Nutrition

CaloriesLT applies the LT predicate on the "calories" field.

func CaloriesLTE

func CaloriesLTE(v int) predicate.Nutrition

CaloriesLTE applies the LTE predicate on the "calories" field.

func CaloriesNEQ

func CaloriesNEQ(v int) predicate.Nutrition

CaloriesNEQ applies the NEQ predicate on the "calories" field.

func CaloriesNotIn

func CaloriesNotIn(vs ...int) predicate.Nutrition

CaloriesNotIn applies the NotIn predicate on the "calories" field.

func CaloriesNotNil

func CaloriesNotNil() predicate.Nutrition

CaloriesNotNil applies the NotNil predicate on the "calories" field.

func Carbs

func Carbs(v int) predicate.Nutrition

Carbs applies equality check predicate on the "carbs" field. It's identical to CarbsEQ.

func CarbsEQ

func CarbsEQ(v int) predicate.Nutrition

CarbsEQ applies the EQ predicate on the "carbs" field.

func CarbsGT

func CarbsGT(v int) predicate.Nutrition

CarbsGT applies the GT predicate on the "carbs" field.

func CarbsGTE

func CarbsGTE(v int) predicate.Nutrition

CarbsGTE applies the GTE predicate on the "carbs" field.

func CarbsIn

func CarbsIn(vs ...int) predicate.Nutrition

CarbsIn applies the In predicate on the "carbs" field.

func CarbsIsNil

func CarbsIsNil() predicate.Nutrition

CarbsIsNil applies the IsNil predicate on the "carbs" field.

func CarbsLT

func CarbsLT(v int) predicate.Nutrition

CarbsLT applies the LT predicate on the "carbs" field.

func CarbsLTE

func CarbsLTE(v int) predicate.Nutrition

CarbsLTE applies the LTE predicate on the "carbs" field.

func CarbsNEQ

func CarbsNEQ(v int) predicate.Nutrition

CarbsNEQ applies the NEQ predicate on the "carbs" field.

func CarbsNotIn

func CarbsNotIn(vs ...int) predicate.Nutrition

CarbsNotIn applies the NotIn predicate on the "carbs" field.

func CarbsNotNil

func CarbsNotNil() predicate.Nutrition

CarbsNotNil applies the NotNil predicate on the "carbs" field.

func Fat

func Fat(v int) predicate.Nutrition

Fat applies equality check predicate on the "fat" field. It's identical to FatEQ.

func FatEQ

func FatEQ(v int) predicate.Nutrition

FatEQ applies the EQ predicate on the "fat" field.

func FatGT

func FatGT(v int) predicate.Nutrition

FatGT applies the GT predicate on the "fat" field.

func FatGTE

func FatGTE(v int) predicate.Nutrition

FatGTE applies the GTE predicate on the "fat" field.

func FatIn

func FatIn(vs ...int) predicate.Nutrition

FatIn applies the In predicate on the "fat" field.

func FatIsNil

func FatIsNil() predicate.Nutrition

FatIsNil applies the IsNil predicate on the "fat" field.

func FatLT

func FatLT(v int) predicate.Nutrition

FatLT applies the LT predicate on the "fat" field.

func FatLTE

func FatLTE(v int) predicate.Nutrition

FatLTE applies the LTE predicate on the "fat" field.

func FatNEQ

func FatNEQ(v int) predicate.Nutrition

FatNEQ applies the NEQ predicate on the "fat" field.

func FatNotIn

func FatNotIn(vs ...int) predicate.Nutrition

FatNotIn applies the NotIn predicate on the "fat" field.

func FatNotNil

func FatNotNil() predicate.Nutrition

FatNotNil applies the NotNil predicate on the "fat" field.

func HasRecipe

func HasRecipe() predicate.Nutrition

HasRecipe applies the HasEdge predicate on the "recipe" edge.

func HasRecipeWith

func HasRecipeWith(preds ...predicate.Recipe) predicate.Nutrition

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

func ID

func ID(id int) predicate.Nutrition

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Nutrition

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Nutrition

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Nutrition

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Nutrition

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Nutrition

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Nutrition

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

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

Or groups predicates with the OR operator between them.

func Precision

func Precision(v string) predicate.Nutrition

Precision applies equality check predicate on the "precision" field. It's identical to PrecisionEQ.

func PrecisionContains

func PrecisionContains(v string) predicate.Nutrition

PrecisionContains applies the Contains predicate on the "precision" field.

func PrecisionContainsFold

func PrecisionContainsFold(v string) predicate.Nutrition

PrecisionContainsFold applies the ContainsFold predicate on the "precision" field.

func PrecisionEQ

func PrecisionEQ(v string) predicate.Nutrition

PrecisionEQ applies the EQ predicate on the "precision" field.

func PrecisionEqualFold

func PrecisionEqualFold(v string) predicate.Nutrition

PrecisionEqualFold applies the EqualFold predicate on the "precision" field.

func PrecisionGT

func PrecisionGT(v string) predicate.Nutrition

PrecisionGT applies the GT predicate on the "precision" field.

func PrecisionGTE

func PrecisionGTE(v string) predicate.Nutrition

PrecisionGTE applies the GTE predicate on the "precision" field.

func PrecisionHasPrefix

func PrecisionHasPrefix(v string) predicate.Nutrition

PrecisionHasPrefix applies the HasPrefix predicate on the "precision" field.

func PrecisionHasSuffix

func PrecisionHasSuffix(v string) predicate.Nutrition

PrecisionHasSuffix applies the HasSuffix predicate on the "precision" field.

func PrecisionIn

func PrecisionIn(vs ...string) predicate.Nutrition

PrecisionIn applies the In predicate on the "precision" field.

func PrecisionIsNil

func PrecisionIsNil() predicate.Nutrition

PrecisionIsNil applies the IsNil predicate on the "precision" field.

func PrecisionLT

func PrecisionLT(v string) predicate.Nutrition

PrecisionLT applies the LT predicate on the "precision" field.

func PrecisionLTE

func PrecisionLTE(v string) predicate.Nutrition

PrecisionLTE applies the LTE predicate on the "precision" field.

func PrecisionNEQ

func PrecisionNEQ(v string) predicate.Nutrition

PrecisionNEQ applies the NEQ predicate on the "precision" field.

func PrecisionNotIn

func PrecisionNotIn(vs ...string) predicate.Nutrition

PrecisionNotIn applies the NotIn predicate on the "precision" field.

func PrecisionNotNil

func PrecisionNotNil() predicate.Nutrition

PrecisionNotNil applies the NotNil predicate on the "precision" field.

func Protein

func Protein(v int) predicate.Nutrition

Protein applies equality check predicate on the "protein" field. It's identical to ProteinEQ.

func ProteinEQ

func ProteinEQ(v int) predicate.Nutrition

ProteinEQ applies the EQ predicate on the "protein" field.

func ProteinGT

func ProteinGT(v int) predicate.Nutrition

ProteinGT applies the GT predicate on the "protein" field.

func ProteinGTE

func ProteinGTE(v int) predicate.Nutrition

ProteinGTE applies the GTE predicate on the "protein" field.

func ProteinIn

func ProteinIn(vs ...int) predicate.Nutrition

ProteinIn applies the In predicate on the "protein" field.

func ProteinIsNil

func ProteinIsNil() predicate.Nutrition

ProteinIsNil applies the IsNil predicate on the "protein" field.

func ProteinLT

func ProteinLT(v int) predicate.Nutrition

ProteinLT applies the LT predicate on the "protein" field.

func ProteinLTE

func ProteinLTE(v int) predicate.Nutrition

ProteinLTE applies the LTE predicate on the "protein" field.

func ProteinNEQ

func ProteinNEQ(v int) predicate.Nutrition

ProteinNEQ applies the NEQ predicate on the "protein" field.

func ProteinNotIn

func ProteinNotIn(vs ...int) predicate.Nutrition

ProteinNotIn applies the NotIn predicate on the "protein" field.

func ProteinNotNil

func ProteinNotNil() predicate.Nutrition

ProteinNotNil applies the NotNil predicate on the "protein" 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 Nutrition queries.

func ByCalories

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

ByCalories orders the results by the calories field.

func ByCarbs

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

ByCarbs orders the results by the carbs field.

func ByFat

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

ByFat orders the results by the fat field.

func ByID

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

ByID orders the results by the id field.

func ByPrecision

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

ByPrecision orders the results by the precision field.

func ByProtein

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

ByProtein orders the results by the protein field.

func ByRecipeField

func ByRecipeField(field string, opts ...sql.OrderTermOption) OrderOption

ByRecipeField orders the results by recipe field.

Jump to

Keyboard shortcuts

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