question

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: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the question type in the database.
	Label = "question"
	// 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"
	// FieldOrder holds the string denoting the order field in the database.
	FieldOrder = "order"
	// FieldCode holds the string denoting the code field in the database.
	FieldCode = "code"
	// FieldType holds the string denoting the type field in the database.
	FieldType = "type"
	// EdgeItems holds the string denoting the items edge name in mutations.
	EdgeItems = "items"
	// EdgeTranslations holds the string denoting the translations edge name in mutations.
	EdgeTranslations = "translations"
	// EdgeTest holds the string denoting the test edge name in mutations.
	EdgeTest = "test"
	// Table holds the table name of the question in the database.
	Table = "questions"
	// ItemsTable is the table that holds the items relation/edge. The primary key declared below.
	ItemsTable = "question_items"
	// ItemsInverseTable is the table name for the Item entity.
	// It exists in this package in order to avoid circular dependency with the "item" package.
	ItemsInverseTable = "items"
	// TranslationsTable is the table that holds the translations relation/edge.
	TranslationsTable = "question_translations"
	// TranslationsInverseTable is the table name for the QuestionTranslation entity.
	// It exists in this package in order to avoid circular dependency with the "questiontranslation" package.
	TranslationsInverseTable = "question_translations"
	// TranslationsColumn is the table column denoting the translations relation/edge.
	TranslationsColumn = "question_translations"
	// TestTable is the table that holds the test relation/edge. The primary key declared below.
	TestTable = "test_questions"
	// TestInverseTable is the table name for the Test entity.
	// It exists in this package in order to avoid circular dependency with the "test" package.
	TestInverseTable = "tests"
)
View Source
const DefaultType = TypeSimple

TypeSimple is the default value of the Type enum.

Variables

View Source
var (
	// ItemsPrimaryKey and ItemsColumn2 are the table columns denoting the
	// primary key for the items relation (M2M).
	ItemsPrimaryKey = []string{"question_id", "item_id"}
	// TestPrimaryKey and TestColumn2 are the table columns denoting the
	// primary key for the test relation (M2M).
	TestPrimaryKey = []string{"test_id", "question_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
	// DefaultOrder holds the default value on creation for the "order" field.
	DefaultOrder int
	// CodeValidator is a validator for the "code" field. It is called by the builders before save.
	CodeValidator func(string) error
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() uuid.UUID
)

Columns holds all SQL columns for question fields.

Functions

func And

func And(predicates ...predicate.Question) predicate.Question

And groups predicates with the AND operator between them.

func Code

func Code(v string) predicate.Question

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

func CodeContains

func CodeContains(v string) predicate.Question

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

func CodeContainsFold

func CodeContainsFold(v string) predicate.Question

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

func CodeEQ

func CodeEQ(v string) predicate.Question

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

func CodeEqualFold

func CodeEqualFold(v string) predicate.Question

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

func CodeGT

func CodeGT(v string) predicate.Question

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

func CodeGTE

func CodeGTE(v string) predicate.Question

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

func CodeHasPrefix

func CodeHasPrefix(v string) predicate.Question

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

func CodeHasSuffix

func CodeHasSuffix(v string) predicate.Question

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

func CodeIn

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

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

func CodeLT

func CodeLT(v string) predicate.Question

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

func CodeLTE

func CodeLTE(v string) predicate.Question

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

func CodeNEQ

func CodeNEQ(v string) predicate.Question

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

func CodeNotIn

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

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

func CreateTime

func CreateTime(v time.Time) predicate.Question

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

func CreateTimeEQ

func CreateTimeEQ(v time.Time) predicate.Question

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

func CreateTimeGT

func CreateTimeGT(v time.Time) predicate.Question

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

func CreateTimeGTE

func CreateTimeGTE(v time.Time) predicate.Question

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

func CreateTimeIn

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

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

func CreateTimeLT

func CreateTimeLT(v time.Time) predicate.Question

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

func CreateTimeLTE

func CreateTimeLTE(v time.Time) predicate.Question

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

func CreateTimeNEQ

func CreateTimeNEQ(v time.Time) predicate.Question

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

func CreateTimeNotIn

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

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

func HasItems

func HasItems() predicate.Question

HasItems applies the HasEdge predicate on the "items" edge.

func HasItemsWith

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

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

func HasTest

func HasTest() predicate.Question

HasTest applies the HasEdge predicate on the "test" edge.

func HasTestWith

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

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

func HasTranslations

func HasTranslations() predicate.Question

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

func HasTranslationsWith

func HasTranslationsWith(preds ...predicate.QuestionTranslation) predicate.Question

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

func ID

func ID(id uuid.UUID) predicate.Question

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id uuid.UUID) predicate.Question

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id uuid.UUID) predicate.Question

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id uuid.UUID) predicate.Question

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id uuid.UUID) predicate.Question

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id uuid.UUID) predicate.Question

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id uuid.UUID) predicate.Question

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

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

Or groups predicates with the OR operator between them.

func Order

func Order(v int) predicate.Question

Order applies equality check predicate on the "order" field. It's identical to OrderEQ.

func OrderEQ

func OrderEQ(v int) predicate.Question

OrderEQ applies the EQ predicate on the "order" field.

func OrderGT

func OrderGT(v int) predicate.Question

OrderGT applies the GT predicate on the "order" field.

func OrderGTE

func OrderGTE(v int) predicate.Question

OrderGTE applies the GTE predicate on the "order" field.

func OrderIn

func OrderIn(vs ...int) predicate.Question

OrderIn applies the In predicate on the "order" field.

func OrderLT

func OrderLT(v int) predicate.Question

OrderLT applies the LT predicate on the "order" field.

func OrderLTE

func OrderLTE(v int) predicate.Question

OrderLTE applies the LTE predicate on the "order" field.

func OrderNEQ

func OrderNEQ(v int) predicate.Question

OrderNEQ applies the NEQ predicate on the "order" field.

func OrderNotIn

func OrderNotIn(vs ...int) predicate.Question

OrderNotIn applies the NotIn predicate on the "order" field.

func TypeEQ

func TypeEQ(v Type) predicate.Question

TypeEQ applies the EQ predicate on the "type" field.

func TypeIn

func TypeIn(vs ...Type) predicate.Question

TypeIn applies the In predicate on the "type" field.

func TypeNEQ

func TypeNEQ(v Type) predicate.Question

TypeNEQ applies the NEQ predicate on the "type" field.

func TypeNotIn

func TypeNotIn(vs ...Type) predicate.Question

TypeNotIn applies the NotIn predicate on the "type" field.

func TypeValidator

func TypeValidator(_type Type) error

TypeValidator is a validator for the "type" field enum values. It is called by the builders before save.

func UpdateTime

func UpdateTime(v time.Time) predicate.Question

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

func UpdateTimeEQ

func UpdateTimeEQ(v time.Time) predicate.Question

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

func UpdateTimeGT

func UpdateTimeGT(v time.Time) predicate.Question

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

func UpdateTimeGTE

func UpdateTimeGTE(v time.Time) predicate.Question

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

func UpdateTimeIn

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

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

func UpdateTimeLT

func UpdateTimeLT(v time.Time) predicate.Question

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

func UpdateTimeLTE

func UpdateTimeLTE(v time.Time) predicate.Question

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

func UpdateTimeNEQ

func UpdateTimeNEQ(v time.Time) predicate.Question

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

func UpdateTimeNotIn

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

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

type Type

type Type string

Type defines the type for the "type" enum field.

const (
	TypeSimple Type = "simple"
)

Type values.

func (Type) String

func (_type Type) String() string

Jump to

Keyboard shortcuts

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