topic

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: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the topic type in the database.
	Label = "topic"
	// 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"
	// FieldShortDescription holds the string denoting the short_description field in the database.
	FieldShortDescription = "short_description"
	// FieldDescription holds the string denoting the description field in the database.
	FieldDescription = "description"
	// FieldProfilePicURL holds the string denoting the profile_pic_url field in the database.
	FieldProfilePicURL = "profile_pic_url"
	// FieldCreatedAt holds the string denoting the created_at field in the database.
	FieldCreatedAt = "created_at"
	// EdgeTopicThreads holds the string denoting the topic_threads edge name in mutations.
	EdgeTopicThreads = "topic_threads"
	// EdgeTopicModerators holds the string denoting the topic_moderators edge name in mutations.
	EdgeTopicModerators = "topic_moderators"
	// EdgeModerators holds the string denoting the moderators edge name in mutations.
	EdgeModerators = "moderators"
	// Table holds the table name of the topic in the database.
	Table = "topics"
	// TopicThreadsTable is the table that holds the topic_threads relation/edge.
	TopicThreadsTable = "threads"
	// TopicThreadsInverseTable is the table name for the Thread entity.
	// It exists in this package in order to avoid circular dependency with the "thread" package.
	TopicThreadsInverseTable = "threads"
	// TopicThreadsColumn is the table column denoting the topic_threads relation/edge.
	TopicThreadsColumn = "topic_topic_threads"
	// TopicModeratorsTable is the table that holds the topic_moderators relation/edge. The primary key declared below.
	TopicModeratorsTable = "moderators"
	// TopicModeratorsInverseTable is the table name for the User entity.
	// It exists in this package in order to avoid circular dependency with the "user" package.
	TopicModeratorsInverseTable = "users"
	// ModeratorsTable is the table that holds the moderators relation/edge.
	ModeratorsTable = "moderators"
	// ModeratorsInverseTable is the table name for the Moderator entity.
	// It exists in this package in order to avoid circular dependency with the "moderator" package.
	ModeratorsInverseTable = "moderators"
	// ModeratorsColumn is the table column denoting the moderators relation/edge.
	ModeratorsColumn = "topic_id"
)

Variables

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
	// ShortDescriptionValidator is a validator for the "short_description" field. It is called by the builders before save.
	ShortDescriptionValidator 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 topic fields.

View Source
var (
	// TopicModeratorsPrimaryKey and TopicModeratorsColumn2 are the table columns denoting the
	// primary key for the topic_moderators relation (M2M).
	TopicModeratorsPrimaryKey = []string{"moderator_id", "topic_id"}
)

Functions

func And

func And(predicates ...predicate.Topic) predicate.Topic

And groups predicates with the AND operator between them.

func CreatedAt

func CreatedAt(v time.Time) predicate.Topic

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

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Topic

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

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Topic

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

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Topic

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

func CreatedAtIn

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

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

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Topic

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

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Topic

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

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Topic

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

func CreatedAtNotIn

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

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

func Description

func Description(v string) predicate.Topic

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

func DescriptionContains

func DescriptionContains(v string) predicate.Topic

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

func DescriptionContainsFold

func DescriptionContainsFold(v string) predicate.Topic

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

func DescriptionEQ

func DescriptionEQ(v string) predicate.Topic

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

func DescriptionEqualFold

func DescriptionEqualFold(v string) predicate.Topic

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

func DescriptionGT

func DescriptionGT(v string) predicate.Topic

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

func DescriptionGTE

func DescriptionGTE(v string) predicate.Topic

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

func DescriptionHasPrefix

func DescriptionHasPrefix(v string) predicate.Topic

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

func DescriptionHasSuffix

func DescriptionHasSuffix(v string) predicate.Topic

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

func DescriptionIn

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

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

func DescriptionIsNil

func DescriptionIsNil() predicate.Topic

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

func DescriptionLT

func DescriptionLT(v string) predicate.Topic

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

func DescriptionLTE

func DescriptionLTE(v string) predicate.Topic

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

func DescriptionNEQ

func DescriptionNEQ(v string) predicate.Topic

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

func DescriptionNotIn

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

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

func DescriptionNotNil

func DescriptionNotNil() predicate.Topic

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

func HasModerators

func HasModerators() predicate.Topic

HasModerators applies the HasEdge predicate on the "moderators" edge.

func HasModeratorsWith

func HasModeratorsWith(preds ...predicate.Moderator) predicate.Topic

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

func HasTopicModerators

