Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Widget) predicate.Widget
- func CreatedAt(v time.Time) predicate.Widget
- func CreatedAtEQ(v time.Time) predicate.Widget
- func CreatedAtGT(v time.Time) predicate.Widget
- func CreatedAtGTE(v time.Time) predicate.Widget
- func CreatedAtIn(vs ...time.Time) predicate.Widget
- func CreatedAtLT(v time.Time) predicate.Widget
- func CreatedAtLTE(v time.Time) predicate.Widget
- func CreatedAtNEQ(v time.Time) predicate.Widget
- func CreatedAtNotIn(vs ...time.Time) predicate.Widget
- func HasType() predicate.Widget
- func HasTypeWith(preds ...predicate.WidgetType) predicate.Widget
- func ID(id int) predicate.Widget
- func IDEQ(id int) predicate.Widget
- func IDGT(id int) predicate.Widget
- func IDGTE(id int) predicate.Widget
- func IDIn(ids ...int) predicate.Widget
- func IDLT(id int) predicate.Widget
- func IDLTE(id int) predicate.Widget
- func IDNEQ(id int) predicate.Widget
- func IDNotIn(ids ...int) predicate.Widget
- func Not(p predicate.Widget) predicate.Widget
- func Note(v string) predicate.Widget
- func NoteContains(v string) predicate.Widget
- func NoteContainsFold(v string) predicate.Widget
- func NoteEQ(v string) predicate.Widget
- func NoteEqualFold(v string) predicate.Widget
- func NoteGT(v string) predicate.Widget
- func NoteGTE(v string) predicate.Widget
- func NoteHasPrefix(v string) predicate.Widget
- func NoteHasSuffix(v string) predicate.Widget
- func NoteIn(vs ...string) predicate.Widget
- func NoteLT(v string) predicate.Widget
- func NoteLTE(v string) predicate.Widget
- func NoteNEQ(v string) predicate.Widget
- func NoteNotIn(vs ...string) predicate.Widget
- func Or(predicates ...predicate.Widget) predicate.Widget
- func Priority(v int) predicate.Widget
- func PriorityEQ(v int) predicate.Widget
- func PriorityGT(v int) predicate.Widget
- func PriorityGTE(v int) predicate.Widget
- func PriorityIn(vs ...int) predicate.Widget
- func PriorityLT(v int) predicate.Widget
- func PriorityLTE(v int) predicate.Widget
- func PriorityNEQ(v int) predicate.Widget
- func PriorityNotIn(vs ...int) predicate.Widget
- func StatusEQ(v Status) predicate.Widget
- func StatusIn(vs ...Status) predicate.Widget
- func StatusNEQ(v Status) predicate.Widget
- func StatusNotIn(vs ...Status) predicate.Widget
- func StatusValidator(s Status) error
- func ValidColumn(column string) bool
- type Status
Constants ¶
const ( // Label holds the string label denoting the widget type in the database. Label = "widget" // FieldID holds the string denoting the id field in the database. FieldID = "id" // FieldNote holds the string denoting the note field in the database. FieldNote = "note" // 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" // FieldPriority holds the string denoting the priority field in the database. FieldPriority = "priority" // EdgeType holds the string denoting the type edge name in mutations. EdgeType = "type" // Table holds the table name of the widget in the database. Table = "widgets" // TypeTable is the table that holds the type relation/edge. TypeTable = "widgets" // TypeInverseTable is the table name for the WidgetType entity. // It exists in this package in order to avoid circular dependency with the "widgettype" package. TypeInverseTable = "widget_types" // TypeColumn is the table column denoting the type relation/edge. TypeColumn = "widget_type" )
const DefaultStatus = StatusDraft
StatusDraft is the default value of the Status enum.
Variables ¶
var ( // NoteValidator is a validator for the "note" field. It is called by the builders before save. NoteValidator func(string) error // DefaultCreatedAt holds the default value on creation for the "created_at" field. DefaultCreatedAt func() time.Time // DefaultPriority holds the default value on creation for the "priority" field. DefaultPriority int )
var Columns = []string{ FieldID, FieldNote, FieldCreatedAt, FieldStatus, FieldPriority, }
Columns holds all SQL columns for widget fields.
var ForeignKeys = []string{
"widget_type",
}
ForeignKeys holds the SQL foreign-keys that are owned by the "widgets" table and are not defined as standalone fields in the schema.
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 HasTypeWith ¶
func HasTypeWith(preds ...predicate.WidgetType) predicate.Widget
HasTypeWith applies the HasEdge predicate on the "type" edge with a given conditions (other predicates).
func NoteContains ¶
NoteContains applies the Contains predicate on the "note" field.
func NoteContainsFold ¶
NoteContainsFold applies the ContainsFold predicate on the "note" field.
func NoteEqualFold ¶
NoteEqualFold applies the EqualFold predicate on the "note" field.
func NoteHasPrefix ¶
NoteHasPrefix applies the HasPrefix predicate on the "note" field.
func NoteHasSuffix ¶
NoteHasSuffix applies the HasSuffix predicate on the "note" field.
func Priority ¶
Priority applies equality check predicate on the "priority" field. It's identical to PriorityEQ.
func PriorityEQ ¶
PriorityEQ applies the EQ predicate on the "priority" field.
func PriorityGT ¶
PriorityGT applies the GT predicate on the "priority" field.
func PriorityGTE ¶
PriorityGTE applies the GTE predicate on the "priority" field.
func PriorityIn ¶
PriorityIn applies the In predicate on the "priority" field.
func PriorityLT ¶
PriorityLT applies the LT predicate on the "priority" field.
func PriorityLTE ¶
PriorityLTE applies the LTE 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 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 ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).