item

package
v1.1.7 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2023 License: AGPL-3.0 Imports: 5 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"
	// FieldCreateTime holds the string denoting the create_time field in the database.
	FieldCreateTime = "create_time"
	// FieldUpdateTime holds the string denoting the update_time field in the database.
	FieldUpdateTime = "update_time"
	// FieldCode holds the string denoting the code field in the database.
	FieldCode = "code"
	// FieldSteps holds the string denoting the steps field in the database.
	FieldSteps = "steps"
	// EdgeResponses holds the string denoting the responses edge name in mutations.
	EdgeResponses = "responses"
	// EdgeTranslations holds the string denoting the translations edge name in mutations.
	EdgeTranslations = "translations"
	// EdgeScale holds the string denoting the scale edge name in mutations.
	EdgeScale = "scale"
	// EdgeQuestion holds the string denoting the question edge name in mutations.
	EdgeQuestion = "question"
	// EdgeScaleItem holds the string denoting the scale_item edge name in mutations.
	EdgeScaleItem = "scale_item"
	// Table holds the table name of the item in the database.
	Table = "items"
	// ResponsesTable is the table that holds the responses relation/edge.
	ResponsesTable = "responses"
	// ResponsesInverseTable is the table name for the Response entity.
	// It exists in this package in order to avoid circular dependency with the "response" package.
	ResponsesInverseTable = "responses"
	// ResponsesColumn is the table column denoting the responses relation/edge.
	ResponsesColumn = "item_responses"
	// TranslationsTable is the table that holds the translations relation/edge.
	TranslationsTable = "item_translations"
	// TranslationsInverseTable is the table name for the ItemTranslation entity.
	// It exists in this package in order to avoid circular dependency with the "itemtranslation" package.
	TranslationsInverseTable = "item_translations"
	// TranslationsColumn is the table column denoting the translations relation/edge.
	TranslationsColumn = "item_translations"
	// ScaleTable is the table that holds the scale relation/edge. The primary key declared below.
	ScaleTable = "scale_items"
	// ScaleInverseTable is the table name for the Scale entity.
	// It exists in this package in order to avoid circular dependency with the "scale" package.
	ScaleInverseTable = "scales"
	// QuestionTable is the table that holds the question relation/edge. The primary key declared below.
	QuestionTable = "question_items"
	// QuestionInverseTable is the table name for the Question entity.
	// It exists in this package in order to avoid circular dependency with the "question" package.
	QuestionInverseTable = "questions"
	// ScaleItemTable is the table that holds the scale_item relation/edge.
	ScaleItemTable = "scale_items"
	// ScaleItemInverseTable is the table name for the ScaleItem entity.
	// It exists in this package in order to avoid circular dependency with the "scaleitem" package.
	ScaleItemInverseTable = "scale_items"
	// ScaleItemColumn is the table column denoting the scale_item relation/edge.
	ScaleItemColumn = "item_id"
)

Variables

View Source
var (
	// ScalePrimaryKey and ScaleColumn2 are the table columns denoting the
	// primary key for the scale relation (M2M).
	ScalePrimaryKey = []string{"scale_id", "item_id"}
	// QuestionPrimaryKey and QuestionColumn2 are the table columns denoting the
	// primary key for the question relation (M2M).
	QuestionPrimaryKey = []string{"question_id", "item_id"}
)
View Source
var (
	// DefaultCreateTime holds the default value on creation for the "create_time" field.
	DefaultCreateTime func() time.Time
	// DefaultUpdateTime holds the default value on creation for the "update_time" field.
	DefaultUpdateTime func() time.Time
	// UpdateDefaultUpdateTime holds the default value on update for the "update_time" field.
	UpdateDefaultUpdateTime func() time.Time
	// CodeValidator is a validator for the "code" field. It is called by the builders before save.
	CodeValidator func(string) error
	// DefaultSteps holds the default value on creation for the "steps" field.
	DefaultSteps int
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() uuid.UUID
)

Columns holds all SQL columns for item fields.

Functions

func And

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

And groups predicates with the AND operator between them.

func Code

func Code(v string) predicate.Item

Code applies equality check predicate on the "code" field. It's identical to CodeEQ.

func CodeContains

func CodeContains(v string) predicate.Item

CodeContains applies the Contains predicate on the "code" field.

func CodeContainsFold

func CodeContainsFold(v string) predicate.Item

CodeContainsFold applies the ContainsFold predicate on the "code" field.

func CodeEQ

func CodeEQ(v string) predicate.Item

CodeEQ applies the EQ predicate on the "code" field.

func CodeEqualFold

func CodeEqualFold(v string) predicate.Item

CodeEqualFold applies the EqualFold predicate on the "code" field.

func CodeGT

func CodeGT(v string) predicate.Item

CodeGT applies the GT predicate on the "code" field.

func CodeGTE

func CodeGTE(v string) predicate.Item

CodeGTE applies the GTE predicate on the "code" field.

func CodeHasPrefix

func CodeHasPrefix(v string) predicate.Item

CodeHasPrefix applies the HasPrefix predicate on the "code" field.

func CodeHasSuffix

func CodeHasSuffix(v string) predicate.Item

CodeHasSuffix applies the HasSuffix predicate on the "code" field.

func CodeIn

func CodeIn(vs ...string) predicate.Item

CodeIn applies the In predicate on the "code" field.

func CodeLT

func CodeLT(v string) predicate.Item

CodeLT applies the LT predicate on the "code" field.

func CodeLTE

func CodeLTE(v string) predicate.Item

