forumpost

package
v0.0.0-...-20f649f Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2023 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
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

View Source
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
)

Columns holds all SQL columns for forumpost fields.

View Source
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.

View Source
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 And

func And(predicates ...predicate.ForumPost) predicate.ForumPost

And groups predicates with the AND operator between them.

func Content

func Content(v string) predicate.ForumPost

Content applies equality check predicate on the "content" field. It's identical to ContentEQ.

func ContentContains

func ContentContains(v string) predicate.ForumPost

ContentContains applies the Contains predicate on the "content" field.

func ContentContainsFold

func ContentContainsFold(v string) predicate.ForumPost

ContentContainsFold applies the ContainsFold predicate on the "content" field.

func ContentEQ

func ContentEQ(v string) predicate.ForumPost

ContentEQ applies the EQ predicate on the "content" field.

func ContentEqualFold

func ContentEqualFold(v string) predicate.ForumPost

ContentEqualFold applies the EqualFold predicate on the "content" field.

func ContentGT

func ContentGT(v string) predicate.ForumPost

ContentGT applies the GT predicate on the "content" field.

func ContentGTE

func ContentGTE(v string) predicate.ForumPost

ContentGTE applies the GTE predicate on the "content" field.

func ContentHasPrefix

func ContentHasPrefix(v string) predicate.ForumPost

ContentHasPrefix applies the HasPrefix predicate on the "content" field.

func ContentHasSuffix

func ContentHasSuffix(v string) predicate.ForumPost

ContentHasSuffix applies the HasSuffix predicate on the "content" field.

func ContentIn

func ContentIn(vs ...string) predicate.ForumPost

ContentIn applies the In predicate on the "content" field.

func ContentLT

func ContentLT(v string) predicate.ForumPost

ContentLT applies the LT predicate on the "content" field.

func ContentLTE

func ContentLTE(v string) predicate.ForumPost

ContentLTE applies the LTE predicate on the "content" field.

func ContentNEQ

func ContentNEQ(v string) predicate.ForumPost

ContentNEQ applies the NEQ predicate on the "content" field.

func ContentNotIn

func ContentNotIn(vs ...string) predicate.ForumPost

ContentNotIn applies the NotIn predicate on the "content" field.

func HasAuthor

func HasAuthor() predicate.ForumPost

HasAuthor applies the HasEdge predicate on the "author" edge.

func HasAuthorWith

func HasAuthorWith(preds ...predicate.User) predicate.ForumPost

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

func HasChildren

func HasChildren() predicate.ForumPost

HasChildren applies the HasEdge predicate on the "children" edge.

func HasChildrenWith

func HasChildrenWith(preds ...predicate.ForumPost) predicate.ForumPost

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

func HasForum

func HasForum() predicate.ForumPost

HasForum applies the HasEdge predicate on the "forum" edge.

func HasForumWith

func HasForumWith(preds ...predicate.Forum) predicate.ForumPost

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

func HasParent

func HasParent() predicate.ForumPost

HasParent applies the HasEdge predicate on the "parent" edge.

func HasParentWith

func HasParentWith(preds ...predicate.ForumPost) predicate.ForumPost

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

func HasReactedUsers

func HasReactedUsers() predicate.ForumPost

HasReactedUsers applies the HasEdge predicate on the "reacted_users" edge.

func HasReactedUsersWith

func HasReactedUsersWith(preds ...predicate.User) predicate.ForumPost

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

func HasReactions

func HasReactions() predicate.ForumPost

HasReactions applies the HasEdge predicate on the "reactions" edge.

func HasReactionsWith

func HasReactionsWith(preds ...predicate.Reaction) predicate.ForumPost

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

func ID

func ID(id int) predicate.ForumPost

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.ForumPost

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.ForumPost

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.ForumPost

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.ForumPost

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.ForumPost

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.ForumPost

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

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.ForumPost) predicate.ForumPost

Or groups predicates with the OR operator between them.

func Title

func Title(v string) predicate.ForumPost

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

func TitleContains

func TitleContains(v string) predicate.ForumPost

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

func TitleContainsFold

func TitleContainsFold(v string) predicate.ForumPost

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

func TitleEQ

func TitleEQ(v string) predicate.ForumPost

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

func TitleEqualFold

func TitleEqualFold(v string) predicate.ForumPost

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

func TitleGT

func TitleGT(v string) predicate.ForumPost

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

func TitleGTE

func TitleGTE(v string) predicate.ForumPost

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

func TitleHasPrefix

func TitleHasPrefix(v string) predicate.ForumPost

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

func TitleHasSuffix

func TitleHasSuffix(v string) predicate.ForumPost

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

func TitleIn

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

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

func TitleLT

func TitleLT(v string) predicate.ForumPost

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

func TitleLTE

func TitleLTE(v string) predicate.ForumPost

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

func TitleNEQ

func TitleNEQ(v string) predicate.ForumPost

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

func TitleNotIn

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

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

Jump to

Keyboard shortcuts

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