Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Thread) predicate.Thread
- func CreatedAt(v time.Time) predicate.Thread
- func CreatedAtEQ(v time.Time) predicate.Thread
- func CreatedAtGT(v time.Time) predicate.Thread
- func CreatedAtGTE(v time.Time) predicate.Thread
- func CreatedAtIn(vs ...time.Time) predicate.Thread
- func CreatedAtLT(v time.Time) predicate.Thread
- func CreatedAtLTE(v time.Time) predicate.Thread
- func CreatedAtNEQ(v time.Time) predicate.Thread
- func CreatedAtNotIn(vs ...time.Time) predicate.Thread
- func CreatedBy(v uuid.UUID) predicate.Thread
- func CreatedByEQ(v uuid.UUID) predicate.Thread
- func CreatedByIn(vs ...uuid.UUID) predicate.Thread
- func CreatedByNEQ(v uuid.UUID) predicate.Thread
- func CreatedByNotIn(vs ...uuid.UUID) predicate.Thread
- func Description(v string) predicate.Thread
- func DescriptionContains(v string) predicate.Thread
- func DescriptionContainsFold(v string) predicate.Thread
- func DescriptionEQ(v string) predicate.Thread
- func DescriptionEqualFold(v string) predicate.Thread
- func DescriptionGT(v string) predicate.Thread
- func DescriptionGTE(v string) predicate.Thread
- func DescriptionHasPrefix(v string) predicate.Thread
- func DescriptionHasSuffix(v string) predicate.Thread
- func DescriptionIn(vs ...string) predicate.Thread
- func DescriptionIsNil() predicate.Thread
- func DescriptionLT(v string) predicate.Thread
- func DescriptionLTE(v string) predicate.Thread
- func DescriptionNEQ(v string) predicate.Thread
- func DescriptionNotIn(vs ...string) predicate.Thread
- func DescriptionNotNil() predicate.Thread
- func HasKudoedUsers() predicate.Thread
- func HasKudoedUsersWith(preds ...predicate.User) predicate.Thread
- func HasTags() predicate.Thread
- func HasTagsWith(preds ...predicate.Tag) predicate.Thread
- func HasThreadComments() predicate.Thread
- func HasThreadCommentsWith(preds ...predicate.Comment) predicate.Thread
- func HasThreadKudoes() predicate.Thread
- func HasThreadKudoesWith(preds ...predicate.ThreadKudo) predicate.Thread
- func HasTopics() predicate.Thread
- func HasTopicsWith(preds ...predicate.Topic) predicate.Thread
- func HasUsers() predicate.Thread
- func HasUsersWith(preds ...predicate.User) predicate.Thread
- func ID(id int) predicate.Thread
- func IDEQ(id int) predicate.Thread
- func IDGT(id int) predicate.Thread
- func IDGTE(id int) predicate.Thread
- func IDIn(ids ...int) predicate.Thread
- func IDLT(id int) predicate.Thread
- func IDLTE(id int) predicate.Thread
- func IDNEQ(id int) predicate.Thread
- func IDNotIn(ids ...int) predicate.Thread
- func ModifiedAt(v time.Time) predicate.Thread
- func ModifiedAtEQ(v time.Time) predicate.Thread
- func ModifiedAtGT(v time.Time) predicate.Thread
- func ModifiedAtGTE(v time.Time) predicate.Thread
- func ModifiedAtIn(vs ...time.Time) predicate.Thread
- func ModifiedAtIsNil() predicate.Thread
- func ModifiedAtLT(v time.Time) predicate.Thread
- func ModifiedAtLTE(v time.Time) predicate.Thread
- func ModifiedAtNEQ(v time.Time) predicate.Thread
- func ModifiedAtNotIn(vs ...time.Time) predicate.Thread
- func ModifiedAtNotNil() predicate.Thread
- func Not(p predicate.Thread) predicate.Thread
- func Or(predicates ...predicate.Thread) predicate.Thread
- func Slug(v string) predicate.Thread
- func SlugContains(v string) predicate.Thread
- func SlugContainsFold(v string) predicate.Thread
- func SlugEQ(v string) predicate.Thread
- func SlugEqualFold(v string) predicate.Thread
- func SlugGT(v string) predicate.Thread
- func SlugGTE(v string) predicate.Thread
- func SlugHasPrefix(v string) predicate.Thread
- func SlugHasSuffix(v string) predicate.Thread
- func SlugIn(vs ...string) predicate.Thread
- func SlugLT(v string) predicate.Thread
- func SlugLTE(v string) predicate.Thread
- func SlugNEQ(v string) predicate.Thread
- func SlugNotIn(vs ...string) predicate.Thread
- func Title(v string) predicate.Thread
- func TitleContains(v string) predicate.Thread
- func TitleContainsFold(v string) predicate.Thread
- func TitleEQ(v string) predicate.Thread
- func TitleEqualFold(v string) predicate.Thread
- func TitleGT(v string) predicate.Thread
- func TitleGTE(v string) predicate.Thread
- func TitleHasPrefix(v string) predicate.Thread
- func TitleHasSuffix(v string) predicate.Thread
- func TitleIn(vs ...string) predicate.Thread
- func TitleLT(v string) predicate.Thread
- func TitleLTE(v string) predicate.Thread
- func TitleNEQ(v string) predicate.Thread
- func TitleNotIn(vs ...string) predicate.Thread
- func ValidColumn(column string) bool
- type OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByCreatedBy(opts ...sql.OrderTermOption) OrderOption
- func ByDescription(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByKudoedUsers(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByKudoedUsersCount(opts ...sql.OrderTermOption) OrderOption
- func ByModifiedAt(opts ...sql.OrderTermOption) OrderOption
- func BySlug(opts ...sql.OrderTermOption) OrderOption
- func ByTags(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByTagsCount(opts ...sql.OrderTermOption) OrderOption
- func ByThreadComments(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByThreadCommentsCount(opts ...sql.OrderTermOption) OrderOption
- func ByThreadKudoes(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByThreadKudoesCount(opts ...sql.OrderTermOption) OrderOption
- func ByTitle(opts ...sql.OrderTermOption) OrderOption
- func ByTopicsField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByUsersField(field string, opts ...sql.OrderTermOption) OrderOption
Constants ¶
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 ¶
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"} )
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 )
var Columns = []string{ FieldID, FieldTitle, FieldSlug, FieldDescription, FieldModifiedAt, FieldCreatedBy, FieldCreatedAt, }
Columns holds all SQL columns for thread fields.
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 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 CreatedBy ¶
CreatedBy applies equality check predicate on the "created_by" field. It's identical to CreatedByEQ.
func CreatedByEQ ¶
CreatedByEQ applies the EQ predicate on the "created_by" field.
func CreatedByIn ¶
CreatedByIn applies the In predicate on the "created_by" field.
func CreatedByNEQ ¶
CreatedByNEQ applies the NEQ predicate on the "created_by" field.
func CreatedByNotIn ¶
CreatedByNotIn applies the NotIn predicate on the "created_by" 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 HasKudoedUsers ¶
HasKudoedUsers applies the HasEdge predicate on the "kudoed_users" edge.
func HasKudoedUsersWith ¶
HasKudoedUsersWith applies the HasEdge predicate on the "kudoed_users" edge with a given conditions (other predicates).
func HasTagsWith ¶
HasTagsWith applies the HasEdge predicate on the "tags" edge with a given conditions (other predicates).
func HasThreadComments ¶
HasThreadComments applies the HasEdge predicate on the "thread_comments" edge.
func HasThreadCommentsWith ¶
HasThreadCommentsWith applies the HasEdge predicate on the "thread_comments" edge with a given conditions (other predicates).
func HasThreadKudoes ¶
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 HasTopicsWith ¶
HasTopicsWith applies the HasEdge predicate on the "topics" edge with a given conditions (other predicates).
func HasUsersWith ¶
HasUsersWith applies the HasEdge predicate on the "users" edge with a given conditions (other predicates).
func ModifiedAt ¶
ModifiedAt applies equality check predicate on the "modified_at" field. It's identical to ModifiedAtEQ.
func ModifiedAtEQ ¶
ModifiedAtEQ applies the EQ predicate on the "modified_at" field.
func ModifiedAtGT ¶
ModifiedAtGT applies the GT predicate on the "modified_at" field.
func ModifiedAtGTE ¶
ModifiedAtGTE applies the GTE predicate on the "modified_at" field.
func ModifiedAtIn ¶
ModifiedAtIn applies the In predicate on the "modified_at" field.
func ModifiedAtIsNil ¶
ModifiedAtIsNil applies the IsNil predicate on the "modified_at" field.
func ModifiedAtLT ¶
ModifiedAtLT applies the LT predicate on the "modified_at" field.
func ModifiedAtLTE ¶
ModifiedAtLTE applies the LTE predicate on the "modified_at" field.
func ModifiedAtNEQ ¶
ModifiedAtNEQ applies the NEQ predicate on the "modified_at" field.
func ModifiedAtNotIn ¶
ModifiedAtNotIn applies the NotIn predicate on the "modified_at" field.
func ModifiedAtNotNil ¶
ModifiedAtNotNil applies the NotNil predicate on the "modified_at" 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 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.