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 HasChildren() predicate.Todo
- func HasChildrenWith(preds ...predicate.Todo) predicate.Todo
- func HasParent() predicate.Todo
- func HasParentWith(preds ...predicate.Todo) predicate.Todo
- func ID(id xid.ID) predicate.Todo
- func IDEQ(id xid.ID) predicate.Todo
- func IDGT(id xid.ID) predicate.Todo
- func IDGTE(id xid.ID) predicate.Todo
- func IDIn(ids ...xid.ID) predicate.Todo
- func IDLT(id xid.ID) predicate.Todo
- func IDLTE(id xid.ID) predicate.Todo
- func IDNEQ(id xid.ID) predicate.Todo
- func IDNotIn(ids ...xid.ID) predicate.Todo
- func Not(p predicate.Todo) predicate.Todo
- func Or(predicates ...predicate.Todo) predicate.Todo
- func Priority(v int) predicate.Todo
- func PriorityEQ(v int) predicate.Todo
- func PriorityGT(v int) predicate.Todo
- func PriorityGTE(v int) predicate.Todo
- func PriorityIn(vs ...int) predicate.Todo
- func PriorityLT(v int) predicate.Todo
- func PriorityLTE(v int) predicate.Todo
- func PriorityNEQ(v int) predicate.Todo
- func PriorityNotIn(vs ...int) 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 Text(v string) predicate.Todo
- func TextContains(v string) predicate.Todo
- func TextContainsFold(v string) predicate.Todo
- func TextEQ(v string) predicate.Todo
- func TextEqualFold(v string) predicate.Todo
- func TextGT(v string) predicate.Todo
- func TextGTE(v string) predicate.Todo
- func TextHasPrefix(v string) predicate.Todo
- func TextHasSuffix(v string) predicate.Todo
- func TextIn(vs ...string) predicate.Todo
- func TextLT(v string) predicate.Todo
- func TextLTE(v string) predicate.Todo
- func TextNEQ(v string) predicate.Todo
- func TextNotIn(vs ...string) predicate.Todo
- func UpdatedAt(v time.Time) predicate.Todo
- func UpdatedAtEQ(v time.Time) predicate.Todo
- func UpdatedAtGT(v time.Time) predicate.Todo
- func UpdatedAtGTE(v time.Time) predicate.Todo
- func UpdatedAtIn(vs ...time.Time) predicate.Todo
- func UpdatedAtLT(v time.Time) predicate.Todo
- func UpdatedAtLTE(v time.Time) predicate.Todo
- func UpdatedAtNEQ(v time.Time) predicate.Todo
- func UpdatedAtNotIn(vs ...time.Time) predicate.Todo
- func ValidColumn(column string) bool
- type OrderOption
- func ByChildren(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByChildrenCount(opts ...sql.OrderTermOption) OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByParentField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByPriority(opts ...sql.OrderTermOption) OrderOption
- func ByStatus(opts ...sql.OrderTermOption) OrderOption
- func ByText(opts ...sql.OrderTermOption) OrderOption
- func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
- 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" // FieldCreatedAt holds the string denoting the created_at field in the database. FieldCreatedAt = "created_at" // FieldUpdatedAt holds the string denoting the updated_at field in the database. FieldUpdatedAt = "updated_at" // FieldText holds the string denoting the text field in the database. FieldText = "text" // 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" // EdgeParent holds the string denoting the parent edge name in mutations. EdgeParent = "parent" // EdgeChildren holds the string denoting the children edge name in mutations. EdgeChildren = "children" // Table holds the table name of the todo in the database. Table = "todos" // ParentTable is the table that holds the parent relation/edge. ParentTable = "todos" // ParentColumn is the table column denoting the parent relation/edge. ParentColumn = "todo_children" // ChildrenTable is the table that holds the children relation/edge. ChildrenTable = "todos" // ChildrenColumn is the table column denoting the children relation/edge. ChildrenColumn = "todo_children" )
Variables ¶
var ( // DefaultCreatedAt holds the default value on creation for the "created_at" field. DefaultCreatedAt func() time.Time // DefaultUpdatedAt holds the default value on creation for the "updated_at" field. DefaultUpdatedAt func() time.Time // UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field. UpdateDefaultUpdatedAt func() time.Time // TextValidator is a validator for the "text" field. It is called by the builders before save. TextValidator func(string) error // DefaultPriority holds the default value on creation for the "priority" field. DefaultPriority int // DefaultID holds the default value on creation for the "id" field. DefaultID func() xid.ID )
var Columns = []string{ FieldID, FieldCreatedAt, FieldUpdatedAt, FieldText, FieldStatus, FieldPriority, }
Columns holds all SQL columns for todo fields.
var ForeignKeys = []string{
"todo_children",
}
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 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 HasChildren ¶
HasChildren applies the HasEdge predicate on the "children" edge.
func HasChildrenWith ¶
HasChildrenWith applies the HasEdge predicate on the "children" edge with a given conditions (other predicates).
func HasParentWith ¶
HasParentWith applies the HasEdge predicate on the "parent" edge with a given conditions (other predicates).
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 TextContains ¶
TextContains applies the Contains predicate on the "text" field.
func TextContainsFold ¶
TextContainsFold applies the ContainsFold predicate on the "text" field.
func TextEqualFold ¶
TextEqualFold applies the EqualFold predicate on the "text" field.
func TextHasPrefix ¶
TextHasPrefix applies the HasPrefix predicate on the "text" field.
func TextHasSuffix ¶
TextHasSuffix applies the HasSuffix predicate on the "text" field.
func UpdatedAt ¶
UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.
func UpdatedAtEQ ¶
UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
func UpdatedAtGT ¶
UpdatedAtGT applies the GT predicate on the "updated_at" field.
func UpdatedAtGTE ¶
UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
func UpdatedAtIn ¶
UpdatedAtIn applies the In predicate on the "updated_at" field.
func UpdatedAtLT ¶
UpdatedAtLT applies the LT predicate on the "updated_at" field.
func UpdatedAtLTE ¶
UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
func UpdatedAtNEQ ¶
UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
func UpdatedAtNotIn ¶
UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
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 ByChildren ¶
func ByChildren(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByChildren orders the results by children terms.
func ByChildrenCount ¶
func ByChildrenCount(opts ...sql.OrderTermOption) OrderOption
ByChildrenCount orders the results by children count.
func ByCreatedAt ¶
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
ByCreatedAt orders the results by the created_at field.
func ByID ¶
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func ByParentField ¶
func ByParentField(field string, opts ...sql.OrderTermOption) OrderOption
ByParentField orders the results by parent field.
func ByPriority ¶
func ByPriority(opts ...sql.OrderTermOption) OrderOption
ByPriority orders the results by the priority field.
func ByStatus ¶
func ByStatus(opts ...sql.OrderTermOption) OrderOption
ByStatus orders the results by the status field.
func ByText ¶
func ByText(opts ...sql.OrderTermOption) OrderOption
ByText orders the results by the text field.
func ByUpdatedAt ¶
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
ByUpdatedAt orders the results by the updated_at field.
type Status ¶
type Status string
Status defines the type for the "status" enum field.
Status values.
func (Status) MarshalGQL ¶
MarshalGQL implements graphql.Marshaler interface.
func (*Status) UnmarshalGQL ¶
UnmarshalGQL implements graphql.Unmarshaler interface.