todo

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the todo type in the database.
	Label = "todo"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldCreatedAt holds the string denoting the created_at field in the database.
	FieldCreatedAt = "created_at"
	// FieldStatus holds the string denoting the status field in the database.
	FieldStatus = "status"
	// FieldPriority holds the string denoting the priority field in the database.
	FieldPriority = "priority"
	// FieldText holds the string denoting the text field in the database.
	FieldText = "text"
	// FieldBlob holds the string denoting the blob field in the database.
	FieldBlob = "blob"
	// EdgeParent holds the string denoting the parent edge name in mutations.
	EdgeParent = "parent"
	// EdgeChildren holds the string denoting the children edge name in mutations.
	EdgeChildren = "children"
	// EdgeCategory holds the string denoting the category edge name in mutations.
	EdgeCategory = "category"
	// EdgeSecret holds the string denoting the secret edge name in mutations.
	EdgeSecret = "secret"
	// Table holds the table name of the todo in the database.
	Table = "todos"
	// ParentTable is the table that holds the parent relation/edge.
	ParentTable = "todos"
	// ParentColumn is the table column denoting the parent relation/edge.
	ParentColumn = "todo_children"
	// ChildrenTable is the table that holds the children relation/edge.
	ChildrenTable = "todos"
	// ChildrenColumn is the table column denoting the children relation/edge.
	ChildrenColumn = "todo_children"
	// CategoryTable is the table that holds the category relation/edge.
	CategoryTable = "todos"
	// CategoryInverseTable is the table name for the Category entity.
	// It exists in this package in order to avoid circular dependency with the "category" package.
	CategoryInverseTable = "categories"
	// CategoryColumn is the table column denoting the category relation/edge.
	CategoryColumn = "category_todos"
	// SecretTable is the table that holds the secret relation/edge.
	SecretTable = "todos"
	// SecretInverseTable is the table name for the VerySecret entity.
	// It exists in this package in order to avoid circular dependency with the "verysecret" package.
	SecretInverseTable = "very_secrets"
	// SecretColumn is the table column denoting the secret relation/edge.
	SecretColumn = "todo_secret"
)

Variables

View Source
var (
	// DefaultCreatedAt holds the default value on creation for the "created_at" field.
	DefaultCreatedAt func() time.Time
	// DefaultPriority holds the default value on creation for the "priority" field.
	DefaultPriority int
	// TextValidator is a validator for the "text" field. It is called by the builders before save.
	TextValidator func(string) error
)

Columns holds all SQL columns for todo fields.

View Source
var ForeignKeys = []string{
	"category_todos",
	"todo_children",
	"todo_secret",
}

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

Functions

func And

func And(predicates ...predicate.Todo) predicate.Todo

And groups predicates with the AND operator between them.

func Blob

func Blob(v []byte) predicate.Todo

Blob applies equality check predicate on the "blob" field. It's identical to BlobEQ.

func BlobEQ

func BlobEQ(v []byte) predicate.Todo

BlobEQ applies the EQ predicate on the "blob" field.

func BlobGT

func BlobGT(v []byte) predicate.Todo

BlobGT applies the GT predicate on the "blob" field.

func BlobGTE

func BlobGTE(v []byte) predicate.Todo

BlobGTE applies the GTE predicate on the "blob" field.

func BlobIn

func BlobIn(vs ...[]byte) predicate.Todo

BlobIn applies the In predicate on the "blob" field.

func BlobIsNil

func BlobIsNil() predicate.Todo

BlobIsNil applies the IsNil predicate on the "blob" field.

func BlobLT

func BlobLT(v []byte) predicate.Todo

BlobLT applies the LT predicate on the "blob" field.

func BlobLTE

func BlobLTE(v []byte) predicate.Todo

BlobLTE applies the LTE predicate on the "blob" field.

func BlobNEQ

func BlobNEQ(v []byte) predicate.Todo

BlobNEQ applies the NEQ predicate on the "blob" field.

func BlobNotIn

func BlobNotIn(vs ...[]byte) predicate.Todo

BlobNotIn applies the NotIn predicate on the "blob" field.

func BlobNotNil

func BlobNotNil() predicate.Todo

BlobNotNil applies the NotNil predicate on the "blob" field.

func CreatedAt

func CreatedAt(v time.Time) predicate.Todo

CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Todo

CreatedAtEQ applies the EQ predicate on the "created_at" field.

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Todo

CreatedAtGT applies the GT predicate on the "created_at" field.

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Todo

CreatedAtGTE applies the GTE predicate on the "created_at" field.

func CreatedAtIn

func CreatedAtIn(vs ...time.Time) predicate.Todo

CreatedAtIn applies the In predicate on the "created_at" field.

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Todo

CreatedAtLT applies the LT predicate on the "created_at" field.

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Todo

CreatedAtLTE applies the LTE predicate on the "created_at" field.

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Todo

