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 bigintgql.BigInt) predicate.Todo
- func CategoryIDContains(v bigintgql.BigInt) predicate.Todo
- func CategoryIDContainsFold(v bigintgql.BigInt) predicate.Todo
- func CategoryIDEQ(v bigintgql.BigInt) predicate.Todo
- func CategoryIDEqualFold(v bigintgql.BigInt) predicate.Todo
- func CategoryIDGT(v bigintgql.BigInt) predicate.Todo
- func CategoryIDGTE(v bigintgql.BigInt) predicate.Todo
- func CategoryIDHasPrefix(v bigintgql.BigInt) predicate.Todo
- func CategoryIDHasSuffix(v bigintgql.BigInt) predicate.Todo
- func CategoryIDIn(vs ...bigintgql.BigInt) predicate.Todo
- func CategoryIDIsNil() predicate.Todo
- func CategoryIDLT(v bigintgql.BigInt) predicate.Todo
- func CategoryIDLTE(v bigintgql.BigInt) predicate.Todo
- func CategoryIDNEQ(v bigintgql.BigInt) predicate.Todo
- func CategoryIDNotIn(vs ...bigintgql.BigInt) 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 string) predicate.Todo
- func IDContainsFold(id string) predicate.Todo
- func IDEQ(id string) predicate.Todo
- func IDEqualFold(id string) predicate.Todo
- func IDGT(id string) predicate.Todo
- func IDGTE(id string) predicate.Todo
- func IDIn(ids ...string) predicate.Todo
- func IDLT(id string) predicate.Todo
- func IDLTE(id string) predicate.Todo
- func IDNEQ(id string) predicate.Todo
- func IDNotIn(ids ...string) 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 string )
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 ¶
CategoryID applies equality check predicate on the "category_id" field. It's identical to CategoryIDEQ.
func CategoryIDContains ¶
CategoryIDContains applies the Contains predicate on the "category_id" field.
func CategoryIDContainsFold ¶
CategoryIDContainsFold applies the ContainsFold predicate on the "category_id" field.
func CategoryIDEQ ¶
CategoryIDEQ applies the EQ predicate on the "category_id" field.
func CategoryIDEqualFold ¶
CategoryIDEqualFold applies the EqualFold predicate on the "category_id" field.
func CategoryIDGT ¶
CategoryIDGT applies the GT predicate on the "category_id" field.
func CategoryIDGTE ¶
CategoryIDGTE applies the GTE predicate on the "category_id" field.
func CategoryIDHasPrefix ¶
CategoryIDHasPrefix applies the HasPrefix predicate on the "category_id" field.
func CategoryIDHasSuffix ¶
CategoryIDHasSuffix applies the HasSuffix predicate on the "category_id" field.
func CategoryIDIn ¶
CategoryIDIn applies the In predicate on the "category_id" field.
func CategoryIDIsNil ¶
CategoryIDIsNil applies the IsNil predicate on the "category_id" field.
func CategoryIDLT ¶
CategoryIDLT applies the LT predicate on the "category_id" field.
func CategoryIDLTE ¶
CategoryIDLTE applies the LTE predicate on the "category_id" field.
func CategoryIDNEQ ¶
CategoryIDNEQ applies the NEQ predicate on the "category_id" field.
func CategoryIDNotIn ¶
CategoryIDNotIn applies the NotIn predicate on the "category_id" field.
func CategoryIDNotNil ¶
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 IDContainsFold ¶ added in v0.4.0
IDContainsFold applies the ContainsFold predicate on the ID field.
func IDEqualFold ¶ added in v0.4.0
IDEqualFold applies the EqualFold predicate on the ID field.
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.