Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Item) predicate.Item
- func By(v string) predicate.Item
- func ByContains(v string) predicate.Item
- func ByContainsFold(v string) predicate.Item
- func ByEQ(v string) predicate.Item
- func ByEqualFold(v string) predicate.Item
- func ByGT(v string) predicate.Item
- func ByGTE(v string) predicate.Item
- func ByHasPrefix(v string) predicate.Item
- func ByHasSuffix(v string) predicate.Item
- func ByIn(vs ...string) predicate.Item
- func ByIsNil() predicate.Item
- func ByLT(v string) predicate.Item
- func ByLTE(v string) predicate.Item
- func ByNEQ(v string) predicate.Item
- func ByNotIn(vs ...string) predicate.Item
- func ByNotNil() predicate.Item
- func Dead(v bool) predicate.Item
- func DeadEQ(v bool) predicate.Item
- func DeadNEQ(v bool) predicate.Item
- func Deleted(v bool) predicate.Item
- func DeletedEQ(v bool) predicate.Item
- func DeletedNEQ(v bool) predicate.Item
- func Descendants(v int) predicate.Item
- func DescendantsEQ(v int) predicate.Item
- func DescendantsGT(v int) predicate.Item
- func DescendantsGTE(v int) predicate.Item
- func DescendantsIn(vs ...int) predicate.Item
- func DescendantsIsNil() predicate.Item
- func DescendantsLT(v int) predicate.Item
- func DescendantsLTE(v int) predicate.Item
- func DescendantsNEQ(v int) predicate.Item
- func DescendantsNotIn(vs ...int) predicate.Item
- func DescendantsNotNil() predicate.Item
- func HasChildren() predicate.Item
- func HasChildrenWith(preds ...predicate.Item) predicate.Item
- func HasParents() predicate.Item
- func HasParentsWith(preds ...predicate.Item) predicate.Item
- func ID(id string) predicate.Item
- func IDContainsFold(id string) predicate.Item
- func IDEQ(id string) predicate.Item
- func IDEqualFold(id string) predicate.Item
- func IDGT(id string) predicate.Item
- func IDGTE(id string) predicate.Item
- func IDIn(ids ...string) predicate.Item
- func IDLT(id string) predicate.Item
- func IDLTE(id string) predicate.Item
- func IDNEQ(id string) predicate.Item
- func IDNotIn(ids ...string) predicate.Item
- func KidsIsNil() predicate.Item
- func KidsNotNil() predicate.Item
- func Not(p predicate.Item) predicate.Item
- func Or(predicates ...predicate.Item) predicate.Item
- func Parent(v int) predicate.Item
- func ParentEQ(v int) predicate.Item
- func ParentGT(v int) predicate.Item
- func ParentGTE(v int) predicate.Item
- func ParentIn(vs ...int) predicate.Item
- func ParentIsNil() predicate.Item
- func ParentLT(v int) predicate.Item
- func ParentLTE(v int) predicate.Item
- func ParentNEQ(v int) predicate.Item
- func ParentNotIn(vs ...int) predicate.Item
- func ParentNotNil() predicate.Item
- func PartsIsNil() predicate.Item
- func PartsNotNil() predicate.Item
- func Poll(v int) predicate.Item
- func PollEQ(v int) predicate.Item
- func PollGT(v int) predicate.Item
- func PollGTE(v int) predicate.Item
- func PollIn(vs ...int) predicate.Item
- func PollIsNil() predicate.Item
- func PollLT(v int) predicate.Item
- func PollLTE(v int) predicate.Item
- func PollNEQ(v int) predicate.Item
- func PollNotIn(vs ...int) predicate.Item
- func PollNotNil() predicate.Item
- func Score(v int) predicate.Item
- func ScoreEQ(v int) predicate.Item
- func ScoreGT(v int) predicate.Item
- func ScoreGTE(v int) predicate.Item
- func ScoreIn(vs ...int) predicate.Item
- func ScoreIsNil() predicate.Item
- func ScoreLT(v int) predicate.Item
- func ScoreLTE(v int) predicate.Item
- func ScoreNEQ(v int) predicate.Item
- func ScoreNotIn(vs ...int) predicate.Item
- func ScoreNotNil() predicate.Item
- func Text(v string) predicate.Item
- func TextContains(v string) predicate.Item
- func TextContainsFold(v string) predicate.Item
- func TextEQ(v string) predicate.Item
- func TextEqualFold(v string) predicate.Item
- func TextGT(v string) predicate.Item
- func TextGTE(v string) predicate.Item
- func TextHasPrefix(v string) predicate.Item
- func TextHasSuffix(v string) predicate.Item
- func TextIn(vs ...string) predicate.Item
- func TextIsNil() predicate.Item
- func TextLT(v string) predicate.Item
- func TextLTE(v string) predicate.Item
- func TextNEQ(v string) predicate.Item
- func TextNotIn(vs ...string) predicate.Item
- func TextNotNil() predicate.Item
- func Time(v int) predicate.Item
- func TimeEQ(v int) predicate.Item
- func TimeGT(v int) predicate.Item
- func TimeGTE(v int) predicate.Item
- func TimeIn(vs ...int) predicate.Item
- func TimeLT(v int) predicate.Item
- func TimeLTE(v int) predicate.Item
- func TimeNEQ(v int) predicate.Item
- func TimeNotIn(vs ...int) predicate.Item
- func Title(v string) predicate.Item
- func TitleContains(v string) predicate.Item
- func TitleContainsFold(v string) predicate.Item
- func TitleEQ(v string) predicate.Item
- func TitleEqualFold(v string) predicate.Item
- func TitleGT(v string) predicate.Item
- func TitleGTE(v string) predicate.Item
- func TitleHasPrefix(v string) predicate.Item
- func TitleHasSuffix(v string) predicate.Item
- func TitleIn(vs ...string) predicate.Item
- func TitleIsNil() predicate.Item
- func TitleLT(v string) predicate.Item
- func TitleLTE(v string) predicate.Item
- func TitleNEQ(v string) predicate.Item
- func TitleNotIn(vs ...string) predicate.Item
- func TitleNotNil() predicate.Item
- func TypeEQ(v Type) predicate.Item
- func TypeIn(vs ...Type) predicate.Item
- func TypeNEQ(v Type) predicate.Item
- func TypeNotIn(vs ...Type) predicate.Item
- func TypeValidator(_type Type) error
- func URL(v string) predicate.Item
- func URLContains(v string) predicate.Item
- func URLContainsFold(v string) predicate.Item
- func URLEQ(v string) predicate.Item
- func URLEqualFold(v string) predicate.Item
- func URLGT(v string) predicate.Item
- func URLGTE(v string) predicate.Item
- func URLHasPrefix(v string) predicate.Item
- func URLHasSuffix(v string) predicate.Item
- func URLIn(vs ...string) predicate.Item
- func URLIsNil() predicate.Item
- func URLLT(v string) predicate.Item
- func URLLTE(v string) predicate.Item
- func URLNEQ(v string) predicate.Item
- func URLNotIn(vs ...string) predicate.Item
- func URLNotNil() predicate.Item
- func ValidColumn(column string) bool
- type OrderOption
- func ByBy(opts ...sql.OrderTermOption) OrderOption
- func ByChildren(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByChildrenCount(opts ...sql.OrderTermOption) OrderOption
- func ByDead(opts ...sql.OrderTermOption) OrderOption
- func ByDeleted(opts ...sql.OrderTermOption) OrderOption
- func ByDescendants(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByParent(opts ...sql.OrderTermOption) OrderOption
- func ByParents(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByParentsCount(opts ...sql.OrderTermOption) OrderOption
- func ByPoll(opts ...sql.OrderTermOption) OrderOption
- func ByScore(opts ...sql.OrderTermOption) OrderOption
- func ByText(opts ...sql.OrderTermOption) OrderOption
- func ByTime(opts ...sql.OrderTermOption) OrderOption
- func ByTitle(opts ...sql.OrderTermOption) OrderOption
- func ByType(opts ...sql.OrderTermOption) OrderOption
- func ByURL(opts ...sql.OrderTermOption) OrderOption
- type Type
Constants ¶
const ( // Label holds the string label denoting the item type in the database. Label = "item" // FieldID holds the string denoting the id field in the database. FieldID = "id" // FieldDeleted holds the string denoting the deleted field in the database. FieldDeleted = "deleted" // FieldType holds the string denoting the type field in the database. FieldType = "type" // FieldBy holds the string denoting the by field in the database. FieldBy = "by" // FieldText holds the string denoting the text field in the database. FieldText = "text" // FieldDead holds the string denoting the dead field in the database. FieldDead = "dead" // FieldParent holds the string denoting the parent field in the database. FieldParent = "parent" // FieldPoll holds the string denoting the poll field in the database. FieldPoll = "poll" // FieldKids holds the string denoting the kids field in the database. FieldKids = "kids" // FieldURL holds the string denoting the url field in the database. FieldURL = "url" // FieldScore holds the string denoting the score field in the database. FieldScore = "score" // FieldTitle holds the string denoting the title field in the database. FieldTitle = "title" // FieldParts holds the string denoting the parts field in the database. FieldParts = "parts" // FieldDescendants holds the string denoting the descendants field in the database. FieldDescendants = "descendants" // FieldTime holds the string denoting the time field in the database. FieldTime = "time" // EdgeChildren holds the string denoting the children edge name in mutations. EdgeChildren = "children" // EdgeParents holds the string denoting the parents edge name in mutations. EdgeParents = "parents" // Table holds the table name of the item in the database. Table = "items" // ChildrenTable is the table that holds the children relation/edge. The primary key declared below. ChildrenTable = "item_children" // ParentsTable is the table that holds the parents relation/edge. The primary key declared below. ParentsTable = "item_children" )
Variables ¶
var ( // ChildrenPrimaryKey and ChildrenColumn2 are the table columns denoting the // primary key for the children relation (M2M). ChildrenPrimaryKey = []string{"item_id", "parent_id"} // ParentsPrimaryKey and ParentsColumn2 are the table columns denoting the // primary key for the parents relation (M2M). ParentsPrimaryKey = []string{"item_id", "parent_id"} )
var Columns = []string{ FieldID, FieldDeleted, FieldType, FieldBy, FieldText, FieldDead, FieldParent, FieldPoll, FieldKids, FieldURL, FieldScore, FieldTitle, FieldParts, FieldDescendants, FieldTime, }
Columns holds all SQL columns for item fields.
Functions ¶
func ByContains ¶
ByContains applies the Contains predicate on the "by" field.
func ByContainsFold ¶
ByContainsFold applies the ContainsFold predicate on the "by" field.
func ByEqualFold ¶
ByEqualFold applies the EqualFold predicate on the "by" field.
func ByHasPrefix ¶
ByHasPrefix applies the HasPrefix predicate on the "by" field.
func ByHasSuffix ¶
ByHasSuffix applies the HasSuffix predicate on the "by" field.
func Deleted ¶
Deleted applies equality check predicate on the "deleted" field. It's identical to DeletedEQ.
func DeletedNEQ ¶
DeletedNEQ applies the NEQ predicate on the "deleted" field.
func Descendants ¶
Descendants applies equality check predicate on the "descendants" field. It's identical to DescendantsEQ.
func DescendantsEQ ¶
DescendantsEQ applies the EQ predicate on the "descendants" field.
func DescendantsGT ¶
DescendantsGT applies the GT predicate on the "descendants" field.
func DescendantsGTE ¶
DescendantsGTE applies the GTE predicate on the "descendants" field.
func DescendantsIn ¶
DescendantsIn applies the In predicate on the "descendants" field.
func DescendantsIsNil ¶
DescendantsIsNil applies the IsNil predicate on the "descendants" field.
func DescendantsLT ¶
DescendantsLT applies the LT predicate on the "descendants" field.
func DescendantsLTE ¶
DescendantsLTE applies the LTE predicate on the "descendants" field.
func DescendantsNEQ ¶
DescendantsNEQ applies the NEQ predicate on the "descendants" field.
func DescendantsNotIn ¶
DescendantsNotIn applies the NotIn predicate on the "descendants" field.
func DescendantsNotNil ¶
DescendantsNotNil applies the NotNil predicate on the "descendants" 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 HasParents ¶
HasParents applies the HasEdge predicate on the "parents" edge.
func HasParentsWith ¶
HasParentsWith applies the HasEdge predicate on the "parents" edge with a given conditions (other predicates).
func IDContainsFold ¶
IDContainsFold applies the ContainsFold predicate on the ID field.
func IDEqualFold ¶
IDEqualFold applies the EqualFold predicate on the ID field.
func KidsNotNil ¶
KidsNotNil applies the NotNil predicate on the "kids" field.
func Parent ¶
Parent applies equality check predicate on the "parent" field. It's identical to ParentEQ.
func ParentIsNil ¶
ParentIsNil applies the IsNil predicate on the "parent" field.
func ParentNotIn ¶
ParentNotIn applies the NotIn predicate on the "parent" field.
func ParentNotNil ¶
ParentNotNil applies the NotNil predicate on the "parent" field.
func PartsIsNil ¶
PartsIsNil applies the IsNil predicate on the "parts" field.
func PartsNotNil ¶
PartsNotNil applies the NotNil predicate on the "parts" field.
func PollNotNil ¶
PollNotNil applies the NotNil predicate on the "poll" field.
func Score ¶
Score applies equality check predicate on the "score" field. It's identical to ScoreEQ.
func ScoreIsNil ¶
ScoreIsNil applies the IsNil predicate on the "score" field.
func ScoreNotIn ¶
ScoreNotIn applies the NotIn predicate on the "score" field.
func ScoreNotNil ¶
ScoreNotNil applies the NotNil predicate on the "score" field.
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 TextNotNil ¶
TextNotNil applies the NotNil predicate on the "text" field.
func Title ¶
Title applies equality check predicate on the "title" field. It's identical to TitleEQ.
func TitleContains ¶
TitleContains applies the Contains predicate on the "title" field.
func TitleContainsFold ¶
TitleContainsFold applies the ContainsFold predicate on the "title" field.
func TitleEqualFold ¶
TitleEqualFold applies the EqualFold predicate on the "title" field.
func TitleHasPrefix ¶
TitleHasPrefix applies the HasPrefix predicate on the "title" field.
func TitleHasSuffix ¶
TitleHasSuffix applies the HasSuffix predicate on the "title" field.
func TitleIsNil ¶
TitleIsNil applies the IsNil predicate on the "title" field.
func TitleNotIn ¶
TitleNotIn applies the NotIn predicate on the "title" field.
func TitleNotNil ¶
TitleNotNil applies the NotNil predicate on the "title" field.
func TypeValidator ¶
TypeValidator is a validator for the "type" field enum values. It is called by the builders before save.
func URLContains ¶
URLContains applies the Contains predicate on the "url" field.
func URLContainsFold ¶
URLContainsFold applies the ContainsFold predicate on the "url" field.
func URLEqualFold ¶
URLEqualFold applies the EqualFold predicate on the "url" field.
func URLHasPrefix ¶
URLHasPrefix applies the HasPrefix predicate on the "url" field.
func URLHasSuffix ¶
URLHasSuffix applies the HasSuffix predicate on the "url" 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 Item queries.
func ByBy ¶
func ByBy(opts ...sql.OrderTermOption) OrderOption
ByBy orders the results by the by field.
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 ByDead ¶
func ByDead(opts ...sql.OrderTermOption) OrderOption
ByDead orders the results by the dead field.
func ByDeleted ¶
func ByDeleted(opts ...sql.OrderTermOption) OrderOption
ByDeleted orders the results by the deleted field.
func ByDescendants ¶
func ByDescendants(opts ...sql.OrderTermOption) OrderOption
ByDescendants orders the results by the descendants field.
func ByID ¶
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func ByParent ¶
func ByParent(opts ...sql.OrderTermOption) OrderOption
ByParent orders the results by the parent field.
func ByParents ¶
func ByParents(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByParents orders the results by parents terms.
func ByParentsCount ¶
func ByParentsCount(opts ...sql.OrderTermOption) OrderOption
ByParentsCount orders the results by parents count.
func ByPoll ¶
func ByPoll(opts ...sql.OrderTermOption) OrderOption
ByPoll orders the results by the poll field.
func ByScore ¶
func ByScore(opts ...sql.OrderTermOption) OrderOption
ByScore orders the results by the score field.
func ByText ¶
func ByText(opts ...sql.OrderTermOption) OrderOption
ByText orders the results by the text field.
func ByTime ¶
func ByTime(opts ...sql.OrderTermOption) OrderOption
ByTime orders the results by the time field.
func ByTitle ¶
func ByTitle(opts ...sql.OrderTermOption) OrderOption
ByTitle orders the results by the title field.
func ByType ¶
func ByType(opts ...sql.OrderTermOption) OrderOption
ByType orders the results by the type field.
func ByURL ¶
func ByURL(opts ...sql.OrderTermOption) OrderOption
ByURL orders the results by the url field.
type Type ¶
type Type string
Type defines the type for the "type" enum field.
const ( TypeJob Type = "job" TypeStory Type = "story" TypeComment Type = "comment" TypePoll Type = "poll" TypePollopt Type = "pollopt" )
Type values.
func (Type) MarshalGQL ¶
MarshalGQL implements graphql.Marshaler interface.
func (*Type) UnmarshalGQL ¶
UnmarshalGQL implements graphql.Unmarshaler interface.