func HasTopicModerators() predicate.Topic

HasTopicModerators applies the HasEdge predicate on the "topic_moderators" edge.

func HasTopicModeratorsWith

func HasTopicModeratorsWith(preds ...predicate.User) predicate.Topic

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

func HasTopicThreads

func HasTopicThreads() predicate.Topic

HasTopicThreads applies the HasEdge predicate on the "topic_threads" edge.

func HasTopicThreadsWith

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

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

func ID

func ID(id int) predicate.Topic

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Topic

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Topic

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Topic

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Topic

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Topic

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Topic

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

IDNotIn applies the NotIn predicate on the ID field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Topic) predicate.Topic

Or groups predicates with the OR operator between them.

func ProfilePicURL

func ProfilePicURL(v string) predicate.Topic

ProfilePicURL applies equality check predicate on the "profile_pic_url" field. It's identical to ProfilePicURLEQ.

func ProfilePicURLContains

func ProfilePicURLContains(v string) predicate.Topic

ProfilePicURLContains applies the Contains predicate on the "profile_pic_url" field.

func ProfilePicURLContainsFold

func ProfilePicURLContainsFold(v string) predicate.Topic

ProfilePicURLContainsFold applies the ContainsFold predicate on the "profile_pic_url" field.

func ProfilePicURLEQ

func ProfilePicURLEQ(v string) predicate.Topic

ProfilePicURLEQ applies the EQ predicate on the "profile_pic_url" field.

func ProfilePicURLEqualFold

func ProfilePicURLEqualFold(v string) predicate.Topic

ProfilePicURLEqualFold applies the EqualFold predicate on the "profile_pic_url" field.

func ProfilePicURLGT

func ProfilePicURLGT(v string) predicate.Topic

ProfilePicURLGT applies the GT predicate on the "profile_pic_url" field.

func ProfilePicURLGTE

func ProfilePicURLGTE(v string) predicate.Topic

ProfilePicURLGTE applies the GTE predicate on the "profile_pic_url" field.

func ProfilePicURLHasPrefix

func ProfilePicURLHasPrefix(v string) predicate.Topic

ProfilePicURLHasPrefix applies the HasPrefix predicate on the "profile_pic_url" field.

func ProfilePicURLHasSuffix

func ProfilePicURLHasSuffix(v string) predicate.Topic

ProfilePicURLHasSuffix applies the HasSuffix predicate on the "profile_pic_url" field.

func ProfilePicURLIn

func ProfilePicURLIn(vs ...string) predicate.Topic

ProfilePicURLIn applies the In predicate on the "profile_pic_url" field.

func ProfilePicURLIsNil

func ProfilePicURLIsNil() predicate.Topic

ProfilePicURLIsNil applies the IsNil predicate on the "profile_pic_url" field.

func ProfilePicURLLT

func ProfilePicURLLT(v string) predicate.Topic

ProfilePicURLLT applies the LT predicate on the "profile_pic_url" field.

func ProfilePicURLLTE

func ProfilePicURLLTE(v string) predicate.Topic

ProfilePicURLLTE applies the LTE predicate on the "profile_pic_url" field.

func ProfilePicURLNEQ

func ProfilePicURLNEQ(v string) predicate.Topic

ProfilePicURLNEQ applies the NEQ predicate on the "profile_pic_url" field.

func ProfilePicURLNotIn

func ProfilePicURLNotIn(vs ...string) predicate.Topic

ProfilePicURLNotIn applies the NotIn predicate on the "profile_pic_url" field.

func ProfilePicURLNotNil

func ProfilePicURLNotNil() predicate.Topic

ProfilePicURLNotNil applies the NotNil predicate on the "profile_pic_url" field.

func ShortDescription

func ShortDescription(v string) predicate.Topic

ShortDescription applies equality check predicate on the "short_description" field. It's identical to ShortDescriptionEQ.

func ShortDescriptionContains

func ShortDescriptionContains(v string) predicate.Topic

ShortDescriptionContains applies the Contains predicate on the "short_description" field.

func ShortDescriptionContainsFold

func ShortDescriptionContainsFold(v string) predicate.Topic

ShortDescriptionContainsFold applies the ContainsFold predicate on the "short_description" field.

func ShortDescriptionEQ

func ShortDescriptionEQ(v string) predicate.Topic

ShortDescriptionEQ applies the EQ predicate on the "short_description" field.

func ShortDescriptionEqualFold

func ShortDescriptionEqualFold(v string) predicate.Topic

