Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Todo) predicate.Todo
- func CreatedAt(v time.Time) predicate.Todo
- func CreatedAtEQ(v time.Time) predicate.Todo
- func CreatedAtGT(v time.Time) predicate.Todo
- func CreatedAtGTE(v time.Time) predicate.Todo
- func CreatedAtIn(vs ...time.Time) predicate.Todo
- func CreatedAtLT(v time.Time) predicate.Todo
- func CreatedAtLTE(v time.Time) predicate.Todo
- func CreatedAtNEQ(v time.Time) predicate.Todo
- func CreatedAtNotIn(vs ...time.Time) 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" // 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" // Table holds the table name of the todo in the database. Table = "todos" )
const DefaultStatus = StatusNEW
StatusNEW is the default value of the Status enum.
Variables ¶
var ( // TaskValidator is a validator for the "task" field. It is called by the builders before save. TaskValidator func(string) error // DefaultCreatedAt holds the default value on creation for the "created_at" field. DefaultCreatedAt func() time.Time )
var Columns = []string{ FieldID, FieldTask, FieldCreatedAt, FieldStatus, }
Columns holds all SQL columns for todo fields.
Functions ¶
func CreatedAt ¶
CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
func CreatedAtEQ ¶
CreatedAtEQ applies the EQ predicate on the "created_at" field.
func CreatedAtGT ¶
CreatedAtGT applies the GT predicate on the "created_at" field.
func CreatedAtGTE ¶
CreatedAtGTE applies the GTE predicate on the "created_at" field.
func CreatedAtIn ¶
CreatedAtIn applies the In predicate on the "created_at" field.
func CreatedAtLT ¶
CreatedAtLT applies the LT predicate on the "created_at" field.
func CreatedAtLTE ¶
CreatedAtLTE applies the LTE predicate on the "created_at" field.
func CreatedAtNEQ ¶
CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
func CreatedAtNotIn ¶
CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
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).