CodeLTE applies the LTE predicate on the "code" field.

func CodeNEQ

func CodeNEQ(v string) predicate.Item

CodeNEQ applies the NEQ predicate on the "code" field.

func CodeNotIn

func CodeNotIn(vs ...string) predicate.Item

CodeNotIn applies the NotIn predicate on the "code" field.

func CreateTime

func CreateTime(v time.Time) predicate.Item

CreateTime applies equality check predicate on the "create_time" field. It's identical to CreateTimeEQ.

func CreateTimeEQ

func CreateTimeEQ(v time.Time) predicate.Item

CreateTimeEQ applies the EQ predicate on the "create_time" field.

func CreateTimeGT

func CreateTimeGT(v time.Time) predicate.Item

CreateTimeGT applies the GT predicate on the "create_time" field.

func CreateTimeGTE

func CreateTimeGTE(v time.Time) predicate.Item

CreateTimeGTE applies the GTE predicate on the "create_time" field.

func CreateTimeIn

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

CreateTimeIn applies the In predicate on the "create_time" field.

func CreateTimeLT

func CreateTimeLT(v time.Time) predicate.Item

CreateTimeLT applies the LT predicate on the "create_time" field.

func CreateTimeLTE

func CreateTimeLTE(v time.Time) predicate.Item

CreateTimeLTE applies the LTE predicate on the "create_time" field.

func CreateTimeNEQ

func CreateTimeNEQ(v time.Time) predicate.Item

CreateTimeNEQ applies the NEQ predicate on the "create_time" field.

func CreateTimeNotIn

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

CreateTimeNotIn applies the NotIn predicate on the "create_time" field.

func HasQuestion

func HasQuestion() predicate.Item

HasQuestion applies the HasEdge predicate on the "question" edge.

func HasQuestionWith

func HasQuestionWith(preds ...predicate.Question) predicate.Item

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

func HasResponses

func HasResponses() predicate.Item

HasResponses applies the HasEdge predicate on the "responses" edge.

func HasResponsesWith

func HasResponsesWith(preds ...predicate.Response) predicate.Item

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

func HasScale

func HasScale() predicate.Item

HasScale applies the HasEdge predicate on the "scale" edge.

func HasScaleItem

func HasScaleItem() predicate.Item

HasScaleItem applies the HasEdge predicate on the "scale_item" edge.

func HasScaleItemWith

func HasScaleItemWith(preds ...predicate.ScaleItem) predicate.Item

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

func HasScaleWith

func HasScaleWith(preds ...predicate.Scale) predicate.Item

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

func HasTranslations

func HasTranslations() predicate.Item

HasTranslations applies the HasEdge predicate on the "translations" edge.

func HasTranslationsWith

func HasTranslationsWith(preds ...predicate.ItemTranslation) predicate.Item

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

func ID

func ID(id uuid.UUID) predicate.Item

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id uuid.UUID) predicate.Item

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id uuid.UUID) predicate.Item

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id uuid.UUID) predicate.Item

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...uuid.UUID) predicate.Item

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id uuid.UUID) predicate.Item

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id uuid.UUID) predicate.Item

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id uuid.UUID) predicate.Item

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...uuid.UUID) 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 Steps

func Steps(v int) predicate.Item

Steps applies equality check predicate on the "steps" field. It's identical to StepsEQ.

func StepsEQ

func StepsEQ(v int) predicate.Item

StepsEQ applies the EQ predicate on the "steps" field.

func StepsGT

func StepsGT(v int) predicate.Item

StepsGT applies the GT predicate on the "steps" field.

func StepsGTE

func StepsGTE(v int) predicate.Item

StepsGTE applies the GTE predicate on the "steps" field.

func StepsIn

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

StepsIn applies the In predicate on the "steps" field.

func StepsLT

func StepsLT(v int) predicate.Item

StepsLT applies the LT predicate on the "steps" field.

func StepsLTE

func StepsLTE(v int) predicate.Item

StepsLTE applies the LTE predicate on the "steps" field.

func StepsNEQ

func StepsNEQ(v int) predicate.Item

StepsNEQ applies the NEQ predicate on the "steps" field.

func StepsNotIn

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

StepsNotIn applies the NotIn predicate on the "steps" field.

func UpdateTime

func UpdateTime(v time.Time) predicate.Item

UpdateTime applies equality check predicate on the "update_time" field. It's identical to UpdateTimeEQ.

func UpdateTimeEQ

func UpdateTimeEQ(v time.Time) predicate.Item

UpdateTimeEQ applies the EQ predicate on the "update_time" field.

func UpdateTimeGT

func UpdateTimeGT(v time.Time) predicate.Item

UpdateTimeGT applies the GT predicate on the "update_time" field.

func UpdateTimeGTE

func UpdateTimeGTE(v time.Time) predicate.Item

UpdateTimeGTE applies the GTE predicate on the "update_time" field.

func UpdateTimeIn

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

UpdateTimeIn applies the In predicate on the "update_time" field.

func UpdateTimeLT

func UpdateTimeLT(v time.Time) predicate.Item

UpdateTimeLT applies the LT predicate on the "update_time" field.

func UpdateTimeLTE

func UpdateTimeLTE(v time.Time) predicate.Item

UpdateTimeLTE applies the LTE predicate on the "update_time" field.

func UpdateTimeNEQ

func UpdateTimeNEQ(v time.Time) predicate.Item

UpdateTimeNEQ applies the NEQ predicate on the "update_time" field.

func UpdateTimeNotIn

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

UpdateTimeNotIn applies the NotIn predicate on the "update_time" 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