ShortDescriptionEqualFold applies the EqualFold predicate on the "short_description" field.

func ShortDescriptionGT

func ShortDescriptionGT(v string) predicate.Topic

ShortDescriptionGT applies the GT predicate on the "short_description" field.

func ShortDescriptionGTE

func ShortDescriptionGTE(v string) predicate.Topic

ShortDescriptionGTE applies the GTE predicate on the "short_description" field.

func ShortDescriptionHasPrefix

func ShortDescriptionHasPrefix(v string) predicate.Topic

ShortDescriptionHasPrefix applies the HasPrefix predicate on the "short_description" field.

func ShortDescriptionHasSuffix

func ShortDescriptionHasSuffix(v string) predicate.Topic

ShortDescriptionHasSuffix applies the HasSuffix predicate on the "short_description" field.

func ShortDescriptionIn

func ShortDescriptionIn(vs ...string) predicate.Topic

ShortDescriptionIn applies the In predicate on the "short_description" field.

func ShortDescriptionLT

func ShortDescriptionLT(v string) predicate.Topic

ShortDescriptionLT applies the LT predicate on the "short_description" field.

func ShortDescriptionLTE

func ShortDescriptionLTE(v string) predicate.Topic

ShortDescriptionLTE applies the LTE predicate on the "short_description" field.

func ShortDescriptionNEQ

func ShortDescriptionNEQ(v string) predicate.Topic

ShortDescriptionNEQ applies the NEQ predicate on the "short_description" field.

func ShortDescriptionNotIn

func ShortDescriptionNotIn(vs ...string) predicate.Topic

ShortDescriptionNotIn applies the NotIn predicate on the "short_description" field.

func Slug

func Slug(v string) predicate.Topic

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

func SlugContains

func SlugContains(v string) predicate.Topic

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

func SlugContainsFold

func SlugContainsFold(v string) predicate.Topic

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

func SlugEQ

func SlugEQ(v string) predicate.Topic

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

func SlugEqualFold

func SlugEqualFold(v string) predicate.Topic

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

func SlugGT

func SlugGT(v string) predicate.Topic

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

func SlugGTE

func SlugGTE(v string) predicate.Topic

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

func SlugHasPrefix

func SlugHasPrefix(v string) predicate.Topic

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

func SlugHasSuffix

func SlugHasSuffix(v string) predicate.Topic

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

func SlugIn

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

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

func SlugLT

func SlugLT(v string) predicate.Topic

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

func SlugLTE

func SlugLTE(v string) predicate.Topic

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

func SlugNEQ

func SlugNEQ(v string) predicate.Topic

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

func SlugNotIn

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

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

func Title

func Title(v string) predicate.Topic

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

func TitleContains

func TitleContains(v string) predicate.Topic

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

func TitleContainsFold

func TitleContainsFold(v string) predicate.Topic

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

func TitleEQ

func TitleEQ(v string) predicate.Topic

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

func TitleEqualFold

func TitleEqualFold(v string) predicate.Topic

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

func TitleGT

func TitleGT(v string) predicate.Topic

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

func TitleGTE

func TitleGTE(v string) predicate.Topic

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

func TitleHasPrefix

func TitleHasPrefix(v string) predicate.Topic

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

func TitleHasSuffix

func TitleHasSuffix(v string) predicate.Topic

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

func TitleIn

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

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

func TitleLT

func TitleLT(v string) predicate.Topic

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

func TitleLTE

func TitleLTE(v string) predicate.Topic

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

func TitleNEQ

func TitleNEQ(v string) predicate.Topic

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

func TitleNotIn

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

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 Topic queries.

func ByCreatedAt

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

ByCreatedAt orders the results by the created_at 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 ByModerators

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

ByModerators orders the results by moderators terms.

func ByModeratorsCount

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

ByModeratorsCount orders the results by moderators count.

func ByProfilePicURL

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

ByProfilePicURL orders the results by the profile_pic_url field.

func ByShortDescription

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

ByShortDescription orders the results by the short_description field.

func BySlug

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

BySlug orders the results by the slug field.

func ByTitle

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

ByTitle orders the results by the title field.

func ByTopicModerators

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

ByTopicModerators orders the results by topic_moderators terms.

func ByTopicModeratorsCount

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

ByTopicModeratorsCount orders the results by topic_moderators count.

func ByTopicThreads

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

ByTopicThreads orders the results by topic_threads terms.

func ByTopicThreadsCount

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

ByTopicThreadsCount orders the results by topic_threads count.

Jump to

Keyboard shortcuts

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