test

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2022 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the test type in the database.
	Label = "test"
	// 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"
	// FieldPublished holds the string denoting the published field in the database.
	FieldPublished = "published"
	// FieldAvailableLocales holds the string denoting the available_locales field in the database.
	FieldAvailableLocales = "available_locales"
	// FieldMark holds the string denoting the mark field in the database.
	FieldMark = "mark"
	// FieldDuration holds the string denoting the duration field in the database.
	FieldDuration = "duration"
	// FieldQuestionCount holds the string denoting the question_count field in the database.
	FieldQuestionCount = "question_count"
	// EdgeTakes holds the string denoting the takes edge name in mutations.
	EdgeTakes = "takes"
	// EdgeQuestions holds the string denoting the questions edge name in mutations.
	EdgeQuestions = "questions"
	// EdgeTranslations holds the string denoting the translations edge name in mutations.
	EdgeTranslations = "translations"
	// EdgeScales holds the string denoting the scales edge name in mutations.
	EdgeScales = "scales"
	// EdgeDisplay holds the string denoting the display edge name in mutations.
	EdgeDisplay = "display"
	// EdgeTags holds the string denoting the tags edge name in mutations.
	EdgeTags = "tags"
	// Table holds the table name of the test in the database.
	Table = "tests"
	// TakesTable is the table that holds the takes relation/edge.
	TakesTable = "takes"
	// TakesInverseTable is the table name for the Take entity.
	// It exists in this package in order to avoid circular dependency with the "take" package.
	TakesInverseTable = "takes"
	// TakesColumn is the table column denoting the takes relation/edge.
	TakesColumn = "test_takes"
	// QuestionsTable is the table that holds the questions relation/edge. The primary key declared below.
	QuestionsTable = "test_questions"
	// QuestionsInverseTable is the table name for the Question entity.
	// It exists in this package in order to avoid circular dependency with the "question" package.
	QuestionsInverseTable = "questions"
	// TranslationsTable is the table that holds the translations relation/edge.
	TranslationsTable = "test_translations"
	// TranslationsInverseTable is the table name for the TestTranslation entity.
	// It exists in this package in order to avoid circular dependency with the "testtranslation" package.
	TranslationsInverseTable = "test_translations"
	// TranslationsColumn is the table column denoting the translations relation/edge.
	TranslationsColumn = "test_translations"
	// ScalesTable is the table that holds the scales relation/edge. The primary key declared below.
	ScalesTable = "test_scales"
	// ScalesInverseTable is the table name for the Scale entity.
	// It exists in this package in order to avoid circular dependency with the "scale" package.
	ScalesInverseTable = "scales"
	// DisplayTable is the table that holds the display relation/edge.
	DisplayTable = "test_displays"
	// DisplayInverseTable is the table name for the TestDisplay entity.
	// It exists in this package in order to avoid circular dependency with the "testdisplay" package.
	DisplayInverseTable = "test_displays"
	// DisplayColumn is the table column denoting the display relation/edge.
	DisplayColumn = "test_display"
	// TagsTable is the table that holds the tags relation/edge. The primary key declared below.
	TagsTable = "test_tags"
	// TagsInverseTable is the table name for the Tag entity.
	// It exists in this package in order to avoid circular dependency with the "tag" package.
	TagsInverseTable = "tags"
)

Variables

