item

package
v0.0.0-...-21d70f0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 13, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
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

View Source
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"}
)

Columns holds all SQL columns for item fields.

Functions

func And

func And(predicates ...predicate.Item) predicate.Item

And groups predicates with the AND operator between them.

func By

func By(v string) predicate.Item

By applies equality check predicate on the "by" field. It's identical to ByEQ.

func ByContains

func ByContains(v string) predicate.Item

ByContains applies the Contains predicate on the "by" field.

func ByContainsFold

func ByContainsFold(v string) predicate.Item

ByContainsFold applies the ContainsFold predicate on the "by" field.

func ByEQ

func ByEQ(v string) predicate.Item

ByEQ applies the EQ predicate on the "by" field.

func ByEqualFold

func ByEqualFold(v string) predicate.Item

ByEqualFold applies the EqualFold predicate on the "by" field.

func ByGT

func ByGT(v string) predicate.Item

ByGT applies the GT predicate on the "by" field.

func ByGTE

func ByGTE(v string) predicate.Item

ByGTE applies the GTE predicate on the "by" field.

func ByHasPrefix

func ByHasPrefix(v string) predicate.Item

ByHasPrefix applies the HasPrefix predicate on the "by" field.

func ByHasSuffix

func ByHasSuffix(v string) predicate.Item

ByHasSuffix applies the HasSuffix predicate on the "by" field.

func ByIn

func ByIn(vs ...string) predicate.Item

ByIn applies the In predicate on the "by" field.

func ByIsNil

func ByIsNil() predicate.Item

ByIsNil applies the IsNil predicate on the "by" field.

func ByLT

func ByLT(v string) predicate.Item

ByLT applies the LT predicate on the "by" field.

func ByLTE

func ByLTE(v string) predicate.Item

ByLTE applies the LTE predicate on the "by" field.

func ByNEQ

func ByNEQ(v string) predicate.Item

ByNEQ applies the NEQ predicate on the "by" field.

func ByNotIn

func ByNotIn(vs ...string) predicate.Item

ByNotIn applies the NotIn predicate on the "by" field.

func ByNotNil

func ByNotNil() predicate.Item

ByNotNil applies the NotNil predicate on the "by" field.

func Dead

func Dead(v bool) predicate.Item

Dead applies equality check predicate on the "dead" field. It's identical to DeadEQ.

func DeadEQ

func DeadEQ(v bool) predicate.Item

DeadEQ applies the EQ predicate on the "dead" field.

func DeadNEQ

func DeadNEQ(v bool) predicate.Item

DeadNEQ applies the NEQ predicate on the "dead" field.

func Deleted

func Deleted(v bool) predicate.Item

Deleted applies equality check predicate on the "deleted" field. It's identical to DeletedEQ.

func DeletedEQ

func DeletedEQ(v bool) predicate.Item

DeletedEQ applies the EQ predicate on the "deleted" field.

func DeletedNEQ

func DeletedNEQ(v bool) predicate.Item

DeletedNEQ applies the NEQ predicate on the "deleted" field.

func Descendants

func Descendants(v int) predicate.Item

Descendants applies equality check predicate on the "descendants" field. It's identical to DescendantsEQ.

func DescendantsEQ

func DescendantsEQ(v int) predicate.Item

DescendantsEQ applies the EQ predicate on the "descendants" field.

func DescendantsGT

func DescendantsGT(v int) predicate.Item

DescendantsGT applies the GT predicate on the "descendants" field.

func DescendantsGTE

func DescendantsGTE(v int) predicate.Item

DescendantsGTE applies the GTE predicate on the "descendants" field.

func DescendantsIn

func DescendantsIn(vs ...int) predicate.Item

DescendantsIn applies the In predicate on the "descendants" field.

func DescendantsIsNil

func DescendantsIsNil() predicate.Item

DescendantsIsNil applies the IsNil predicate on the "descendants" field.

func DescendantsLT

func DescendantsLT(v int) predicate.Item

DescendantsLT applies the LT predicate on the "descendants" field.

func DescendantsLTE

func DescendantsLTE(v int) predicate.Item

DescendantsLTE applies the LTE predicate on the "descendants" field.

func DescendantsNEQ

func DescendantsNEQ(v int) predicate.Item

DescendantsNEQ applies the NEQ predicate on the "descendants" field.

func DescendantsNotIn

func DescendantsNotIn(vs ...int) predicate.Item

DescendantsNotIn applies the NotIn predicate on the "descendants" field.

func DescendantsNotNil

func DescendantsNotNil() predicate.Item

DescendantsNotNil applies the NotNil predicate on the "descendants" field.

func HasChildren

func HasChildren() predicate.Item

HasChildren applies the HasEdge predicate on the "children" edge.

