thread

package
v0.0.0-...-a746138 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the thread type in the database.
	Label = "thread"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldTitle holds the string denoting the title field in the database.
	FieldTitle = "title"
	// FieldSlug holds the string denoting the slug field in the database.
	FieldSlug = "slug"
	// FieldDescription holds the string denoting the description field in the database.
	FieldDescription = "description"
	// FieldModifiedAt holds the string denoting the modified_at field in the database.
	FieldModifiedAt = "modified_at"
	// FieldCreatedBy holds the string denoting the created_by field in the database.
	FieldCreatedBy = "created_by"
	// FieldCreatedAt holds the string denoting the created_at field in the database.
	FieldCreatedAt = "created_at"
	// EdgeThreadComments holds the string denoting the thread_comments edge name in mutations.
	EdgeThreadComments = "thread_comments"
	// EdgeTags holds the string denoting the tags edge name in mutations.
	EdgeTags = "tags"
	// EdgeTopics holds the string denoting the topics edge name in mutations.
	EdgeTopics = "topics"
	// EdgeUsers holds the string denoting the users edge name in mutations.
	EdgeUsers = "users"
	// EdgeKudoedUsers holds the string denoting the kudoed_users edge name in mutations.
	EdgeKudoedUsers = "kudoed_users"
	// EdgeThreadKudoes holds the string denoting the thread_kudoes edge name in mutations.
	EdgeThreadKudoes = "thread_kudoes"
	// Table holds the table name of the thread in the database.
	Table = "threads"
	// ThreadCommentsTable is the table that holds the thread_comments relation/edge.
	ThreadCommentsTable = "comments"
	// ThreadCommentsInverseTable is the table name for the Comment entity.
	// It exists in this package in order to avoid circular dependency with the "comment" package.
	ThreadCommentsInverseTable = "comments"
	// ThreadCommentsColumn is the table column denoting the thread_comments relation/edge.
	ThreadCommentsColumn = "thread_thread_comments"
	// TagsTable is the table that holds the tags relation/edge. The primary key declared below.
	TagsTable = "thread_tags"
	// TagsInverseTable is the table name for the Tag entity.
	// It exists in this package in order to avoid circular dependency with the "tag" package.
	TagsInverseTable = "tags"
	// TopicsTable is the table that holds the topics relation/edge.
	TopicsTable = "threads"
	// TopicsInverseTable is the table name for the Topic entity.
	// It exists in this package in order to avoid circular dependency with the "topic" package.
	TopicsInverseTable = "topics"
	// TopicsColumn is the table column denoting the topics relation/edge.
	TopicsColumn = "topic_topic_threads"
	// UsersTable is the table that holds the users relation/edge.
	UsersTable = "threads"
	// UsersInverseTable is the table name for the User entity.
	// It exists in this package in order to avoid circular dependency with the "user" package.
	UsersInverseTable = "users"
	// UsersColumn is the table column denoting the users relation/edge.
	UsersColumn = "created_by"
	// KudoedUsersTable is the table that holds the kudoed_users relation/edge. The primary key declared below.
	KudoedUsersTable = "thread_kudos"
	// KudoedUsersInverseTable is the table name for the User entity.
	// It exists in this package in order to avoid circular dependency with the "user" package.
	KudoedUsersInverseTable = "users"
	// ThreadKudoesTable is the table that holds the thread_kudoes relation/edge.
	ThreadKudoesTable = "thread_kudos"
	// ThreadKudoesInverseTable is the table name for the ThreadKudo entity.
	// It exists in this package in order to avoid circular dependency with the "threadkudo" package.
	ThreadKudoesInverseTable = "thread_kudos"
	// ThreadKudoesColumn is the table column denoting the thread_kudoes relation/edge.
	ThreadKudoesColumn = "thread_id"
)

Variables

View Source
var (
	// TagsPrimaryKey and TagsColumn2 are the table columns denoting the
	// primary key for the tags relation (M2M).
	TagsPrimaryKey = []string{"thread_id", "tag_id"}
	// KudoedUsersPrimaryKey and KudoedUsersColumn2 are the table columns denoting the
	// primary key for the kudoed_users relation (M2M).
	KudoedUsersPrimaryKey = []string{"user_id", "thread_id"}
)
View Source
var (
	// TitleValidator is a validator for the "title" field. It is called by the builders before save.
	TitleValidator func(string) error
	// SlugValidator is a validator for the "slug" field. It is called by the builders before save.
	SlugValidator func(string) error
	// DescriptionValidator is a validator for the "description" field. It is called by the builders before save.
	DescriptionValidator func(string) error
	// DefaultCreatedAt holds the default value on creation for the "created_at" field.
	DefaultCreatedAt time.Time
)