CreatedAtNEQ applies the NEQ predicate on the "created_at" field.

func CreatedAtNotIn

func CreatedAtNotIn(vs ...time.Time) predicate.Todo

CreatedAtNotIn applies the NotIn predicate on the "created_at" field.

func HasCategory

func HasCategory() predicate.Todo

HasCategory applies the HasEdge predicate on the "category" edge.

func HasCategoryWith

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

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

func HasChildren

func HasChildren() predicate.Todo

HasChildren applies the HasEdge predicate on the "children" edge.

func HasChildrenWith

func HasChildrenWith(preds ...predicate.Todo) predicate.Todo

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

func HasParent

func HasParent() predicate.Todo

HasParent applies the HasEdge predicate on the "parent" edge.

func HasParentWith

func HasParentWith(preds ...predicate.Todo) predicate.Todo

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

func HasSecret

func HasSecret() predicate.Todo

HasSecret applies the HasEdge predicate on the "secret" edge.

func HasSecretWith

func HasSecretWith(preds ...predicate.VerySecret) predicate.Todo

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

func ID

func ID(id int) predicate.Todo

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Todo

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Todo

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Todo

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...int) predicate.Todo

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Todo

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Todo

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Todo

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...int) predicate.Todo

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

Or groups predicates with the OR operator between them.

func Priority

func Priority(v int) predicate.Todo

Priority applies equality check predicate on the "priority" field. It's identical to PriorityEQ.

func PriorityEQ

func PriorityEQ(v int) predicate.Todo

PriorityEQ applies the EQ predicate on the "priority" field.

func PriorityGT

func PriorityGT(v int) predicate.Todo

PriorityGT applies the GT predicate on the "priority" field.

func PriorityGTE

func PriorityGTE(v int) predicate.Todo

PriorityGTE applies the GTE predicate on the "priority" field.

func PriorityIn

func PriorityIn(vs ...int) predicate.Todo

PriorityIn applies the In predicate on the "priority" field.

func PriorityLT

func PriorityLT(v int) predicate.Todo

PriorityLT applies the LT predicate on the "priority" field.

func PriorityLTE

func PriorityLTE(v int) predicate.Todo

PriorityLTE applies the LTE predicate on the "priority" field.

func PriorityNEQ

func PriorityNEQ(v int) predicate.Todo

PriorityNEQ applies the NEQ predicate on the "priority" field.

func PriorityNotIn

func PriorityNotIn(vs ...int) predicate.Todo

PriorityNotIn applies the NotIn predicate on the "priority" field.

func StatusEQ

func StatusEQ(v Status) predicate.Todo

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

func StatusIn

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

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

func StatusNEQ

func StatusNEQ(v Status) predicate.Todo

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

func StatusNotIn

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

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 Text

func Text(v string) predicate.Todo

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

func TextContains

func TextContains(v string) predicate.Todo

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

func TextContainsFold

func TextContainsFold(v string) predicate.Todo

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

func TextEQ

func TextEQ(v string) predicate.Todo

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

func TextEqualFold

func TextEqualFold(v string) predicate.Todo

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

func TextGT

func TextGT(v string) predicate.Todo

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

func TextGTE

func TextGTE(v string) predicate.Todo

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

func TextHasPrefix

func TextHasPrefix(v string) predicate.Todo

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

func TextHasSuffix

func TextHasSuffix(v string) predicate.Todo

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

func TextIn

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

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

func TextLT

func TextLT(v string) predicate.Todo

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

func TextLTE

func TextLTE(v string) predicate.Todo

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

func TextNEQ

func TextNEQ(v string) predicate.Todo

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

func TextNotIn

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

TextNotIn applies the NotIn predicate on the "text" 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 Todo queries.

func ByCategoryField added in v0.4.0

func ByCategoryField(field string, opts ...sql.OrderTermOption) OrderOption

ByCategoryField orders the results by category field.

func ByChildren added in v0.4.0

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

ByChildren orders the results by children terms.

func ByChildrenCount added in v0.4.0

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

ByChildrenCount orders the results by children count.

func ByCreatedAt added in v0.4.0

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

ByCreatedAt orders the results by the created_at field.

func ByID added in v0.4.0

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

ByID orders the results by the id field.

func ByParentField added in v0.4.0

func ByParentField(field string, opts ...sql.OrderTermOption) OrderOption

ByParentField orders the results by parent field.

func ByPriority added in v0.4.0

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

ByPriority orders the results by the priority field.

func BySecretField added in v0.4.0

func BySecretField(field string, opts ...sql.OrderTermOption) OrderOption

BySecretField orders the results by secret field.

func ByStatus added in v0.4.0

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

ByStatus orders the results by the status field.

func ByText added in v0.4.0

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

ByText orders the results by the text field.

type Status

type Status string

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

const (
	StatusInProgress Status = "IN_PROGRESS"
	StatusCompleted  Status = "COMPLETED"
)

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