func HasChildrenWith

func HasChildrenWith(preds ...predicate.Item) predicate.Item

HasChildrenWith applies the HasEdge predicate on the "children" edge with a given conditions (other predicates).

func HasParents

func HasParents() predicate.Item

HasParents applies the HasEdge predicate on the "parents" edge.

func HasParentsWith

func HasParentsWith(preds ...predicate.Item) predicate.Item

HasParentsWith applies the HasEdge predicate on the "parents" edge with a given conditions (other predicates).

func ID

func ID(id string) predicate.Item

ID filters vertices based on their ID field.

func IDContainsFold

func IDContainsFold(id string) predicate.Item

IDContainsFold applies the ContainsFold predicate on the ID field.

func IDEQ

func IDEQ(id string) predicate.Item

IDEQ applies the EQ predicate on the ID field.

func IDEqualFold

func IDEqualFold(id string) predicate.Item

IDEqualFold applies the EqualFold predicate on the ID field.

func IDGT

func IDGT(id string) predicate.Item

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id string) predicate.Item

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...string) predicate.Item

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id string) predicate.Item

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id string) predicate.Item

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id string) predicate.Item

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...string) predicate.Item

IDNotIn applies the NotIn predicate on the ID field.

func KidsIsNil

func KidsIsNil() predicate.Item

KidsIsNil applies the IsNil predicate on the "kids" field.

func KidsNotNil

func KidsNotNil() predicate.Item

KidsNotNil applies the NotNil predicate on the "kids" field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Item) predicate.Item

Or groups predicates with the OR operator between them.

func Parent

func Parent(v int) predicate.Item

Parent applies equality check predicate on the "parent" field. It's identical to ParentEQ.

func ParentEQ

func ParentEQ(v int) predicate.Item

ParentEQ applies the EQ predicate on the "parent" field.

func ParentGT

func ParentGT(v int) predicate.Item

ParentGT applies the GT predicate on the "parent" field.

func ParentGTE

func ParentGTE(v int) predicate.Item

ParentGTE applies the GTE predicate on the "parent" field.

func ParentIn

func ParentIn(vs ...int) predicate.Item

ParentIn applies the In predicate on the "parent" field.

func ParentIsNil

func ParentIsNil() predicate.Item

ParentIsNil applies the IsNil predicate on the "parent" field.

func ParentLT

func ParentLT(v int) predicate.Item

ParentLT applies the LT predicate on the "parent" field.

func ParentLTE

func ParentLTE(v int) predicate.Item

ParentLTE applies the LTE predicate on the "parent" field.

func ParentNEQ

func ParentNEQ(v int) predicate.Item

ParentNEQ applies the NEQ predicate on the "parent" field.

func ParentNotIn

func ParentNotIn(vs ...int) predicate.Item

ParentNotIn applies the NotIn predicate on the "parent" field.

func ParentNotNil

func ParentNotNil() predicate.Item

ParentNotNil applies the NotNil predicate on the "parent" field.

func PartsIsNil

func PartsIsNil() predicate.Item

PartsIsNil applies the IsNil predicate on the "parts" field.

func PartsNotNil

func PartsNotNil() predicate.Item

PartsNotNil applies the NotNil predicate on the "parts" field.

func Poll

func Poll(v int) predicate.Item

Poll applies equality check predicate on the "poll" field. It's identical to PollEQ.

func PollEQ

func PollEQ(v int) predicate.Item

PollEQ applies the EQ predicate on the "poll" field.

func PollGT

func PollGT(v int) predicate.Item

PollGT applies the GT predicate on the "poll" field.

func PollGTE

func PollGTE(v int) predicate.Item

PollGTE applies the GTE predicate on the "poll" field.

func PollIn

func PollIn(vs ...int) predicate.Item

PollIn applies the In predicate on the "poll" field.

func PollIsNil

func PollIsNil() predicate.Item

PollIsNil applies the IsNil predicate on the "poll" field.

func PollLT

func PollLT(v int) predicate.Item

PollLT applies the LT predicate on the "poll" field.

func PollLTE

func PollLTE(v int) predicate.Item

PollLTE applies the LTE predicate on the "poll" field.

func PollNEQ

func PollNEQ(v int) predicate.Item

PollNEQ applies the NEQ predicate on the "poll" field.

func PollNotIn

func PollNotIn(vs ...int) predicate.Item

PollNotIn applies the NotIn predicate on the "poll" field.

func PollNotNil

func PollNotNil() predicate.Item

PollNotNil applies the NotNil predicate on the "poll" field.

func Score

func Score(v int) predicate.Item

Score applies equality check predicate on the "score" field. It's identical to ScoreEQ.

func ScoreEQ

