Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Todo) predicate.Todo
- func Content(v string) predicate.Todo
- func ContentContains(v string) predicate.Todo
- func ContentContainsFold(v string) predicate.Todo
- func ContentEQ(v string) predicate.Todo
- func ContentEqualFold(v string) predicate.Todo
- func ContentGT(v string) predicate.Todo
- func ContentGTE(v string) predicate.Todo
- func ContentHasPrefix(v string) predicate.Todo
- func ContentHasSuffix(v string) predicate.Todo
- func ContentIn(vs ...string) predicate.Todo
- func ContentLT(v string) predicate.Todo
- func ContentLTE(v string) predicate.Todo
- func ContentNEQ(v string) predicate.Todo
- func ContentNotIn(vs ...string) predicate.Todo
- func Due(v time.Time) predicate.Todo
- func DueEQ(v time.Time) predicate.Todo
- func DueGT(v time.Time) predicate.Todo
- func DueGTE(v time.Time) predicate.Todo
- func DueIn(vs ...time.Time) predicate.Todo
- func DueIsNil() predicate.Todo
- func DueLT(v time.Time) predicate.Todo
- func DueLTE(v time.Time) predicate.Todo
- func DueNEQ(v time.Time) predicate.Todo
- func DueNotIn(vs ...time.Time) predicate.Todo
- func DueNotNil() 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 PriorityEQ(v Priority) predicate.Todo
- func PriorityIn(vs ...Priority) predicate.Todo
- func PriorityNEQ(v Priority) predicate.Todo
- func PriorityNotIn(vs ...Priority) predicate.Todo
- func PriorityValidator(pr Priority) error
- func ValidColumn(column string) bool
- type OrderOption
- type Priority
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" // FieldContent holds the string denoting the content field in the database. FieldContent = "content" // FieldDue holds the string denoting the due field in the database. FieldDue = "due" // FieldPriority holds the string denoting the priority field in the database. FieldPriority = "priority" // Table holds the table name of the todo in the database. Table = "todos" )
const DefaultPriority = PriorityMedium
PriorityMedium is the default value of the Priority enum.
Variables ¶
var Columns = []string{ FieldID, FieldContent, FieldDue, FieldPriority, }
Columns holds all SQL columns for todo fields.
Functions ¶
func Content ¶
Content applies equality check predicate on the "content" field. It's identical to ContentEQ.
func ContentContains ¶
ContentContains applies the Contains predicate on the "content" field.
func ContentContainsFold ¶
ContentContainsFold applies the ContainsFold predicate on the "content" field.
func ContentEqualFold ¶
ContentEqualFold applies the EqualFold predicate on the "content" field.
func ContentGTE ¶
ContentGTE applies the GTE predicate on the "content" field.
func ContentHasPrefix ¶
ContentHasPrefix applies the HasPrefix predicate on the "content" field.
func ContentHasSuffix ¶
ContentHasSuffix applies the HasSuffix predicate on the "content" field.
func ContentLTE ¶
ContentLTE applies the LTE predicate on the "content" field.
func ContentNEQ ¶
ContentNEQ applies the NEQ predicate on the "content" field.
func ContentNotIn ¶
ContentNotIn applies the NotIn predicate on the "content" field.
func PriorityEQ ¶
PriorityEQ applies the EQ predicate on the "priority" field.
func PriorityIn ¶
PriorityIn applies the In predicate on the "priority" field.
func PriorityNEQ ¶
PriorityNEQ applies the NEQ predicate on the "priority" field.
func PriorityNotIn ¶
PriorityNotIn applies the NotIn predicate on the "priority" field.
func PriorityValidator ¶
PriorityValidator is a validator for the "priority" field enum values. It is called by the builders before save.
func ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).
Types ¶
type OrderOption ¶
OrderOption defines the ordering options for the Todo queries.
func ByContent ¶
func ByContent(opts ...sql.OrderTermOption) OrderOption
ByContent orders the results by the content field.
func ByDue ¶
func ByDue(opts ...sql.OrderTermOption) OrderOption
ByDue orders the results by the due field.
func ByID ¶
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func ByPriority ¶
func ByPriority(opts ...sql.OrderTermOption) OrderOption
ByPriority orders the results by the priority field.
type Priority ¶
type Priority string
Priority defines the type for the "priority" enum field.
const ( PriorityLow Priority = "low" PriorityMedium Priority = "medium" PriorityHigh Priority = "high" )
Priority values.
func (Priority) MarshalGQL ¶
MarshalGQL implements graphql.Marshaler interface.
func (*Priority) UnmarshalGQL ¶
UnmarshalGQL implements graphql.Unmarshaler interface.