Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Todo) predicate.Todo
- func Blob(v []byte) predicate.Todo
- func BlobEQ(v []byte) predicate.Todo
- func BlobGT(v []byte) predicate.Todo
- func BlobGTE(v []byte) predicate.Todo
- func BlobIn(vs ...[]byte) predicate.Todo
- func BlobIsNil() predicate.Todo
- func BlobLT(v []byte) predicate.Todo
- func BlobLTE(v []byte) predicate.Todo
- func BlobNEQ(v []byte) predicate.Todo
- func BlobNotIn(vs ...[]byte) predicate.Todo
- func BlobNotNil() predicate.Todo
- func CategoryID(v pulid.ID) predicate.Todo
- func CategoryIDContains(v pulid.ID) predicate.Todo
- func CategoryIDContainsFold(v pulid.ID) predicate.Todo
- func CategoryIDEQ(v pulid.ID) predicate.Todo
- func CategoryIDEqualFold(v pulid.ID) predicate.Todo
- func CategoryIDGT(v pulid.ID) predicate.Todo
- func CategoryIDGTE(v pulid.ID) predicate.Todo
- func CategoryIDHasPrefix(v pulid.ID) predicate.Todo
- func CategoryIDHasSuffix(v pulid.ID) predicate.Todo
- func CategoryIDIn(vs ...pulid.ID) predicate.Todo
- func CategoryIDIsNil() predicate.Todo
- func CategoryIDLT(v pulid.ID) predicate.Todo
- func CategoryIDLTE(v pulid.ID) predicate.Todo
- func CategoryIDNEQ(v pulid.ID) predicate.Todo
- func CategoryIDNotIn(vs ...pulid.ID) predicate.Todo
- func CategoryIDNotNil() 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 CustomIsNil() predicate.Todo
- func CustomNotNil() predicate.Todo
- func CustompIsNil() predicate.Todo
- func CustompNotNil() predicate.Todo
- func HasCategory() predicate.Todo
- func HasCategoryWith(preds ...predicate.Category) 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 HasSecret() predicate.Todo
- func HasSecretWith(preds ...predicate.VerySecret) predicate.Todo
- func ID(id pulid.ID) predicate.Todo
- func IDEQ(id pulid.ID) predicate.Todo
- func IDGT(id pulid.ID) predicate.Todo
- func IDGTE(id pulid.ID) predicate.Todo
- func IDIn(ids ...pulid.ID) predicate.Todo
- func IDLT(id pulid.ID) predicate.Todo
- func IDLTE(id pulid.ID) predicate.Todo
- func IDNEQ(id pulid.ID) predicate.Todo
- func IDNotIn(ids ...pulid.ID) predicate.Todo
- func InitIsNil() predicate.Todo
- func InitNotNil() 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 ValidColumn(column string) bool
- type OrderOption
- func ByCategoryField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByCategoryID(opts ...sql.OrderTermOption) 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 BySecretField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByStatus(opts ...sql.OrderTermOption) OrderOption
- func ByText(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" // 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" // FieldText holds the string denoting the text field in the database. FieldText = "text" // FieldBlob holds the string denoting the blob field in the database. FieldBlob = "blob" // FieldInit holds the string denoting the init field in the database. FieldInit = "init" // FieldCustom holds the string denoting the custom field in the database. FieldCustom = "custom" // FieldCustomp holds the string denoting the customp field in the database. FieldCustomp = "customp" // FieldCategoryID holds the string denoting the category_id field in the database. FieldCategoryID = "category_id" // 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" // EdgeCategory holds the string denoting the category edge name in mutations. EdgeCategory = "category" // EdgeSecret holds the string denoting the secret edge name in mutations. EdgeSecret = "secret" // 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" // CategoryTable is the table that holds the category relation/edge. CategoryTable = "todos" // CategoryInverseTable is the table name for the Category entity. // It exists in this package in order to avoid circular dependency with the "category" package. CategoryInverseTable = "categories" // CategoryColumn is the table column denoting the category relation/edge. CategoryColumn = "category_id" // SecretTable is the table that holds the secret relation/edge. SecretTable = "todos" // SecretInverseTable is the table name for the VerySecret entity. // It exists in this package in order to avoid circular dependency with the "verysecret" package. SecretInverseTable = "very_secrets" // SecretColumn is the table column denoting the secret relation/edge. SecretColumn = "todo_secret" )
Variables ¶
var ( // 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 // TextValidator is a validator for the "text" field. It is called by the builders before save. TextValidator func(string) error // DefaultID holds the default value on creation for the "id" field. DefaultID func() pulid.ID )
var Columns = []string{ FieldID, FieldCreatedAt, FieldStatus, FieldPriority, FieldText, FieldBlob, FieldInit, FieldCustom, FieldCustomp, FieldCategoryID, }
Columns holds all SQL columns for todo fields.
var ForeignKeys = []string{
"todo_children",
"todo_secret",
}
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 BlobNotNil ¶
BlobNotNil applies the NotNil predicate on the "blob" field.
func CategoryID ¶ added in v0.3.0
CategoryID applies equality check predicate on the "category_id" field. It's identical to CategoryIDEQ.
func CategoryIDContains ¶ added in v0.3.0
CategoryIDContains applies the Contains predicate on the "category_id" field.
func CategoryIDContainsFold ¶ added in v0.3.0
CategoryIDContainsFold applies the ContainsFold predicate on the "category_id" field.
func CategoryIDEQ ¶ added in v0.3.0
CategoryIDEQ applies the EQ predicate on the "category_id" field.
func CategoryIDEqualFold ¶ added in v0.3.0
CategoryIDEqualFold applies the EqualFold predicate on the "category_id" field.
func CategoryIDGT ¶ added in v0.3.0
CategoryIDGT applies the GT predicate on the "category_id" field.
func CategoryIDGTE ¶ added in v0.3.0
CategoryIDGTE applies the GTE predicate on the "category_id" field.
func CategoryIDHasPrefix ¶ added in v0.3.0
CategoryIDHasPrefix applies the HasPrefix predicate on the "category_id" field.
func CategoryIDHasSuffix ¶ added in v0.3.0
CategoryIDHasSuffix applies the HasSuffix predicate on the "category_id" field.
func CategoryIDIn ¶ added in v0.3.0
CategoryIDIn applies the In predicate on the "category_id" field.
func CategoryIDIsNil ¶ added in v0.3.0
CategoryIDIsNil applies the IsNil predicate on the "category_id" field.
func CategoryIDLT ¶ added in v0.3.0
CategoryIDLT applies the LT predicate on the "category_id" field.
func CategoryIDLTE ¶ added in v0.3.0
CategoryIDLTE applies the LTE predicate on the "category_id" field.
func CategoryIDNEQ ¶ added in v0.3.0
CategoryIDNEQ applies the NEQ predicate on the "category_id" field.
func CategoryIDNotIn ¶ added in v0.3.0
CategoryIDNotIn applies the NotIn predicate on the "category_id" field.
func CategoryIDNotNil ¶ added in v0.3.0
CategoryIDNotNil applies the NotNil predicate on the "category_id" field.
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 CustomIsNil ¶ added in v0.3.4
CustomIsNil applies the IsNil predicate on the "custom" field.
func CustomNotNil ¶ added in v0.3.4
CustomNotNil applies the NotNil predicate on the "custom" field.
func CustompIsNil ¶ added in v0.3.4
CustompIsNil applies the IsNil predicate on the "customp" field.
func CustompNotNil ¶ added in v0.3.4
CustompNotNil applies the NotNil predicate on the "customp" field.
func HasCategory ¶
HasCategory applies the HasEdge predicate on the "category" edge.
func HasCategoryWith ¶
HasCategoryWith applies the HasEdge predicate on the "category" edge with a given conditions (other predicates).
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 HasSecretWith ¶
func HasSecretWith(preds ...predicate.VerySecret) predicate.Todo
HasSecretWith applies the HasEdge predicate on the "secret" edge with a given conditions (other predicates).
func InitNotNil ¶ added in v0.3.4
InitNotNil applies the NotNil predicate on the "init" 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 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 ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).
Types ¶
type OrderOption ¶ added in v0.4.1
OrderOption defines the ordering options for the Todo queries.
func ByCategoryField ¶ added in v0.4.0
func ByCategoryField(field string, opts ...sql.OrderTermOption) OrderOption
ByCategoryField orders the results by category field.
func ByCategoryID ¶ added in v0.4.0
func ByCategoryID(opts ...sql.OrderTermOption) OrderOption
ByCategoryID orders the results by the category_id field.
func ByChildren ¶ added in v0.4.0
func ByChildren(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByChildren orders the results by children terms.
func ByChildrenCount ¶ added in v0.4.0
func ByChildrenCount(opts ...sql.OrderTermOption) OrderOption
ByChildrenCount orders the results by children count.
func ByCreatedAt ¶ added in v0.4.0
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
ByCreatedAt orders the results by the created_at field.
func ByID ¶ added in v0.4.0
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func ByParentField ¶ added in v0.4.0
func ByParentField(field string, opts ...sql.OrderTermOption) OrderOption
ByParentField orders the results by parent field.
func ByPriority ¶ added in v0.4.0
func ByPriority(opts ...sql.OrderTermOption) OrderOption
ByPriority orders the results by the priority field.
func BySecretField ¶ added in v0.4.0
func BySecretField(field string, opts ...sql.OrderTermOption) OrderOption
BySecretField orders the results by secret field.
func ByStatus ¶ added in v0.4.0
func ByStatus(opts ...sql.OrderTermOption) OrderOption
ByStatus orders the results by the status field.
func ByText ¶ added in v0.4.0
func ByText(opts ...sql.OrderTermOption) OrderOption
ByText orders the results by the text field.
type Status ¶
type Status string
Status defines the type for the "status" enum field.
const ( StatusInProgress Status = "IN_PROGRESS" StatusCompleted Status = "COMPLETED" StatusPending Status = "PENDING" )
Status values.
func (Status) MarshalGQL ¶
MarshalGQL implements graphql.Marshaler interface.
func (*Status) UnmarshalGQL ¶
UnmarshalGQL implements graphql.Unmarshaler interface.