func ScoreEQ(v int) predicate.Item

ScoreEQ applies the EQ predicate on the "score" field.

func ScoreGT

func ScoreGT(v int) predicate.Item

ScoreGT applies the GT predicate on the "score" field.

func ScoreGTE

func ScoreGTE(v int) predicate.Item

ScoreGTE applies the GTE predicate on the "score" field.

func ScoreIn

func ScoreIn(vs ...int) predicate.Item

ScoreIn applies the In predicate on the "score" field.

func ScoreIsNil

func ScoreIsNil() predicate.Item

ScoreIsNil applies the IsNil predicate on the "score" field.

func ScoreLT

func ScoreLT(v int) predicate.Item

ScoreLT applies the LT predicate on the "score" field.

func ScoreLTE

func ScoreLTE(v int) predicate.Item

ScoreLTE applies the LTE predicate on the "score" field.

func ScoreNEQ

func ScoreNEQ(v int) predicate.Item

ScoreNEQ applies the NEQ predicate on the "score" field.

func ScoreNotIn

func ScoreNotIn(vs ...int) predicate.Item

ScoreNotIn applies the NotIn predicate on the "score" field.

func ScoreNotNil

func ScoreNotNil() predicate.Item

ScoreNotNil applies the NotNil predicate on the "score" field.

func Text

func Text(v string) predicate.Item

Text applies equality check predicate on the "text" field. It's identical to TextEQ.

func TextContains

func TextContains(v string) predicate.Item

TextContains applies the Contains predicate on the "text" field.

func TextContainsFold

func TextContainsFold(v string) predicate.Item

TextContainsFold applies the ContainsFold predicate on the "text" field.

func TextEQ

func TextEQ(v string) predicate.Item

TextEQ applies the EQ predicate on the "text" field.

func TextEqualFold

func TextEqualFold(v string) predicate.Item

TextEqualFold applies the EqualFold predicate on the "text" field.

func TextGT

func TextGT(v string) predicate.Item

TextGT applies the GT predicate on the "text" field.

func TextGTE

func TextGTE(v string) predicate.Item

TextGTE applies the GTE predicate on the "text" field.

func TextHasPrefix

func TextHasPrefix(v string) predicate.Item

TextHasPrefix applies the HasPrefix predicate on the "text" field.

func TextHasSuffix

func TextHasSuffix(v string) predicate.Item

TextHasSuffix applies the HasSuffix predicate on the "text" field.

func TextIn

func TextIn(vs ...string) predicate.Item

TextIn applies the In predicate on the "text" field.

func TextIsNil

func TextIsNil() predicate.Item

TextIsNil applies the IsNil predicate on the "text" field.

func TextLT

func TextLT(v string) predicate.Item

TextLT applies the LT predicate on the "text" field.

func TextLTE

func TextLTE(v string) predicate.Item

TextLTE applies the LTE predicate on the "text" field.

func TextNEQ

func TextNEQ(v string) predicate.Item

TextNEQ applies the NEQ predicate on the "text" field.

func TextNotIn

func TextNotIn(vs ...string) predicate.Item

TextNotIn applies the NotIn predicate on the "text" field.

func TextNotNil

func TextNotNil() predicate.Item

TextNotNil applies the NotNil predicate on the "text" field.

func Time

func Time(v int) predicate.Item

Time applies equality check predicate on the "time" field. It's identical to TimeEQ.

func TimeEQ

func TimeEQ(v int) predicate.Item

TimeEQ applies the EQ predicate on the "time" field.

func TimeGT

func TimeGT(v int) predicate.Item

TimeGT applies the GT predicate on the "time" field.

func TimeGTE

func TimeGTE(v int) predicate.Item

TimeGTE applies the GTE predicate on the "time" field.

func TimeIn

func TimeIn(vs ...int) predicate.Item

TimeIn applies the In predicate on the "time" field.

func TimeLT

func TimeLT(v int) predicate.Item

TimeLT applies the LT predicate on the "time" field.

func TimeLTE

func TimeLTE(v int) predicate.Item

TimeLTE applies the LTE predicate on the "time" field.

func TimeNEQ

func TimeNEQ(v int) predicate.Item

TimeNEQ applies the NEQ predicate on the "time" field.

func TimeNotIn

func TimeNotIn(vs ...int) predicate.Item

TimeNotIn applies the NotIn predicate on the "time" field.

func Title

func Title(v string) predicate.Item

Title applies equality check predicate on the "title" field. It's identical to TitleEQ.

func TitleContains

func TitleContains(v string) predicate.Item

TitleContains applies the Contains predicate on the "title" field.

func TitleContainsFold

func TitleContainsFold(v string) predicate.Item