Columns holds all SQL columns for thread fields.

View Source
var ForeignKeys = []string{
	"topic_topic_threads",
}

ForeignKeys holds the SQL foreign-keys that are owned by the "threads" table and are not defined as standalone fields in the schema.

Functions

func And

func And(predicates ...predicate.Thread) predicate.Thread

And groups predicates with the AND operator between them.

func CreatedAt

func CreatedAt(v time.Time) predicate.Thread

CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Thread

CreatedAtEQ applies the EQ predicate on the "created_at" field.

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Thread

CreatedAtGT applies the GT predicate on the "created_at" field.

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Thread

CreatedAtGTE applies the GTE predicate on the "created_at" field.

func CreatedAtIn

func CreatedAtIn(vs ...time.Time) predicate.Thread

CreatedAtIn applies the In predicate on the "created_at" field.

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Thread

CreatedAtLT applies the LT predicate on the "created_at" field.

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Thread

CreatedAtLTE applies the LTE predicate on the "created_at" field.

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Thread

CreatedAtNEQ applies the NEQ predicate on the "created_at" field.

func CreatedAtNotIn

func CreatedAtNotIn(vs ...time.Time) predicate.Thread

CreatedAtNotIn applies the NotIn predicate on the "created_at" field.

func CreatedBy

func CreatedBy(v uuid.UUID) predicate.Thread

CreatedBy applies equality check predicate on the "created_by" field. It's identical to CreatedByEQ.

func CreatedByEQ

func CreatedByEQ(v uuid.UUID) predicate.Thread

CreatedByEQ applies the EQ predicate on the "created_by" field.

func CreatedByIn

func CreatedByIn(vs ...uuid.UUID) predicate.Thread

CreatedByIn applies the In predicate on the "created_by" field.

func CreatedByNEQ

func CreatedByNEQ(v uuid.UUID) predicate.Thread

CreatedByNEQ applies the NEQ predicate on the "created_by" field.

func CreatedByNotIn

func CreatedByNotIn(vs ...uuid.UUID) predicate.Thread

CreatedByNotIn applies the NotIn predicate on the "created_by" field.

func Description

func Description(v string) predicate.Thread

Description applies equality check predicate on the "description" field. It's identical to DescriptionEQ.

func DescriptionContains

func DescriptionContains(v string) predicate.Thread

DescriptionContains applies the Contains predicate on the "description" field.

func DescriptionContainsFold

func DescriptionContainsFold(v string) predicate.Thread

DescriptionContainsFold applies the ContainsFold predicate on the "description" field.

func DescriptionEQ

func DescriptionEQ(v string) predicate.Thread

DescriptionEQ applies the EQ predicate on the "description" field.

func DescriptionEqualFold

func DescriptionEqualFold(v string) predicate.Thread

DescriptionEqualFold applies the EqualFold predicate on the "description" field.

func DescriptionGT

func DescriptionGT(v string) predicate.Thread

DescriptionGT applies the GT predicate on the "description" field.

func DescriptionGTE

func DescriptionGTE(v string) predicate.Thread

DescriptionGTE applies the GTE predicate on the "description" field.

func DescriptionHasPrefix

func DescriptionHasPrefix(v string) predicate.Thread

DescriptionHasPrefix applies the HasPrefix predicate on the "description" field.

func DescriptionHasSuffix

func DescriptionHasSuffix(v string) predicate.Thread

DescriptionHasSuffix applies the HasSuffix predicate on the "description" field.

func DescriptionIn

func DescriptionIn(vs ...string) predicate.Thread

DescriptionIn applies the In predicate on the "description" field.

func DescriptionIsNil

func DescriptionIsNil() predicate.Thread

DescriptionIsNil applies the IsNil predicate on the "description" field.

func DescriptionLT

func DescriptionLT(v string) predicate.Thread

DescriptionLT applies the LT predicate on the "description" field.

func DescriptionLTE

func DescriptionLTE(v string) predicate.Thread

DescriptionLTE applies the LTE predicate on the "description" field.

func DescriptionNEQ

func DescriptionNEQ(v string) predicate.Thread

DescriptionNEQ applies the NEQ predicate on the "description" field.

func DescriptionNotIn

func DescriptionNotIn(vs ...string) predicate.Thread

DescriptionNotIn applies the NotIn predicate on the "description" field.

func DescriptionNotNil

