take

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 take type in the database.
	Label = "take"
	// 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"
	// FieldSeed holds the string denoting the seed field in the database.
	FieldSeed = "seed"
	// FieldProgress holds the string denoting the progress field in the database.
	FieldProgress = "progress"
	// FieldPage holds the string denoting the page field in the database.
	FieldPage = "page"
	// FieldStartTime holds the string denoting the start_time field in the database.
	FieldStartTime = "start_time"
	// FieldEndTime holds the string denoting the end_time field in the database.
	FieldEndTime = "end_time"
	// FieldSuspicious holds the string denoting the suspicious field in the database.
	FieldSuspicious = "suspicious"
	// FieldStatus holds the string denoting the status field in the database.
	FieldStatus = "status"
	// FieldMark holds the string denoting the mark field in the database.
	FieldMark = "mark"
	// FieldInLocale holds the string denoting the in_locale field in the database.
	FieldInLocale = "in_locale"
	// FieldMeta holds the string denoting the meta field in the database.
	FieldMeta = "meta"
	// EdgeResponses holds the string denoting the responses edge name in mutations.
	EdgeResponses = "responses"
	// EdgeResults holds the string denoting the results edge name in mutations.
	EdgeResults = "results"
	// EdgeTest holds the string denoting the test edge name in mutations.
	EdgeTest = "test"
	// EdgeUser holds the string denoting the user edge name in mutations.
	EdgeUser = "user"
	// Table holds the table name of the take in the database.
	Table = "takes"
	// 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 = "take_responses"
	// ResultsTable is the table that holds the results relation/edge.
	ResultsTable = "results"
	// ResultsInverseTable is the table name for the Result entity.
	// It exists in this package in order to avoid circular dependency with the "result" package.
	ResultsInverseTable = "results"
	// ResultsColumn is the table column denoting the results relation/edge.
	ResultsColumn = "take_results"
	// TestTable is the table that holds the test relation/edge.
	TestTable = "takes"
	// 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"
	// TestColumn is the table column denoting the test relation/edge.
	TestColumn = "test_takes"
	// UserTable is the table that holds the user relation/edge.
	UserTable = "takes"
	// UserInverseTable is the table name for the User entity.
	// It exists in this package in order to avoid circular dependency with the "user" package.
	UserInverseTable = "users"
	// UserColumn is the table column denoting the user relation/edge.
	UserColumn = "user_takes"
)
View Source
const DefaultInLocale = InLocaleEn

InLocaleEn is the default value of the InLocale enum.

View Source
const DefaultStatus = StatusIntro

StatusIntro is the default value of the Status enum.

Variables

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
	// DefaultProgress holds the default value on creation for the "progress" field.
	DefaultProgress int
	// DefaultPage holds the default value on creation for the "page" field.
	DefaultPage int
	// DefaultSuspicious holds the default value on creation for the "suspicious" field.
	DefaultSuspicious bool
	// MarkValidator is a validator for the "mark" field. It is called by the builders before save.
	MarkValidator func(int) error
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() uuid.UUID
)

Columns holds all SQL columns for take fields.

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

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

Functions

func And

func And(predicates ...predicate.Take) predicate.Take

And groups predicates with the AND operator between them.

func CreateTime

func CreateTime(v time.Time) predicate.Take

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

func CreateTimeEQ

func CreateTimeEQ(v time.Time) predicate.Take

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

func CreateTimeGT

func CreateTimeGT(v time.Time) predicate.Take

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

func CreateTimeGTE

func CreateTimeGTE(v time.Time) predicate.Take

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

func CreateTimeIn

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

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

func CreateTimeLT

func CreateTimeLT(v time.Time) predicate.Take

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

func CreateTimeLTE

func CreateTimeLTE(v time.Time) predicate.Take

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

func CreateTimeNEQ

func CreateTimeNEQ(v time.Time) predicate.Take

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

func CreateTimeNotIn

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

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

func EndTime

func EndTime(v time.Time) predicate.Take

EndTime applies equality check predicate on the "end_time" field. It's identical to EndTimeEQ.

func EndTimeEQ

func EndTimeEQ(v time.Time) predicate.Take

EndTimeEQ applies the EQ predicate on the "end_time" field.

func EndTimeGT

func EndTimeGT(v time.Time) predicate.Take

EndTimeGT applies the GT predicate on the "end_time" field.

func EndTimeGTE

func EndTimeGTE(v time.Time) predicate.Take

EndTimeGTE applies the GTE predicate on the "end_time" field.

func EndTimeIn

func EndTimeIn(vs ...time.Time) predicate.Take

EndTimeIn applies the In predicate on the "end_time" field.

func EndTimeIsNil

func EndTimeIsNil() predicate.Take

EndTimeIsNil applies the IsNil predicate on the "end_time" field.

func EndTimeLT

func EndTimeLT(v time.Time) predicate.Take

EndTimeLT applies the LT predicate on the "end_time" field.

func EndTimeLTE

func EndTimeLTE(v time.Time) predicate.Take

EndTimeLTE applies the LTE predicate on the "end_time" field.

func EndTimeNEQ

func EndTimeNEQ(v time.Time) predicate.Take

EndTimeNEQ applies the NEQ predicate on the "end_time" field.

func EndTimeNotIn

func EndTimeNotIn(vs ...time.Time) predicate.Take

EndTimeNotIn applies the NotIn predicate on the "end_time" field.

func EndTimeNotNil

func EndTimeNotNil() predicate.Take

EndTimeNotNil applies the NotNil predicate on the "end_time" field.

func HasResponses

func HasResponses() predicate.Take

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

func HasResponsesWith

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

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

func HasResults

func HasResults() predicate.Take

HasResults applies the HasEdge predicate on the "results" edge.

func HasResultsWith

func HasResultsWith(preds ...predicate.Result) predicate.Take

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

func HasTest

func HasTest() predicate.Take

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

func HasTestWith

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

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

func HasUser

func HasUser() predicate.Take

HasUser applies the HasEdge predicate on the "user" edge.

func HasUserWith

func HasUserWith(preds ...predicate.User) predicate.Take

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

func ID

func ID(id uuid.UUID) predicate.Take

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id uuid.UUID) predicate.Take

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id uuid.UUID) predicate.Take

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id uuid.UUID) predicate.Take

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id uuid.UUID) predicate.Take

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id uuid.UUID) predicate.Take

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id uuid.UUID) predicate.Take

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

IDNotIn applies the NotIn predicate on the ID field.

func InLocaleEQ

func InLocaleEQ(v InLocale) predicate.Take

InLocaleEQ applies the EQ predicate on the "in_locale" field.

func InLocaleIn

func InLocaleIn(vs ...InLocale) predicate.Take

InLocaleIn applies the In predicate on the "in_locale" field.

func InLocaleNEQ

func InLocaleNEQ(v InLocale) predicate.Take

InLocaleNEQ applies the NEQ predicate on the "in_locale" field.

func InLocaleNotIn

func InLocaleNotIn(vs ...InLocale) predicate.Take

InLocaleNotIn applies the NotIn predicate on the "in_locale" field.

func InLocaleValidator

func InLocaleValidator(il InLocale) error

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

func Mark

func Mark(v int) predicate.Take

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

func MarkEQ

func MarkEQ(v int) predicate.Take

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

func MarkGT

func MarkGT(v int) predicate.Take

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

func MarkGTE

func MarkGTE(v int) predicate.Take

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

func MarkIn

func MarkIn(vs ...int) predicate.Take

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

func MarkIsNil

func MarkIsNil() predicate.Take

MarkIsNil applies the IsNil predicate on the "mark" field.

func MarkLT

func MarkLT(v int) predicate.Take

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

func MarkLTE

func MarkLTE(v int) predicate.Take

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

func MarkNEQ

func MarkNEQ(v int) predicate.Take

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

func MarkNotIn

func MarkNotIn(vs ...int) predicate.Take

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

func MarkNotNil

func MarkNotNil() predicate.Take

MarkNotNil applies the NotNil predicate on the "mark" field.

func MetaIsNil

func MetaIsNil() predicate.Take

MetaIsNil applies the IsNil predicate on the "meta" field.

func MetaNotNil

func MetaNotNil() predicate.Take

MetaNotNil applies the NotNil predicate on the "meta" field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Take) predicate.Take

Or groups predicates with the OR operator between them.

func Page

func Page(v int) predicate.Take

Page applies equality check predicate on the "page" field. It's identical to PageEQ.

func PageEQ

func PageEQ(v int) predicate.Take

PageEQ applies the EQ predicate on the "page" field.

func PageGT

func PageGT(v int) predicate.Take

PageGT applies the GT predicate on the "page" field.

func PageGTE

func PageGTE(v int) predicate.Take

PageGTE applies the GTE predicate on the "page" field.

func PageIn

func PageIn(vs ...int) predicate.Take

PageIn applies the In predicate on the "page" field.

func PageLT

func PageLT(v int) predicate.Take

PageLT applies the LT predicate on the "page" field.

func PageLTE

func PageLTE(v int) predicate.Take

PageLTE applies the LTE predicate on the "page" field.

func PageNEQ

func PageNEQ(v int) predicate.Take

PageNEQ applies the NEQ predicate on the "page" field.

func PageNotIn

func PageNotIn(vs ...int) predicate.Take

PageNotIn applies the NotIn predicate on the "page" field.

func Progress

func Progress(v int) predicate.Take

Progress applies equality check predicate on the "progress" field. It's identical to ProgressEQ.

func ProgressEQ

func ProgressEQ(v int) predicate.Take

ProgressEQ applies the EQ predicate on the "progress" field.

func ProgressGT

func ProgressGT(v int) predicate.Take

ProgressGT applies the GT predicate on the "progress" field.

func ProgressGTE

func ProgressGTE(v int) predicate.Take

ProgressGTE applies the GTE predicate on the "progress" field.

func ProgressIn

func ProgressIn(vs ...int) predicate.Take

ProgressIn applies the In predicate on the "progress" field.

func ProgressLT

func ProgressLT(v int) predicate.Take

ProgressLT applies the LT predicate on the "progress" field.

func ProgressLTE

func ProgressLTE(v int) predicate.Take

ProgressLTE applies the LTE predicate on the "progress" field.

func ProgressNEQ

func ProgressNEQ(v int) predicate.Take

ProgressNEQ applies the NEQ predicate on the "progress" field.

func ProgressNotIn

func ProgressNotIn(vs ...int) predicate.Take

ProgressNotIn applies the NotIn predicate on the "progress" field.

func Seed

func Seed(v int64) predicate.Take

Seed applies equality check predicate on the "seed" field. It's identical to SeedEQ.

func SeedEQ

func SeedEQ(v int64) predicate.Take

SeedEQ applies the EQ predicate on the "seed" field.

func SeedGT

func SeedGT(v int64) predicate.Take

SeedGT applies the GT predicate on the "seed" field.

func SeedGTE

func SeedGTE(v int64) predicate.Take

SeedGTE applies the GTE predicate on the "seed" field.

func SeedIn

func SeedIn(vs ...int64) predicate.Take

SeedIn applies the In predicate on the "seed" field.

func SeedLT

func SeedLT(v int64) predicate.Take

SeedLT applies the LT predicate on the "seed" field.

func SeedLTE

func SeedLTE(v int64) predicate.Take

SeedLTE applies the LTE predicate on the "seed" field.

func SeedNEQ

func SeedNEQ(v int64) predicate.Take

SeedNEQ applies the NEQ predicate on the "seed" field.

func SeedNotIn

func SeedNotIn(vs ...int64) predicate.Take

SeedNotIn applies the NotIn predicate on the "seed" field.

func StartTime

func StartTime(v time.Time) predicate.Take

StartTime applies equality check predicate on the "start_time" field. It's identical to StartTimeEQ.

func StartTimeEQ

func StartTimeEQ(v time.Time) predicate.Take

StartTimeEQ applies the EQ predicate on the "start_time" field.

func StartTimeGT

func StartTimeGT(v time.Time) predicate.Take

StartTimeGT applies the GT predicate on the "start_time" field.

func StartTimeGTE

func StartTimeGTE(v time.Time) predicate.Take

StartTimeGTE applies the GTE predicate on the "start_time" field.

func StartTimeIn

func StartTimeIn(vs ...time.Time) predicate.Take

StartTimeIn applies the In predicate on the "start_time" field.

func StartTimeIsNil

func StartTimeIsNil() predicate.Take

StartTimeIsNil applies the IsNil predicate on the "start_time" field.

func StartTimeLT

func StartTimeLT(v time.Time) predicate.Take

StartTimeLT applies the LT predicate on the "start_time" field.

func StartTimeLTE

func StartTimeLTE(v time.Time) predicate.Take

StartTimeLTE applies the LTE predicate on the "start_time" field.

func StartTimeNEQ

func StartTimeNEQ(v time.Time) predicate.Take

StartTimeNEQ applies the NEQ predicate on the "start_time" field.

func StartTimeNotIn

func StartTimeNotIn(vs ...time.Time) predicate.Take

StartTimeNotIn applies the NotIn predicate on the "start_time" field.

func StartTimeNotNil

func StartTimeNotNil() predicate.Take

StartTimeNotNil applies the NotNil predicate on the "start_time" field.

func StatusEQ

func StatusEQ(v Status) predicate.Take

StatusEQ applies the EQ predicate on the "status" field.

func StatusIn

func StatusIn(vs ...Status) predicate.Take

StatusIn applies the In predicate on the "status" field.

func StatusNEQ

func StatusNEQ(v Status) predicate.Take

StatusNEQ applies the NEQ predicate on the "status" field.

func StatusNotIn

func StatusNotIn(vs ...Status) predicate.Take

StatusNotIn applies the NotIn predicate on the "status" field.

func StatusValidator

func StatusValidator(s Status) error

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

func Suspicious

func Suspicious(v bool) predicate.Take

Suspicious applies equality check predicate on the "suspicious" field. It's identical to SuspiciousEQ.

func SuspiciousEQ

func SuspiciousEQ(v bool) predicate.Take

SuspiciousEQ applies the EQ predicate on the "suspicious" field.

func SuspiciousNEQ

func SuspiciousNEQ(v bool) predicate.Take

SuspiciousNEQ applies the NEQ predicate on the "suspicious" field.

func UpdateTime

func UpdateTime(v time.Time) predicate.Take

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

func UpdateTimeEQ

func UpdateTimeEQ(v time.Time) predicate.Take

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

func UpdateTimeGT

func UpdateTimeGT(v time.Time) predicate.Take

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

func UpdateTimeGTE

func UpdateTimeGTE(v time.Time) predicate.Take

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

func UpdateTimeIn

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

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

func UpdateTimeLT

func UpdateTimeLT(v time.Time) predicate.Take

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

func UpdateTimeLTE

func UpdateTimeLTE(v time.Time) predicate.Take

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

func UpdateTimeNEQ

func UpdateTimeNEQ(v time.Time) predicate.Take

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

func UpdateTimeNotIn

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

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 InLocale

type InLocale string

InLocale defines the type for the "in_locale" enum field.

const (
	InLocaleEn InLocale = "en"
	InLocaleRu InLocale = "ru"
)

InLocale values.

func (InLocale) String

func (il InLocale) String() string

type Status

type Status string

Status defines the type for the "status" enum field.

const (
	StatusIntro     Status = "intro"
	StatusQuestions Status = "questions"
	StatusFinish    Status = "finish"
	StatusResult    Status = "result"
)

Status values.

func (Status) String

func (s Status) String() string

Jump to

Keyboard shortcuts

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