Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Topic) predicate.Topic
- func CreatedAt(v time.Time) predicate.Topic
- func CreatedAtEQ(v time.Time) predicate.Topic
- func CreatedAtGT(v time.Time) predicate.Topic
- func CreatedAtGTE(v time.Time) predicate.Topic
- func CreatedAtIn(vs ...time.Time) predicate.Topic
- func CreatedAtLT(v time.Time) predicate.Topic
- func CreatedAtLTE(v time.Time) predicate.Topic
- func CreatedAtNEQ(v time.Time) predicate.Topic
- func CreatedAtNotIn(vs ...time.Time) predicate.Topic
- func Description(v string) predicate.Topic
- func DescriptionContains(v string) predicate.Topic
- func DescriptionContainsFold(v string) predicate.Topic
- func DescriptionEQ(v string) predicate.Topic
- func DescriptionEqualFold(v string) predicate.Topic
- func DescriptionGT(v string) predicate.Topic
- func DescriptionGTE(v string) predicate.Topic
- func DescriptionHasPrefix(v string) predicate.Topic
- func DescriptionHasSuffix(v string) predicate.Topic
- func DescriptionIn(vs ...string) predicate.Topic
- func DescriptionIsNil() predicate.Topic
- func DescriptionLT(v string) predicate.Topic
- func DescriptionLTE(v string) predicate.Topic
- func DescriptionNEQ(v string) predicate.Topic
- func DescriptionNotIn(vs ...string) predicate.Topic
- func DescriptionNotNil() predicate.Topic
- func HasModerators() predicate.Topic
- func HasModeratorsWith(preds ...predicate.Moderator) predicate.Topic
- func HasTopicModerators() predicate.Topic
- func HasTopicModeratorsWith(preds ...predicate.User) predicate.Topic
- func HasTopicThreads() predicate.Topic
- func HasTopicThreadsWith(preds ...predicate.Thread) predicate.Topic
- func ID(id int) predicate.Topic
- func IDEQ(id int) predicate.Topic
- func IDGT(id int) predicate.Topic
- func IDGTE(id int) predicate.Topic
- func IDIn(ids ...int) predicate.Topic
- func IDLT(id int) predicate.Topic
- func IDLTE(id int) predicate.Topic
- func IDNEQ(id int) predicate.Topic
- func IDNotIn(ids ...int) predicate.Topic
- func Not(p predicate.Topic) predicate.Topic
- func Or(predicates ...predicate.Topic) predicate.Topic
- func ProfilePicURL(v string) predicate.Topic
- func ProfilePicURLContains(v string) predicate.Topic
- func ProfilePicURLContainsFold(v string) predicate.Topic
- func ProfilePicURLEQ(v string) predicate.Topic
- func ProfilePicURLEqualFold(v string) predicate.Topic
- func ProfilePicURLGT(v string) predicate.Topic
- func ProfilePicURLGTE(v string) predicate.Topic
- func ProfilePicURLHasPrefix(v string) predicate.Topic
- func ProfilePicURLHasSuffix(v string) predicate.Topic
- func ProfilePicURLIn(vs ...string) predicate.Topic
- func ProfilePicURLIsNil() predicate.Topic
- func ProfilePicURLLT(v string) predicate.Topic
- func ProfilePicURLLTE(v string) predicate.Topic
- func ProfilePicURLNEQ(v string) predicate.Topic
- func ProfilePicURLNotIn(vs ...string) predicate.Topic
- func ProfilePicURLNotNil() predicate.Topic
- func ShortDescription(v string) predicate.Topic
- func ShortDescriptionContains(v string) predicate.Topic
- func ShortDescriptionContainsFold(v string) predicate.Topic
- func ShortDescriptionEQ(v string) predicate.Topic
- func ShortDescriptionEqualFold(v string) predicate.Topic
- func ShortDescriptionGT(v string) predicate.Topic
- func ShortDescriptionGTE(v string) predicate.Topic
- func ShortDescriptionHasPrefix(v string) predicate.Topic
- func ShortDescriptionHasSuffix(v string) predicate.Topic
- func ShortDescriptionIn(vs ...string) predicate.Topic
- func ShortDescriptionLT(v string) predicate.Topic
- func ShortDescriptionLTE(v string) predicate.Topic
- func ShortDescriptionNEQ(v string) predicate.Topic
- func ShortDescriptionNotIn(vs ...string) predicate.Topic
- func Slug(v string) predicate.Topic
- func SlugContains(v string) predicate.Topic
- func SlugContainsFold(v string) predicate.Topic
- func SlugEQ(v string) predicate.Topic
- func SlugEqualFold(v string) predicate.Topic
- func SlugGT(v string) predicate.Topic
- func SlugGTE(v string) predicate.Topic
- func SlugHasPrefix(v string) predicate.Topic
- func SlugHasSuffix(v string) predicate.Topic
- func SlugIn(vs ...string) predicate.Topic
- func SlugLT(v string) predicate.Topic
- func SlugLTE(v string) predicate.Topic
- func SlugNEQ(v string) predicate.Topic
- func SlugNotIn(vs ...string) predicate.Topic
- func Title(v string) predicate.Topic
- func TitleContains(v string) predicate.Topic
- func TitleContainsFold(v string) predicate.Topic
- func TitleEQ(v string) predicate.Topic
- func TitleEqualFold(v string) predicate.Topic
- func TitleGT(v string) predicate.Topic
- func TitleGTE(v string) predicate.Topic
- func TitleHasPrefix(v string) predicate.Topic
- func TitleHasSuffix(v string) predicate.Topic
- func TitleIn(vs ...string) predicate.Topic
- func TitleLT(v string) predicate.Topic
- func TitleLTE(v string) predicate.Topic
- func TitleNEQ(v string) predicate.Topic
- func TitleNotIn(vs ...string) predicate.Topic
- func ValidColumn(column string) bool
- type OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByDescription(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByModerators(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByModeratorsCount(opts ...sql.OrderTermOption) OrderOption
- func ByProfilePicURL(opts ...sql.OrderTermOption) OrderOption
- func ByShortDescription(opts ...sql.OrderTermOption) OrderOption
- func BySlug(opts ...sql.OrderTermOption) OrderOption
- func ByTitle(opts ...sql.OrderTermOption) OrderOption
- func ByTopicModerators(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByTopicModeratorsCount(opts ...sql.OrderTermOption) OrderOption
- func ByTopicThreads(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByTopicThreadsCount(opts ...sql.OrderTermOption) OrderOption
Constants ¶
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 ¶
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 )
var Columns = []string{ FieldID, FieldTitle, FieldSlug, FieldShortDescription, FieldDescription, FieldProfilePicURL, FieldCreatedAt, }
Columns holds all SQL columns for topic fields.
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 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 Description ¶
Description applies equality check predicate on the "description" field. It's identical to DescriptionEQ.
func DescriptionContains ¶
DescriptionContains applies the Contains predicate on the "description" field.
func DescriptionContainsFold ¶
DescriptionContainsFold applies the ContainsFold predicate on the "description" field.
func DescriptionEQ ¶
DescriptionEQ applies the EQ predicate on the "description" field.
func DescriptionEqualFold ¶
DescriptionEqualFold applies the EqualFold predicate on the "description" field.
func DescriptionGT ¶
DescriptionGT applies the GT predicate on the "description" field.
func DescriptionGTE ¶
DescriptionGTE applies the GTE predicate on the "description" field.
func DescriptionHasPrefix ¶
DescriptionHasPrefix applies the HasPrefix predicate on the "description" field.
func DescriptionHasSuffix ¶
DescriptionHasSuffix applies the HasSuffix predicate on the "description" field.
func DescriptionIn ¶
DescriptionIn applies the In predicate on the "description" field.
func DescriptionIsNil ¶
DescriptionIsNil applies the IsNil predicate on the "description" field.
func DescriptionLT ¶
DescriptionLT applies the LT predicate on the "description" field.
func DescriptionLTE ¶
DescriptionLTE applies the LTE predicate on the "description" field.
func DescriptionNEQ ¶
DescriptionNEQ applies the NEQ predicate on the "description" field.
func DescriptionNotIn ¶
DescriptionNotIn applies the NotIn predicate on the "description" field.
func DescriptionNotNil ¶
DescriptionNotNil applies the NotNil predicate on the "description" field.
func HasModerators ¶
HasModerators applies the HasEdge predicate on the "moderators" edge.
func HasModeratorsWith ¶
HasModeratorsWith applies the HasEdge predicate on the "moderators" edge with a given conditions (other predicates).
func HasTopicModerators ¶
HasTopicModerators applies the HasEdge predicate on the "topic_moderators" edge.
func HasTopicModeratorsWith ¶
HasTopicModeratorsWith applies the HasEdge predicate on the "topic_moderators" edge with a given conditions (other predicates).
func HasTopicThreads ¶
HasTopicThreads applies the HasEdge predicate on the "topic_threads" edge.
func HasTopicThreadsWith ¶
HasTopicThreadsWith applies the HasEdge predicate on the "topic_threads" edge with a given conditions (other predicates).
func ProfilePicURL ¶
ProfilePicURL applies equality check predicate on the "profile_pic_url" field. It's identical to ProfilePicURLEQ.
func ProfilePicURLContains ¶
ProfilePicURLContains applies the Contains predicate on the "profile_pic_url" field.
func ProfilePicURLContainsFold ¶
ProfilePicURLContainsFold applies the ContainsFold predicate on the "profile_pic_url" field.
func ProfilePicURLEQ ¶
ProfilePicURLEQ applies the EQ predicate on the "profile_pic_url" field.
func ProfilePicURLEqualFold ¶
ProfilePicURLEqualFold applies the EqualFold predicate on the "profile_pic_url" field.
func ProfilePicURLGT ¶
ProfilePicURLGT applies the GT predicate on the "profile_pic_url" field.
func ProfilePicURLGTE ¶
ProfilePicURLGTE applies the GTE predicate on the "profile_pic_url" field.
func ProfilePicURLHasPrefix ¶
ProfilePicURLHasPrefix applies the HasPrefix predicate on the "profile_pic_url" field.
func ProfilePicURLHasSuffix ¶
ProfilePicURLHasSuffix applies the HasSuffix predicate on the "profile_pic_url" field.
func ProfilePicURLIn ¶
ProfilePicURLIn applies the In predicate on the "profile_pic_url" field.
func ProfilePicURLIsNil ¶
ProfilePicURLIsNil applies the IsNil predicate on the "profile_pic_url" field.
func ProfilePicURLLT ¶
ProfilePicURLLT applies the LT predicate on the "profile_pic_url" field.
func ProfilePicURLLTE ¶
ProfilePicURLLTE applies the LTE predicate on the "profile_pic_url" field.
func ProfilePicURLNEQ ¶
ProfilePicURLNEQ applies the NEQ predicate on the "profile_pic_url" field.
func ProfilePicURLNotIn ¶
ProfilePicURLNotIn applies the NotIn predicate on the "profile_pic_url" field.
func ProfilePicURLNotNil ¶
ProfilePicURLNotNil applies the NotNil predicate on the "profile_pic_url" field.
func ShortDescription ¶
ShortDescription applies equality check predicate on the "short_description" field. It's identical to ShortDescriptionEQ.
func ShortDescriptionContains ¶
ShortDescriptionContains applies the Contains predicate on the "short_description" field.
func ShortDescriptionContainsFold ¶
ShortDescriptionContainsFold applies the ContainsFold predicate on the "short_description" field.
func ShortDescriptionEQ ¶
ShortDescriptionEQ applies the EQ predicate on the "short_description" field.
func ShortDescriptionEqualFold ¶
ShortDescriptionEqualFold applies the EqualFold predicate on the "short_description" field.
func ShortDescriptionGT ¶
ShortDescriptionGT applies the GT predicate on the "short_description" field.
func ShortDescriptionGTE ¶
ShortDescriptionGTE applies the GTE predicate on the "short_description" field.
func ShortDescriptionHasPrefix ¶
ShortDescriptionHasPrefix applies the HasPrefix predicate on the "short_description" field.
func ShortDescriptionHasSuffix ¶
ShortDescriptionHasSuffix applies the HasSuffix predicate on the "short_description" field.
func ShortDescriptionIn ¶
ShortDescriptionIn applies the In predicate on the "short_description" field.
func ShortDescriptionLT ¶
ShortDescriptionLT applies the LT predicate on the "short_description" field.
func ShortDescriptionLTE ¶
ShortDescriptionLTE applies the LTE predicate on the "short_description" field.
func ShortDescriptionNEQ ¶
ShortDescriptionNEQ applies the NEQ predicate on the "short_description" field.
func ShortDescriptionNotIn ¶
ShortDescriptionNotIn applies the NotIn predicate on the "short_description" field.
func SlugContains ¶
SlugContains applies the Contains predicate on the "slug" field.
func SlugContainsFold ¶
SlugContainsFold applies the ContainsFold predicate on the "slug" field.
func SlugEqualFold ¶
SlugEqualFold applies the EqualFold predicate on the "slug" field.
func SlugHasPrefix ¶
SlugHasPrefix applies the HasPrefix predicate on the "slug" field.
func SlugHasSuffix ¶
SlugHasSuffix applies the HasSuffix predicate on the "slug" 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 TitleNotIn ¶
TitleNotIn applies the NotIn predicate on the "title" 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 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.