todo

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2022 License: Apache-2.0 Imports: 4 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"
	// FieldTask holds the string denoting the task field in the database.
	FieldTask = "task"
	// FieldStatus holds the string denoting the status field in the database.
	FieldStatus = "status"
	// EdgeUser holds the string denoting the user edge name in mutations.
	EdgeUser = "user"
	// Table holds the table name of the todo in the database.
	Table = "todos"
	// UserTable is the table that holds the user relation/edge.
	UserTable = "todos"
	// 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 = "todo_user"
)
View Source
const DefaultStatus = StatusPending

StatusPending is the default value of the Status enum.

Variables

Columns holds all SQL columns for todo fields.

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

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 HasUser

func HasUser() predicate.Todo

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

func HasUserWith

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

HasUserWith applies the HasEdge predicate on the "user" 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 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 Task

func Task(v string) predicate.Todo

Task applies equality check predicate on the "task" field. It's identical to TaskEQ.

func TaskContains

func TaskContains(v string) predicate.Todo

TaskContains applies the Contains predicate on the "task" field.

func TaskContainsFold

func TaskContainsFold(v string) predicate.Todo

TaskContainsFold applies the ContainsFold predicate on the "task" field.

func TaskEQ

func TaskEQ(v string) predicate.Todo

TaskEQ applies the EQ predicate on the "task" field.

func TaskEqualFold

func TaskEqualFold(v string) predicate.Todo

TaskEqualFold applies the EqualFold predicate on the "task" field.

func TaskGT

func TaskGT(v string) predicate.Todo

TaskGT applies the GT predicate on the "task" field.

func TaskGTE

func TaskGTE(v string) predicate.Todo

TaskGTE applies the GTE predicate on the "task" field.

func TaskHasPrefix

func TaskHasPrefix(v string) predicate.Todo

TaskHasPrefix applies the HasPrefix predicate on the "task" field.

func TaskHasSuffix

func TaskHasSuffix(v string) predicate.Todo

TaskHasSuffix applies the HasSuffix predicate on the "task" field.

func TaskIn

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

TaskIn applies the In predicate on the "task" field.

func TaskLT

func TaskLT(v string) predicate.Todo

TaskLT applies the LT predicate on the "task" field.

func TaskLTE

func TaskLTE(v string) predicate.Todo

TaskLTE applies the LTE predicate on the "task" field.

func TaskNEQ

func TaskNEQ(v string) predicate.Todo

TaskNEQ applies the NEQ predicate on the "task" field.

func TaskNotIn

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

TaskNotIn applies the NotIn predicate on the "task" field.

func ValidColumn

func ValidColumn(column string) bool

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

Types

type Status

type Status string

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

const (
	StatusPending    Status = "pending"
	StatusInProgress Status = "in_progress"
	StatusDone       Status = "done"
)

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