Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.ForumPost) predicate.ForumPost
- func Content(v string) predicate.ForumPost
- func ContentContains(v string) predicate.ForumPost
- func ContentContainsFold(v string) predicate.ForumPost
- func ContentEQ(v string) predicate.ForumPost
- func ContentEqualFold(v string) predicate.ForumPost
- func ContentGT(v string) predicate.ForumPost
- func ContentGTE(v string) predicate.ForumPost
- func ContentHasPrefix(v string) predicate.ForumPost
- func ContentHasSuffix(v string) predicate.ForumPost
- func ContentIn(vs ...string) predicate.ForumPost
- func ContentLT(v string) predicate.ForumPost
- func ContentLTE(v string) predicate.ForumPost
- func ContentNEQ(v string) predicate.ForumPost
- func ContentNotIn(vs ...string) predicate.ForumPost
- func HasAuthor() predicate.ForumPost
- func HasAuthorWith(preds ...predicate.User) predicate.ForumPost
- func HasChildren() predicate.ForumPost
- func HasChildrenWith(preds ...predicate.ForumPost) predicate.ForumPost
- func HasForum() predicate.ForumPost
- func HasForumWith(preds ...predicate.Forum) predicate.ForumPost
- func HasParent() predicate.ForumPost
- func HasParentWith(preds ...predicate.ForumPost) predicate.ForumPost
- func HasReactedUsers() predicate.ForumPost
- func HasReactedUsersWith(preds ...predicate.User) predicate.ForumPost
- func HasReactions() predicate.ForumPost
- func HasReactionsWith(preds ...predicate.Reaction) predicate.ForumPost
- func ID(id int) predicate.ForumPost
- func IDEQ(id int) predicate.ForumPost
- func IDGT(id int) predicate.ForumPost
- func IDGTE(id int) predicate.ForumPost
- func IDIn(ids ...int) predicate.ForumPost
- func IDLT(id int) predicate.ForumPost
- func IDLTE(id int) predicate.ForumPost
- func IDNEQ(id int) predicate.ForumPost
- func IDNotIn(ids ...int) predicate.ForumPost
- func Not(p predicate.ForumPost) predicate.ForumPost
- func Or(predicates ...predicate.ForumPost) predicate.ForumPost
- func Title(v string) predicate.ForumPost
- func TitleContains(v string) predicate.ForumPost
- func TitleContainsFold(v string) predicate.ForumPost
- func TitleEQ(v string) predicate.ForumPost
- func TitleEqualFold(v string) predicate.ForumPost
- func TitleGT(v string) predicate.ForumPost
- func TitleGTE(v string) predicate.ForumPost
- func TitleHasPrefix(v string) predicate.ForumPost
- func TitleHasSuffix(v string) predicate.ForumPost
- func TitleIn(vs ...string) predicate.ForumPost
- func TitleLT(v string) predicate.ForumPost
- func TitleLTE(v string) predicate.ForumPost
- func TitleNEQ(v string) predicate.ForumPost
- func TitleNotIn(vs ...string) predicate.ForumPost
- func ValidColumn(column string) bool
- type OrderOption
- func ByAuthorField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByChildren(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByChildrenCount(opts ...sql.OrderTermOption) OrderOption
- func ByContent(opts ...sql.OrderTermOption) OrderOption
- func ByForumField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByParentField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByReactedUsers(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByReactedUsersCount(opts ...sql.OrderTermOption) OrderOption
- func ByReactions(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByReactionsCount(opts ...sql.OrderTermOption) OrderOption
- func ByTitle(opts ...sql.OrderTermOption) OrderOption
Constants ¶
const ( // Label holds the string label denoting the forumpost type in the database. Label = "forum_post" // 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" // FieldContent holds the string denoting the content field in the database. FieldContent = "content" // FieldMentionedUsersJSON holds the string denoting the mentioned_users_json field in the database. FieldMentionedUsersJSON = "mentioned_users_json" // EdgeAuthor holds the string denoting the author edge name in mutations. EdgeAuthor = "author" // EdgeForum holds the string denoting the forum edge name in mutations. EdgeForum = "forum" // EdgeParent holds the string denoting the parent edge name in mutations. EdgeParent = "parent" // EdgeChildren holds the string denoting the children edge name in mutations. EdgeChildren = "children" // EdgeReactedUsers holds the string denoting the reacted_users edge name in mutations. EdgeReactedUsers = "reacted_users" // EdgeReactions holds the string denoting the reactions edge name in mutations. EdgeReactions = "reactions" // Table holds the table name of the forumpost in the database. Table = "forum_posts" // AuthorTable is the table that holds the author relation/edge. AuthorTable = "forum_posts" // AuthorInverseTable is the table name for the User entity. // It exists in this package in order to avoid circular dependency with the "user" package. AuthorInverseTable = "users" // AuthorColumn is the table column denoting the author relation/edge. AuthorColumn = "forum_post_author" // ForumTable is the table that holds the forum relation/edge. ForumTable = "forum_posts" // ForumInverseTable is the table name for the Forum entity. // It exists in this package in order to avoid circular dependency with the "forum" package. ForumInverseTable = "forums" // ForumColumn is the table column denoting the forum relation/edge. ForumColumn = "forum_posts" // ParentTable is the table that holds the parent relation/edge. ParentTable = "forum_posts" // ParentColumn is the table column denoting the parent relation/edge. ParentColumn = "forum_post_children" // ChildrenTable is the table that holds the children relation/edge. ChildrenTable = "forum_posts" // ChildrenColumn is the table column denoting the children relation/edge. ChildrenColumn = "forum_post_children" // ReactedUsersTable is the table that holds the reacted_users relation/edge. The primary key declared below. ReactedUsersTable = "reactions" // ReactedUsersInverseTable is the table name for the User entity. // It exists in this package in order to avoid circular dependency with the "user" package. ReactedUsersInverseTable = "users" // ReactionsTable is the table that holds the reactions relation/edge. ReactionsTable = "reactions" // ReactionsInverseTable is the table name for the Reaction entity. // It exists in this package in order to avoid circular dependency with the "reaction" package. ReactionsInverseTable = "reactions" // ReactionsColumn is the table column denoting the reactions relation/edge. ReactionsColumn = "forum_post_id" )
Variables ¶
var ( // TitleValidator is a validator for the "title" field. It is called by the builders before save. TitleValidator func(string) error // ContentValidator is a validator for the "content" field. It is called by the builders before save. ContentValidator func(string) error )
var Columns = []string{ FieldID, FieldTitle, FieldContent, FieldMentionedUsersJSON, }
Columns holds all SQL columns for forumpost fields.
var ForeignKeys = []string{
"forum_posts",
"forum_post_author",
"forum_post_children",
}
ForeignKeys holds the SQL foreign-keys that are owned by the "forum_posts" table and are not defined as standalone fields in the schema.
var ( // ReactedUsersPrimaryKey and ReactedUsersColumn2 are the table columns denoting the // primary key for the reacted_users relation (M2M). ReactedUsersPrimaryKey = []string{"forum_post_id", "user_id"} )
Functions ¶
func Content ¶
Content applies equality check predicate on the "content" field. It's identical to ContentEQ.
func ContentContains ¶
ContentContains applies the Contains predicate on the "content" field.
func ContentContainsFold ¶
ContentContainsFold applies the ContainsFold predicate on the "content" field.
func ContentEqualFold ¶
ContentEqualFold applies the EqualFold predicate on the "content" field.
func ContentGTE ¶
ContentGTE applies the GTE predicate on the "content" field.
func ContentHasPrefix ¶
ContentHasPrefix applies the HasPrefix predicate on the "content" field.
func ContentHasSuffix ¶
ContentHasSuffix applies the HasSuffix predicate on the "content" field.
func ContentLTE ¶
ContentLTE applies the LTE predicate on the "content" field.
func ContentNEQ ¶
ContentNEQ applies the NEQ predicate on the "content" field.
func ContentNotIn ¶
ContentNotIn applies the NotIn predicate on the "content" field.
func HasAuthorWith ¶
HasAuthorWith applies the HasEdge predicate on the "author" edge with a given conditions (other predicates).
func HasChildren ¶
HasChildren applies the HasEdge predicate on the "children" edge.
func HasChildrenWith ¶
HasChildrenWith applies the HasEdge predicate on the "children" edge with a given conditions (other predicates).
func HasForumWith ¶
HasForumWith applies the HasEdge predicate on the "forum" edge with a given conditions (other predicates).
func HasParentWith ¶
HasParentWith applies the HasEdge predicate on the "parent" edge with a given conditions (other predicates).
func HasReactedUsers ¶
HasReactedUsers applies the HasEdge predicate on the "reacted_users" edge.
func HasReactedUsersWith ¶
HasReactedUsersWith applies the HasEdge predicate on the "reacted_users" edge with a given conditions (other predicates).
func HasReactions ¶
HasReactions applies the HasEdge predicate on the "reactions" edge.
func HasReactionsWith ¶
HasReactionsWith applies the HasEdge predicate on the "reactions" edge with a given conditions (other predicates).
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 ForumPost queries.
func ByAuthorField ¶
func ByAuthorField(field string, opts ...sql.OrderTermOption) OrderOption
ByAuthorField orders the results by author 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 ByContent ¶
func ByContent(opts ...sql.OrderTermOption) OrderOption
ByContent orders the results by the content field.
func ByForumField ¶
func ByForumField(field string, opts ...sql.OrderTermOption) OrderOption
ByForumField orders the results by forum field.
func ByID ¶
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func ByParentField ¶
func ByParentField(field string, opts ...sql.OrderTermOption) OrderOption
ByParentField orders the results by parent field.
func ByReactedUsers ¶
func ByReactedUsers(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByReactedUsers orders the results by reacted_users terms.
func ByReactedUsersCount ¶
func ByReactedUsersCount(opts ...sql.OrderTermOption) OrderOption
ByReactedUsersCount orders the results by reacted_users count.
func ByReactions ¶
func ByReactions(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByReactions orders the results by reactions terms.
func ByReactionsCount ¶
func ByReactionsCount(opts ...sql.OrderTermOption) OrderOption
ByReactionsCount orders the results by reactions count.
func ByTitle ¶
func ByTitle(opts ...sql.OrderTermOption) OrderOption
ByTitle orders the results by the title field.