todo

package
v0.0.0-...-17a5d96 Latest Latest
Warning

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

Go to latest
Published: May 18, 2023 License: MIT Imports: 8 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"
	// FieldUpdatedAt holds the string denoting the updated_at field in the database.
	FieldUpdatedAt = "updated_at"
	// 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"
	// FieldPriority holds the string denoting the priority field in the database.
	FieldPriority = "priority"
	// 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"
	// 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"
)

Variables

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

Columns holds all SQL columns for todo fields.

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

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 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 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 ID

func ID(id xid.ID) predicate.Todo

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id xid.ID) predicate.Todo

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id xid.ID) predicate.Todo

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id xid.ID) predicate.Todo

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...xid.ID) predicate.Todo

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id xid.ID) predicate.Todo

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id xid.ID) predicate.Todo

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id xid.ID) predicate.Todo

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...xid.ID) 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 UpdatedAt

func UpdatedAt(v time.Time) predicate.Todo

UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.Todo

UpdatedAtEQ applies the EQ predicate on the "updated_at" field.

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.Todo

UpdatedAtGT applies the GT predicate on the "updated_at" field.

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.Todo

UpdatedAtGTE applies the GTE predicate on the "updated_at" field.

func UpdatedAtIn

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

UpdatedAtIn applies the In predicate on the "updated_at" field.

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.Todo

UpdatedAtLT applies the LT predicate on the "updated_at" field.

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.Todo

UpdatedAtLTE applies the LTE predicate on the "updated_at" field.

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.Todo

UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.

func UpdatedAtNotIn

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

UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.

func ValidColumn

func ValidColumn(column string) bool

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

Types

type OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the Todo queries.

func ByChildren

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

ByChildren orders the results by children terms.

func ByChildrenCount

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

ByChildrenCount orders the results by children count.

func ByCreatedAt

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

ByCreatedAt orders the results by the created_at field.

func ByID

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

ByID orders the results by the id field.

func ByParentField

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

ByParentField orders the results by parent field.

func ByPriority

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

ByPriority orders the results by the priority field.

func ByStatus

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

ByStatus orders the results by the status field.

func ByText

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

ByText orders the results by the text field.

func ByUpdatedAt

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

ByUpdatedAt orders the results by the updated_at 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