func DescriptionNotNil() predicate.Thread

DescriptionNotNil applies the NotNil predicate on the "description" field.

func HasKudoedUsers

func HasKudoedUsers() predicate.Thread

HasKudoedUsers applies the HasEdge predicate on the "kudoed_users" edge.

func HasKudoedUsersWith

func HasKudoedUsersWith(preds ...predicate.User) predicate.Thread

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

func HasTags

func HasTags() predicate.Thread

HasTags applies the HasEdge predicate on the "tags" edge.

func HasTagsWith

func HasTagsWith(preds ...predicate.Tag) predicate.Thread

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

func HasThreadComments

func HasThreadComments() predicate.Thread

HasThreadComments applies the HasEdge predicate on the "thread_comments" edge.

func HasThreadCommentsWith

func HasThreadCommentsWith(preds ...predicate.Comment) predicate.Thread

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

func HasThreadKudoes

func HasThreadKudoes() predicate.Thread

HasThreadKudoes applies the HasEdge predicate on the "thread_kudoes" edge.

func HasThreadKudoesWith

func HasThreadKudoesWith(preds ...predicate.ThreadKudo) predicate.Thread

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

func HasTopics

func HasTopics() predicate.Thread

HasTopics applies the HasEdge predicate on the "topics" edge.

func HasTopicsWith

func HasTopicsWith(preds ...predicate.Topic) predicate.Thread

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

func HasUsers

func HasUsers() predicate.Thread

HasUsers applies the HasEdge predicate on the "users" edge.

func HasUsersWith

func HasUsersWith(preds ...predicate.User) predicate.Thread

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

func ID

func ID(id int) predicate.Thread

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Thread

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Thread

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Thread

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...int) predicate.Thread

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Thread

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Thread

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Thread

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...int) predicate.Thread

IDNotIn applies the NotIn predicate on the ID field.

func ModifiedAt

func ModifiedAt(v time.Time) predicate.Thread

ModifiedAt applies equality check predicate on the "modified_at" field. It's identical to ModifiedAtEQ.

func ModifiedAtEQ

func ModifiedAtEQ(v time.Time) predicate.Thread

ModifiedAtEQ applies the EQ predicate on the "modified_at" field.

func ModifiedAtGT

func ModifiedAtGT(v time.Time) predicate.Thread

ModifiedAtGT applies the GT predicate on the "modified_at" field.

func ModifiedAtGTE

func ModifiedAtGTE(v time.Time) predicate.Thread

ModifiedAtGTE applies the GTE predicate on the "modified_at" field.

func ModifiedAtIn

func ModifiedAtIn(vs ...time.Time) predicate.Thread

ModifiedAtIn applies the In predicate on the "modified_at" field.

func ModifiedAtIsNil

func ModifiedAtIsNil() predicate.Thread

ModifiedAtIsNil applies the IsNil predicate on the "modified_at" field.

func ModifiedAtLT

func ModifiedAtLT(v time.Time) predicate.Thread

ModifiedAtLT applies the LT predicate on the "modified_at" field.

func ModifiedAtLTE

func ModifiedAtLTE(v time.Time) predicate.Thread

ModifiedAtLTE applies the LTE predicate on the "modified_at" field.

func ModifiedAtNEQ

func ModifiedAtNEQ(v time.Time) predicate.Thread

ModifiedAtNEQ applies the NEQ predicate on the "modified_at" field.

func ModifiedAtNotIn

func ModifiedAtNotIn(vs ...time.Time) predicate.Thread

ModifiedAtNotIn applies the NotIn predicate on the "modified_at" field.

func ModifiedAtNotNil

func ModifiedAtNotNil() predicate.Thread

ModifiedAtNotNil applies the NotNil predicate on the "modified_at" field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Thread) predicate.Thread

Or groups predicates with the OR operator between them.

func Slug

func Slug(v string) predicate.Thread

Slug applies equality check predicate on the "slug" field. It's identical to SlugEQ.

func SlugContains

func SlugContains(v string) predicate.Thread

SlugContains applies the Contains predicate on the "slug" field.

func SlugContainsFold

func SlugContainsFold(v string) predicate.Thread

SlugContainsFold applies the ContainsFold predicate on the "slug" field.

func SlugEQ

func SlugEQ(v string) predicate.Thread

SlugEQ applies the EQ predicate on the "slug" field.

func SlugEqualFold

func SlugEqualFold(v string) predicate.Thread

SlugEqualFold applies the EqualFold predicate on the "slug" field.

func SlugGT

func SlugGT(v string) predicate.Thread

