reaction

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 reaction type in the database.
	Label = "reaction"
	// FieldUserID holds the string denoting the user_id field in the database.
	FieldUserID = "user_id"
	// FieldForumPostID holds the string denoting the forum_post_id field in the database.
	FieldForumPostID = "forum_post_id"
	// FieldEmoji holds the string denoting the emoji field in the database.
	FieldEmoji = "emoji"
	// EdgeUser holds the string denoting the user edge name in mutations.
	EdgeUser = "user"
	// EdgeForumPost holds the string denoting the forum_post edge name in mutations.
	EdgeForumPost = "forum_post"
	// UserFieldID holds the string denoting the ID field of the User.
	UserFieldID = "id"
	// ForumPostFieldID holds the string denoting the ID field of the ForumPost.
	ForumPostFieldID = "id"
	// Table holds the table name of the reaction in the database.
	Table = "reactions"
	// UserTable is the table that holds the user relation/edge.
	UserTable = "reactions"
	// UserInverseTable is the table name for the User entity.
	// It exists in this package in order to avoid circular dependency with the "user" package.
	UserInverseTable = "users"
	// UserColumn is the table column denoting the user relation/edge.
	UserColumn = "user_id"
	// ForumPostTable is the table that holds the forum_post relation/edge.
	ForumPostTable = "reactions"
	// ForumPostInverseTable is the table name for the ForumPost entity.
	// It exists in this package in order to avoid circular dependency with the "forumpost" package.
	ForumPostInverseTable = "forum_posts"
	// ForumPostColumn is the table column denoting the forum_post relation/edge.
	ForumPostColumn = "forum_post_id"
)

Variables

Columns holds all SQL columns for reaction fields.

View Source
var (
	// EmojiValidator is a validator for the "emoji" field. It is called by the builders before save.
	EmojiValidator func(string) error
)

Functions

func And

func And(predicates ...predicate.Reaction) predicate.Reaction

And groups predicates with the AND operator between them.

func Emoji

func Emoji(v string) predicate.Reaction

Emoji applies equality check predicate on the "emoji" field. It's identical to EmojiEQ.

func EmojiContains

func EmojiContains(v string) predicate.Reaction

EmojiContains applies the Contains predicate on the "emoji" field.

func EmojiContainsFold

func EmojiContainsFold(v string) predicate.Reaction

EmojiContainsFold applies the ContainsFold predicate on the "emoji" field.

func EmojiEQ

func EmojiEQ(v string) predicate.Reaction

EmojiEQ applies the EQ predicate on the "emoji" field.

func EmojiEqualFold

func EmojiEqualFold(v string) predicate.Reaction

EmojiEqualFold applies the EqualFold predicate on the "emoji" field.

func EmojiGT

func EmojiGT(v string) predicate.Reaction

EmojiGT applies the GT predicate on the "emoji" field.

func EmojiGTE

func EmojiGTE(v string) predicate.Reaction

EmojiGTE applies the GTE predicate on the "emoji" field.

func EmojiHasPrefix

func EmojiHasPrefix(v string) predicate.Reaction

EmojiHasPrefix applies the HasPrefix predicate on the "emoji" field.

func EmojiHasSuffix

func EmojiHasSuffix(v string) predicate.Reaction

EmojiHasSuffix applies the HasSuffix predicate on the "emoji" field.

func EmojiIn

func EmojiIn(vs ...string) predicate.Reaction

EmojiIn applies the In predicate on the "emoji" field.

func EmojiLT

func EmojiLT(v string) predicate.Reaction

EmojiLT applies the LT predicate on the "emoji" field.

func EmojiLTE

func EmojiLTE(v string) predicate.Reaction

EmojiLTE applies the LTE predicate on the "emoji" field.

func EmojiNEQ

func EmojiNEQ(v string) predicate.Reaction

EmojiNEQ applies the NEQ predicate on the "emoji" field.

func EmojiNotIn

func EmojiNotIn(vs ...string) predicate.Reaction

EmojiNotIn applies the NotIn predicate on the "emoji" field.

func ForumPostID

func ForumPostID(v int) predicate.Reaction

ForumPostID applies equality check predicate on the "forum_post_id" field. It's identical to ForumPostIDEQ.

func ForumPostIDEQ

func ForumPostIDEQ(v int) predicate.Reaction

ForumPostIDEQ applies the EQ predicate on the "forum_post_id" field.

func ForumPostIDIn

func ForumPostIDIn(vs ...int) predicate.Reaction

ForumPostIDIn applies the In predicate on the "forum_post_id" field.

func ForumPostIDNEQ

func ForumPostIDNEQ(v int) predicate.Reaction

ForumPostIDNEQ applies the NEQ predicate on the "forum_post_id" field.

func ForumPostIDNotIn

func ForumPostIDNotIn(vs ...int) predicate.Reaction

ForumPostIDNotIn applies the NotIn predicate on the "forum_post_id" field.

func HasForumPost

func HasForumPost() predicate.Reaction

HasForumPost applies the HasEdge predicate on the "forum_post" edge.

func HasForumPostWith

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

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

func HasUser

func HasUser() predicate.Reaction

HasUser applies the HasEdge predicate on the "user" edge.

func HasUserWith

func HasUserWith(preds ...predicate.User) predicate.Reaction

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

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Reaction) predicate.Reaction

Or groups predicates with the OR operator between them.

func UserID

func UserID(v int) predicate.Reaction

UserID applies equality check predicate on the "user_id" field. It's identical to UserIDEQ.

func UserIDEQ

func UserIDEQ(v int) predicate.Reaction

UserIDEQ applies the EQ predicate on the "user_id" field.

func UserIDIn

func UserIDIn(vs ...int) predicate.Reaction

UserIDIn applies the In predicate on the "user_id" field.

func UserIDNEQ

func UserIDNEQ(v int) predicate.Reaction

UserIDNEQ applies the NEQ predicate on the "user_id" field.

func UserIDNotIn

func UserIDNotIn(vs ...int) predicate.Reaction

UserIDNotIn applies the NotIn predicate on the "user_id" 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 Reaction queries.

func ByEmoji

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

ByEmoji orders the results by the emoji field.

func ByForumPostField

func ByForumPostField(field string, opts ...sql.OrderTermOption) OrderOption

ByForumPostField orders the results by forum_post field.

func ByForumPostID

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

ByForumPostID orders the results by the forum_post_id field.

func ByUserField

func ByUserField(field string, opts ...sql.OrderTermOption) OrderOption

ByUserField orders the results by user field.

func ByUserID

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

ByUserID orders the results by the user_id field.

Jump to

Keyboard shortcuts

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