View Source
var (
	// QuestionsPrimaryKey and QuestionsColumn2 are the table columns denoting the
	// primary key for the questions relation (M2M).
	QuestionsPrimaryKey = []string{"test_id", "question_id"}
	// ScalesPrimaryKey and ScalesColumn2 are the table columns denoting the
	// primary key for the scales relation (M2M).
	ScalesPrimaryKey = []string{"test_id", "scale_id"}
	// TagsPrimaryKey and TagsColumn2 are the table columns denoting the
	// primary key for the tags relation (M2M).
	TagsPrimaryKey = []string{"test_id", "tag_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
	// DefaultPublished holds the default value on creation for the "published" field.
	DefaultPublished bool
	// DefaultMark holds the default value on creation for the "mark" field.
	DefaultMark float64
	// DefaultQuestionCount holds the default value on creation for the "question_count" field.
	DefaultQuestionCount int
	// QuestionCountValidator is a validator for the "question_count" field. It is called by the builders before save.
	QuestionCountValidator func(int) error
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() uuid.UUID
)

Columns holds all SQL columns for test fields.

Functions

func And

func And(predicates ...predicate.Test) predicate.Test

And groups predicates with the AND operator between them.

func AvailableLocalesIsNil

func AvailableLocalesIsNil() predicate.Test

AvailableLocalesIsNil applies the IsNil predicate on the "available_locales" field.

func AvailableLocalesNotNil

func AvailableLocalesNotNil() predicate.Test

AvailableLocalesNotNil applies the NotNil predicate on the "available_locales" field.

func Code

func Code(v string) predicate.Test

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

func CodeContains

func CodeContains(v string) predicate.Test

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

func CodeContainsFold

func CodeContainsFold(v string) predicate.Test

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

func CodeEQ

func CodeEQ(v string) predicate.Test

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

func CodeEqualFold

func CodeEqualFold(v string) predicate.Test

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

func CodeGT

func CodeGT(v string) predicate.Test

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

func CodeGTE

func CodeGTE(v string) predicate.Test

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

func CodeHasPrefix

func CodeHasPrefix(v string) predicate.Test

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

func CodeHasSuffix

func CodeHasSuffix(v string) predicate.Test

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

func CodeIn

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

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

func CodeLT

func CodeLT(v string) predicate.Test

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

func CodeLTE

func CodeLTE(v string) predicate.Test

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

func CodeNEQ

func CodeNEQ(v string) predicate.Test

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

func CodeNotIn

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

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

func CreateTime

func CreateTime(v time.Time) predicate.Test

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

func CreateTimeEQ

func CreateTimeEQ(v time.Time) predicate.Test

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

func CreateTimeGT

func CreateTimeGT(v time.Time) predicate.Test

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

func CreateTimeGTE

func CreateTimeGTE(v time.Time) predicate.Test

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

func CreateTimeIn

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

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

func CreateTimeLT

func CreateTimeLT(v time.Time) predicate.Test

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

func CreateTimeLTE

func CreateTimeLTE(v time.Time) predicate.Test

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

func CreateTimeNEQ

func CreateTimeNEQ(v time.Time) predicate.Test

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

func CreateTimeNotIn

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

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

func Duration

func Duration(v time.Duration) predicate.Test

Duration applies equality check predicate on the "duration" field. It's identical to DurationEQ.

func DurationEQ

func DurationEQ(v time.Duration) predicate.Test

DurationEQ applies the EQ predicate on the "duration" field.

func DurationGT

func DurationGT(v time.Duration) predicate.Test

DurationGT applies the GT predicate on the "duration" field.

func DurationGTE

func DurationGTE(v time.Duration) predicate.Test

DurationGTE applies the GTE predicate on the "duration" field.

func DurationIn

func DurationIn(vs ...time.Duration) predicate.Test

DurationIn applies the In predicate on the "duration" field.

func DurationIsNil

func DurationIsNil() predicate.Test

DurationIsNil applies the IsNil predicate on the "duration" field.

func DurationLT

func DurationLT(v time.Duration) predicate.Test

DurationLT applies the LT predicate on the "duration" field.

func DurationLTE

func DurationLTE(v time.Duration) predicate.Test

DurationLTE applies the LTE predicate on the "duration" field.

func DurationNEQ

func DurationNEQ(v time.Duration) predicate.Test

DurationNEQ applies the NEQ predicate on the "duration" field.

func DurationNotIn

func DurationNotIn(vs ...time.Duration) predicate.Test

DurationNotIn applies the NotIn predicate on the "duration" field.

func DurationNotNil

func DurationNotNil() predicate.Test

DurationNotNil applies the NotNil predicate on the "duration" field.

func HasDisplay

func HasDisplay() predicate.Test

HasDisplay applies the HasEdge predicate on the "display" edge.

func HasDisplayWith

func HasDisplayWith(preds ...predicate.TestDisplay) predicate.Test

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

func HasQuestions

func HasQuestions() predicate.Test

HasQuestions applies the HasEdge predicate on the "questions" edge.

func HasQuestionsWith

func HasQuestionsWith(preds ...predicate.Question) predicate.Test

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

func HasScales

func HasScales() predicate.Test

HasScales applies the HasEdge predicate on the "scales" edge.

func HasScalesWith

func HasScalesWith(preds ...predicate.Scale) predicate.Test

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

func HasTags

func HasTags() predicate.Test

HasTags applies the HasEdge predicate on the "tags" edge.

func HasTagsWith

func HasTagsWith(preds ...predicate.Tag) predicate.Test

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

func HasTakes

func HasTakes() predicate.Test

HasTakes applies the HasEdge predicate on the "takes" edge.

func HasTakesWith

func HasTakesWith(preds ...predicate.Take) predicate.Test

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

func HasTranslations

func HasTranslations() predicate.Test

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

func HasTranslationsWith

func HasTranslationsWith(preds ...predicate.TestTranslation) predicate.Test

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

func ID

func ID(id uuid.UUID) predicate.Test

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id uuid.UUID) predicate.Test

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id uuid.UUID) predicate.Test

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id uuid.UUID) predicate.Test

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id uuid.UUID) predicate.Test

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id uuid.UUID) predicate.Test

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id uuid.UUID) predicate.Test

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...uuid.UUID) predicate.Test