SlugGT applies the GT predicate on the "slug" field.

func SlugGTE

func SlugGTE(v string) predicate.Thread

SlugGTE applies the GTE predicate on the "slug" field.

func SlugHasPrefix

func SlugHasPrefix(v string) predicate.Thread

SlugHasPrefix applies the HasPrefix predicate on the "slug" field.

func SlugHasSuffix

func SlugHasSuffix(v string) predicate.Thread

SlugHasSuffix applies the HasSuffix predicate on the "slug" field.

func SlugIn

func SlugIn(vs ...string) predicate.Thread

SlugIn applies the In predicate on the "slug" field.

func SlugLT

func SlugLT(v string) predicate.Thread

SlugLT applies the LT predicate on the "slug" field.

func SlugLTE

func SlugLTE(v string) predicate.Thread

SlugLTE applies the LTE predicate on the "slug" field.

func SlugNEQ

func SlugNEQ(v string) predicate.Thread

SlugNEQ applies the NEQ predicate on the "slug" field.

func SlugNotIn

func SlugNotIn(vs ...string) predicate.Thread

SlugNotIn applies the NotIn predicate on the "slug" field.

func Title

func Title(v string) predicate.Thread

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

func TitleContains

func TitleContains(v string) predicate.Thread

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

func TitleContainsFold

func TitleContainsFold(v string) predicate.Thread

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

func TitleEQ

func TitleEQ(v string) predicate.Thread

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

func TitleEqualFold

func TitleEqualFold(v string) predicate.Thread

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

func TitleGT

func TitleGT(v string) predicate.Thread

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

func TitleGTE

func TitleGTE(v string) predicate.Thread

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

func TitleHasPrefix

func TitleHasPrefix(v string) predicate.Thread

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

func TitleHasSuffix

func TitleHasSuffix(v string) predicate.Thread

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

func TitleIn

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

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

func TitleLT

func TitleLT(v string) predicate.Thread

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

func TitleLTE

func TitleLTE(v string) predicate.Thread

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

func TitleNEQ

func TitleNEQ(v string) predicate.Thread

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

func TitleNotIn

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

TitleNotIn applies the NotIn predicate on the "title" 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 Thread queries.

func ByCreatedAt

func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption

ByCreatedAt orders the results by the created_at field.

func ByCreatedBy

func ByCreatedBy(opts ...sql.OrderTermOption) OrderOption

ByCreatedBy orders the results by the created_by field.

func ByDescription

func ByDescription(opts ...sql.OrderTermOption) OrderOption

ByDescription orders the results by the description field.

func ByID

func ByID(opts ...sql.OrderTermOption) OrderOption

ByID orders the results by the id field.

func ByKudoedUsers

func ByKudoedUsers(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption

ByKudoedUsers orders the results by kudoed_users terms.

func ByKudoedUsersCount

func ByKudoedUsersCount(opts ...sql.OrderTermOption) OrderOption

ByKudoedUsersCount orders the results by kudoed_users count.

func ByModifiedAt

func ByModifiedAt(opts ...sql.OrderTermOption) OrderOption

ByModifiedAt orders the results by the modified_at field.

func BySlug

func BySlug(opts ...sql.OrderTermOption) OrderOption

BySlug orders the results by the slug field.

func ByTags

func ByTags(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption

ByTags orders the results by tags terms.

func ByTagsCount

func ByTagsCount(opts ...sql.OrderTermOption) OrderOption

ByTagsCount orders the results by tags count.

func ByThreadComments

func ByThreadComments(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption

ByThreadComments orders the results by thread_comments terms.

func ByThreadCommentsCount

func ByThreadCommentsCount(opts ...sql.OrderTermOption) OrderOption

ByThreadCommentsCount orders the results by thread_comments count.

func ByThreadKudoes

func ByThreadKudoes(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption

ByThreadKudoes orders the results by thread_kudoes terms.

func ByThreadKudoesCount

func ByThreadKudoesCount(opts ...sql.OrderTermOption) OrderOption

ByThreadKudoesCount orders the results by thread_kudoes count.

func ByTitle

func ByTitle(opts ...sql.OrderTermOption) OrderOption

ByTitle orders the results by the title field.

func ByTopicsField

func ByTopicsField(field string, opts ...sql.OrderTermOption) OrderOption

ByTopicsField orders the results by topics field.

func ByUsersField

func ByUsersField(field string, opts ...sql.OrderTermOption) OrderOption

ByUsersField orders the results by users field.

Jump to

Keyboard shortcuts

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