TitleContainsFold applies the ContainsFold predicate on the "title" field.

func TitleEQ

func TitleEQ(v string) predicate.Item

TitleEQ applies the EQ predicate on the "title" field.

func TitleEqualFold

func TitleEqualFold(v string) predicate.Item

TitleEqualFold applies the EqualFold predicate on the "title" field.

func TitleGT

func TitleGT(v string) predicate.Item

TitleGT applies the GT predicate on the "title" field.

func TitleGTE

func TitleGTE(v string) predicate.Item

TitleGTE applies the GTE predicate on the "title" field.

func TitleHasPrefix

func TitleHasPrefix(v string) predicate.Item

TitleHasPrefix applies the HasPrefix predicate on the "title" field.

func TitleHasSuffix

func TitleHasSuffix(v string) predicate.Item

TitleHasSuffix applies the HasSuffix predicate on the "title" field.

func TitleIn

func TitleIn(vs ...string) predicate.Item

TitleIn applies the In predicate on the "title" field.

func TitleIsNil

func TitleIsNil() predicate.Item

TitleIsNil applies the IsNil predicate on the "title" field.

func TitleLT

func TitleLT(v string) predicate.Item

TitleLT applies the LT predicate on the "title" field.

func TitleLTE

func TitleLTE(v string) predicate.Item

TitleLTE applies the LTE predicate on the "title" field.

func TitleNEQ

func TitleNEQ(v string) predicate.Item

TitleNEQ applies the NEQ predicate on the "title" field.

func TitleNotIn

func TitleNotIn(vs ...string) predicate.Item

TitleNotIn applies the NotIn predicate on the "title" field.

func TitleNotNil

func TitleNotNil() predicate.Item

TitleNotNil applies the NotNil predicate on the "title" field.

func TypeEQ

func TypeEQ(v Type) predicate.Item

TypeEQ applies the EQ predicate on the "type" field.

func TypeIn

func TypeIn(vs ...Type) predicate.Item

TypeIn applies the In predicate on the "type" field.

func TypeNEQ

func TypeNEQ(v Type) predicate.Item

TypeNEQ applies the NEQ predicate on the "type" field.

func TypeNotIn

func TypeNotIn(vs ...Type) predicate.Item

TypeNotIn applies the NotIn predicate on the "type" field.

func TypeValidator

func TypeValidator(_type Type) error

TypeValidator is a validator for the "type" field enum values. It is called by the builders before save.

func URL

func URL(v string) predicate.Item

URL applies equality check predicate on the "url" field. It's identical to URLEQ.

func URLContains

func URLContains(v string) predicate.Item

URLContains applies the Contains predicate on the "url" field.

func URLContainsFold

func URLContainsFold(v string) predicate.Item

URLContainsFold applies the ContainsFold predicate on the "url" field.

func URLEQ

func URLEQ(v string) predicate.Item

URLEQ applies the EQ predicate on the "url" field.

func URLEqualFold

func URLEqualFold(v string) predicate.Item

URLEqualFold applies the EqualFold predicate on the "url" field.

func URLGT

func URLGT(v string) predicate.Item

URLGT applies the GT predicate on the "url" field.

func URLGTE

func URLGTE(v string) predicate.Item

URLGTE applies the GTE predicate on the "url" field.

func URLHasPrefix

func URLHasPrefix(v string) predicate.Item

URLHasPrefix applies the HasPrefix predicate on the "url" field.

func URLHasSuffix

func URLHasSuffix(v string) predicate.Item

URLHasSuffix applies the HasSuffix predicate on the "url" field.

func URLIn

func URLIn(vs ...string) predicate.Item

URLIn applies the In predicate on the "url" field.

func URLIsNil

func URLIsNil() predicate.Item

URLIsNil applies the IsNil predicate on the "url" field.

func URLLT

func URLLT(v string) predicate.Item

URLLT applies the LT predicate on the "url" field.

func URLLTE

func URLLTE(v string) predicate.Item

URLLTE applies the LTE predicate on the "url" field.

func URLNEQ

func URLNEQ(v string) predicate.Item

URLNEQ applies the NEQ predicate on the "url" field.

func URLNotIn

func URLNotIn(vs ...string) predicate.Item

URLNotIn applies the NotIn predicate on the "url" field.

func URLNotNil

func URLNotNil() predicate.Item

URLNotNil applies the NotNil predicate on the "url" field.

func ValidColumn

func ValidColumn(column string) bool

ValidColumn reports if the column name is valid (part of the table columns).

Types

type OrderOption

type OrderOption func(*sql.Selector)

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

func (e Type) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (Type) String

func (_type Type) String() string

func (*Type) UnmarshalGQL

func (e *Type) UnmarshalGQL(val interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL