category

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the category type in the database.
	Label = "category"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldText holds the string denoting the text field in the database.
	FieldText = "text"
	// FieldStatus holds the string denoting the status field in the database.
	FieldStatus = "status"
	// FieldConfig holds the string denoting the config field in the database.
	FieldConfig = "config"
	// FieldTypes holds the string denoting the types field in the database.
	FieldTypes = "types"
	// FieldDuration holds the string denoting the duration field in the database.
	FieldDuration = "duration"
	// FieldCount holds the string denoting the count field in the database.
	FieldCount = "count"
	// FieldStrings holds the string denoting the strings field in the database.
	FieldStrings = "strings"
	// EdgeTodos holds the string denoting the todos edge name in mutations.
	EdgeTodos = "todos"
	// EdgeSubCategories holds the string denoting the sub_categories edge name in mutations.
	EdgeSubCategories = "sub_categories"
	// Table holds the table name of the category in the database.
	Table = "categories"
	// TodosTable is the table that holds the todos relation/edge.
	TodosTable = "todos"
	// TodosInverseTable is the table name for the Todo entity.
	// It exists in this package in order to avoid circular dependency with the "todo" package.
	TodosInverseTable = "todos"
	// TodosColumn is the table column denoting the todos relation/edge.
	TodosColumn = "category_id"
	// SubCategoriesTable is the table that holds the sub_categories relation/edge. The primary key declared below.
	SubCategoriesTable = "category_sub_categories"
)

Variables

View Source
var (
	// TextValidator is a validator for the "text" field. It is called by the builders before save.
	TextValidator func(string) error
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() bigintgql.BigInt
)

Columns holds all SQL columns for category fields.

View Source
var (
	// SubCategoriesPrimaryKey and SubCategoriesColumn2 are the table columns denoting the
	// primary key for the sub_categories relation (M2M).
	SubCategoriesPrimaryKey = []string{"category_id", "sub_category_id"}
)

Functions

func And

func And(predicates ...predicate.Category) predicate.Category

And groups predicates with the AND operator between them.

func Config

Config applies equality check predicate on the "config" field. It's identical to ConfigEQ.

func ConfigEQ

ConfigEQ applies the EQ predicate on the "config" field.

func ConfigGT

ConfigGT applies the GT predicate on the "config" field.

func ConfigGTE

ConfigGTE applies the GTE predicate on the "config" field.

func ConfigIn

ConfigIn applies the In predicate on the "config" field.

func ConfigIsNil

func ConfigIsNil() predicate.Category

ConfigIsNil applies the IsNil predicate on the "config" field.

func ConfigLT

ConfigLT applies the LT predicate on the "config" field.

func ConfigLTE

ConfigLTE applies the LTE predicate on the "config" field.

func ConfigNEQ

ConfigNEQ applies the NEQ predicate on the "config" field.

func ConfigNotIn

func ConfigNotIn(vs ...*schematype.CategoryConfig) predicate.Category

ConfigNotIn applies the NotIn predicate on the "config" field.

func ConfigNotNil

func ConfigNotNil() predicate.Category

ConfigNotNil applies the NotNil predicate on the "config" field.

func Count

func Count(v uint64) predicate.Category

Count applies equality check predicate on the "count" field. It's identical to CountEQ.

func CountEQ

func CountEQ(v uint64) predicate.Category

CountEQ applies the EQ predicate on the "count" field.

func CountGT

func CountGT(v uint64) predicate.Category

CountGT applies the GT predicate on the "count" field.

func CountGTE

func CountGTE(v uint64) predicate.Category

CountGTE applies the GTE predicate on the "count" field.

func CountIn

func CountIn(vs ...uint64) predicate.Category

CountIn applies the In predicate on the "count" field.

func CountIsNil

func CountIsNil() predicate.Category

CountIsNil applies the IsNil predicate on the "count" field.

func CountLT

func CountLT(v uint64) predicate.Category

CountLT applies the LT predicate on the "count" field.

func CountLTE

func CountLTE(v uint64) predicate.Category

CountLTE applies the LTE predicate on the "count" field.

func CountNEQ

func CountNEQ(v uint64) predicate.Category

CountNEQ applies the NEQ predicate on the "count" field.

func CountNotIn

func CountNotIn(vs ...uint64) predicate.Category

CountNotIn applies the NotIn predicate on the "count" field.

func CountNotNil

func CountNotNil() predicate.Category

CountNotNil applies the NotNil predicate on the "count" field.

func Duration

func Duration(v time.Duration) predicate.Category

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

func DurationEQ

func DurationEQ(v time.Duration) predicate.Category

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

func DurationGT

func DurationGT(v time.Duration) predicate.Category

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

func DurationGTE

func DurationGTE(v time.Duration) predicate.Category

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

func DurationIn

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

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

func DurationIsNil

func DurationIsNil() predicate.Category

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

func DurationLT

func DurationLT(v time.Duration) predicate.Category

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

func DurationLTE

func DurationLTE(v time.Duration) predicate.Category

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

func DurationNEQ

func DurationNEQ(v time.Duration) predicate.Category

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

func DurationNotIn

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

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

func DurationNotNil

func DurationNotNil() predicate.Category

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

func HasSubCategories added in v0.4.0

func HasSubCategories() predicate.Category

HasSubCategories applies the HasEdge predicate on the "sub_categories" edge.

func HasSubCategoriesWith added in v0.4.0

func HasSubCategoriesWith(preds ...predicate.Category) predicate.Category

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

func HasTodos

func HasTodos() predicate.Category

HasTodos applies the HasEdge predicate on the "todos" edge.

func HasTodosWith

func HasTodosWith(preds ...predicate.Todo) predicate.Category

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

func ID

ID filters vertices based on their ID field.

func IDEQ

IDEQ applies the EQ predicate on the ID field.

func IDGT

IDGT applies the GT predicate on the ID field.

func IDGTE

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...bigintgql.BigInt) predicate.Category

IDIn applies the In predicate on the ID field.

func IDLT

IDLT applies the LT predicate on the ID field.

func IDLTE

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...bigintgql.BigInt) predicate.Category

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

Or groups predicates with the OR operator between them.

func StatusEQ

func StatusEQ(v Status) predicate.Category

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

func StatusIn

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

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

func StatusNEQ

func StatusNEQ(v Status) predicate.Category

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

func StatusNotIn

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

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 StringsIsNil

func StringsIsNil() predicate.Category

StringsIsNil applies the IsNil predicate on the "strings" field.

func StringsNotNil

func StringsNotNil() predicate.Category

StringsNotNil applies the NotNil predicate on the "strings" field.

func Text

func Text(v string) predicate.Category

Text applies equality check predicate on the "text" field. It's identical to TextEQ.

func TextContains

func TextContains(v string) predicate.Category

TextContains applies the Contains predicate on the "text" field.

func TextContainsFold

func TextContainsFold(v string) predicate.Category

TextContainsFold applies the ContainsFold predicate on the "text" field.

func TextEQ

func TextEQ(v string) predicate.Category

TextEQ applies the EQ predicate on the "text" field.

func TextEqualFold

func TextEqualFold(v string) predicate.Category

TextEqualFold applies the EqualFold predicate on the "text" field.

func TextGT

func TextGT(v string) predicate.Category

TextGT applies the GT predicate on the "text" field.

func TextGTE

func TextGTE(v string) predicate.Category

TextGTE applies the GTE predicate on the "text" field.

func TextHasPrefix

func TextHasPrefix(v string) predicate.Category

TextHasPrefix applies the HasPrefix predicate on the "text" field.

func TextHasSuffix

func TextHasSuffix(v string) predicate.Category

TextHasSuffix applies the HasSuffix predicate on the "text" field.

func TextIn

func TextIn(vs ...string) predicate.Category

TextIn applies the In predicate on the "text" field.

func TextLT

func TextLT(v string) predicate.Category

TextLT applies the LT predicate on the "text" field.

func TextLTE

func TextLTE(v string) predicate.Category

TextLTE applies the LTE predicate on the "text" field.

func TextNEQ

func TextNEQ(v string) predicate.Category

TextNEQ applies the NEQ predicate on the "text" field.

func TextNotIn

func TextNotIn(vs ...string) predicate.Category

TextNotIn applies the NotIn predicate on the "text" field.

func TypesIsNil added in v0.5.0

func TypesIsNil() predicate.Category

TypesIsNil applies the IsNil predicate on the "types" field.

func TypesNotNil added in v0.5.0

func TypesNotNil() predicate.Category

TypesNotNil applies the NotNil predicate on the "types" field.

func ValidColumn

func ValidColumn(column string) bool

ValidColumn reports if the column name is valid (part of the table columns).

Types

type OrderOption added in v0.4.1

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the Category queries.

func ByConfig added in v0.4.0

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

ByConfig orders the results by the config field.

func ByCount added in v0.4.0

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

ByCount orders the results by the count field.

func ByDuration added in v0.4.0

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

ByDuration orders the results by the duration field.

func ByID added in v0.4.0

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

ByID orders the results by the id field.

func ByStatus added in v0.4.0

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

ByStatus orders the results by the status field.

func BySubCategories added in v0.4.0

func BySubCategories(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption

BySubCategories orders the results by sub_categories terms.

func BySubCategoriesCount added in v0.4.0

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

BySubCategoriesCount orders the results by sub_categories count.

func ByText added in v0.4.0

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

ByText orders the results by the text field.

func ByTodos added in v0.4.0

func ByTodos(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption

ByTodos orders the results by todos terms.

func ByTodosCount added in v0.4.0

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

ByTodosCount orders the results by todos count.

type Status

type Status string

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

const (
	StatusEnabled  Status = "ENABLED"
	StatusDisabled Status = "DISABLED"
)

Status values.

func (Status) MarshalGQL

func (e Status) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (Status) String

func (s Status) String() string

func (*Status) UnmarshalGQL

func (e *Status) UnmarshalGQL(val interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

Jump to

Keyboard shortcuts

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