IDNotIn applies the NotIn predicate on the ID field.

func Mark

func Mark(v float64) predicate.Test

Mark applies equality check predicate on the "mark" field. It's identical to MarkEQ.

func MarkEQ

func MarkEQ(v float64) predicate.Test

MarkEQ applies the EQ predicate on the "mark" field.

func MarkGT

func MarkGT(v float64) predicate.Test

MarkGT applies the GT predicate on the "mark" field.

func MarkGTE

func MarkGTE(v float64) predicate.Test

MarkGTE applies the GTE predicate on the "mark" field.

func MarkIn

func MarkIn(vs ...float64) predicate.Test

MarkIn applies the In predicate on the "mark" field.

func MarkLT

func MarkLT(v float64) predicate.Test

MarkLT applies the LT predicate on the "mark" field.

func MarkLTE

func MarkLTE(v float64) predicate.Test

MarkLTE applies the LTE predicate on the "mark" field.

func MarkNEQ

func MarkNEQ(v float64) predicate.Test

MarkNEQ applies the NEQ predicate on the "mark" field.

func MarkNotIn

func MarkNotIn(vs ...float64) predicate.Test

MarkNotIn applies the NotIn predicate on the "mark" field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Test) predicate.Test

Or groups predicates with the OR operator between them.

func Published

func Published(v bool) predicate.Test

Published applies equality check predicate on the "published" field. It's identical to PublishedEQ.

func PublishedEQ

func PublishedEQ(v bool) predicate.Test

PublishedEQ applies the EQ predicate on the "published" field.

func PublishedNEQ

func PublishedNEQ(v bool) predicate.Test

PublishedNEQ applies the NEQ predicate on the "published" field.

func QuestionCount

func QuestionCount(v int) predicate.Test

QuestionCount applies equality check predicate on the "question_count" field. It's identical to QuestionCountEQ.

func QuestionCountEQ

func QuestionCountEQ(v int) predicate.Test

QuestionCountEQ applies the EQ predicate on the "question_count" field.

func QuestionCountGT

func QuestionCountGT(v int) predicate.Test

QuestionCountGT applies the GT predicate on the "question_count" field.

func QuestionCountGTE

func QuestionCountGTE(v int) predicate.Test

QuestionCountGTE applies the GTE predicate on the "question_count" field.

func QuestionCountIn

func QuestionCountIn(vs ...int) predicate.Test

QuestionCountIn applies the In predicate on the "question_count" field.

func QuestionCountLT

func QuestionCountLT(v int) predicate.Test

QuestionCountLT applies the LT predicate on the "question_count" field.

func QuestionCountLTE

func QuestionCountLTE(v int) predicate.Test

QuestionCountLTE applies the LTE predicate on the "question_count" field.

func QuestionCountNEQ

func QuestionCountNEQ(v int) predicate.Test

QuestionCountNEQ applies the NEQ predicate on the "question_count" field.

func QuestionCountNotIn

func QuestionCountNotIn(vs ...int) predicate.Test

QuestionCountNotIn applies the NotIn predicate on the "question_count" field.

func UpdateTime

func UpdateTime(v time.Time) predicate.Test

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

func UpdateTimeEQ

func UpdateTimeEQ(v time.Time) predicate.Test

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

func UpdateTimeGT

func UpdateTimeGT(v time.Time) predicate.Test

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

func UpdateTimeGTE

func UpdateTimeGTE(v time.Time) predicate.Test

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

func UpdateTimeIn

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

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

func UpdateTimeLT

func UpdateTimeLT(v time.Time) predicate.Test

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

func UpdateTimeLTE

func UpdateTimeLTE(v time.Time) predicate.Test

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

func UpdateTimeNEQ

func UpdateTimeNEQ(v time.Time) predicate.Test

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

func UpdateTimeNotIn

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

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