Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Todo) predicate.Todo
- func HasUser() predicate.Todo
- func HasUserWith(preds ...predicate.User) predicate.Todo
- func ID(id int) predicate.Todo
- func IDEQ(id int) predicate.Todo
- func IDGT(id int) predicate.Todo
- func IDGTE(id int) predicate.Todo
- func IDIn(ids ...int) predicate.Todo
- func IDLT(id int) predicate.Todo
- func IDLTE(id int) predicate.Todo
- func IDNEQ(id int) predicate.Todo
- func IDNotIn(ids ...int) predicate.Todo
- func Not(p predicate.Todo) predicate.Todo
- func Or(predicates ...predicate.Todo) predicate.Todo
- func StatusEQ(v Status) predicate.Todo
- func StatusIn(vs ...Status) predicate.Todo
- func StatusNEQ(v Status) predicate.Todo
- func StatusNotIn(vs ...Status) predicate.Todo
- func StatusValidator(s Status) error
- func Task(v string) predicate.Todo
- func TaskContains(v string) predicate.Todo
- func TaskContainsFold(v string) predicate.Todo
- func TaskEQ(v string) predicate.Todo
- func TaskEqualFold(v string) predicate.Todo
- func TaskGT(v string) predicate.Todo
- func TaskGTE(v string) predicate.Todo
- func TaskHasPrefix(v string) predicate.Todo
- func TaskHasSuffix(v string) predicate.Todo
- func TaskIn(vs ...string) predicate.Todo
- func TaskLT(v string) predicate.Todo
- func TaskLTE(v string) predicate.Todo
- func TaskNEQ(v string) predicate.Todo
- func TaskNotIn(vs ...string) predicate.Todo
- func ValidColumn(column string) bool
- type Status
Constants ¶
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" )
const DefaultStatus = StatusPending
StatusPending is the default value of the Status enum.
Variables ¶
var Columns = []string{ FieldID, FieldTask, FieldStatus, }
Columns holds all SQL columns for todo fields.
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 HasUserWith ¶
HasUserWith applies the HasEdge predicate on the "user" edge with a given conditions (other predicates).
func StatusNotIn ¶
StatusNotIn applies the NotIn predicate on the "status" field.
func StatusValidator ¶
StatusValidator is a validator for the "status" field enum values. It is called by the builders before save.
func TaskContains ¶
TaskContains applies the Contains predicate on the "task" field.
func TaskContainsFold ¶
TaskContainsFold applies the ContainsFold predicate on the "task" field.
func TaskEqualFold ¶
TaskEqualFold applies the EqualFold predicate on the "task" field.
func TaskHasPrefix ¶
TaskHasPrefix applies the HasPrefix predicate on the "task" field.
func TaskHasSuffix ¶
TaskHasSuffix applies the HasSuffix predicate on the "task" field.
func ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).