reaction

package
v0.0.0-...-6a61234 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the reaction type in the database.
	Label = "reaction"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldCreatedAt holds the string denoting the created_at field in the database.
	FieldCreatedAt = "created_at"
	// FieldUpdatedAt holds the string denoting the updated_at field in the database.
	FieldUpdatedAt = "updated_at"
	// FieldUserID holds the string denoting the user_id field in the database.
	FieldUserID = "user_id"
	// FieldRtype holds the string denoting the rtype field in the database.
	FieldRtype = "rtype"
	// FieldPostID holds the string denoting the post_id field in the database.
	FieldPostID = "post_id"
	// FieldCommentID holds the string denoting the comment_id field in the database.
	FieldCommentID = "comment_id"
	// FieldReplyID holds the string denoting the reply_id field in the database.
	FieldReplyID = "reply_id"
	// EdgeUser holds the string denoting the user edge name in mutations.
	EdgeUser = "user"
	// EdgePost holds the string denoting the post edge name in mutations.
	EdgePost = "post"
	// EdgeComment holds the string denoting the comment edge name in mutations.
	EdgeComment = "comment"
	// EdgeReply holds the string denoting the reply edge name in mutations.
	EdgeReply = "reply"
	// 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"
	// PostTable is the table that holds the post relation/edge.
	PostTable = "reactions"
	// PostInverseTable is the table name for the Post entity.
	// It exists in this package in order to avoid circular dependency with the "post" package.
	PostInverseTable = "posts"
	// PostColumn is the table column denoting the post relation/edge.
	PostColumn = "post_id"
	// CommentTable is the table that holds the comment relation/edge.
	CommentTable = "reactions"
	// CommentInverseTable is the table name for the Comment entity.
	// It exists in this package in order to avoid circular dependency with the "comment" package.
	CommentInverseTable = "comments"
	// CommentColumn is the table column denoting the comment relation/edge.
	CommentColumn = "comment_id"
	// ReplyTable is the table that holds the reply relation/edge.
	ReplyTable = "reactions"
	// ReplyInverseTable is the table name for the Reply entity.
	// It exists in this package in order to avoid circular dependency with the "reply" package.
	ReplyInverseTable = "replies"
	// ReplyColumn is the table column denoting the reply relation/edge.
	ReplyColumn = "reply_id"
)
View Source
const DefaultRtype = RtypeLIKE

RtypeLIKE is the default value of the Rtype enum.

Variables

View Source
var (
	// DefaultCreatedAt holds the default value on creation for the "created_at" field.
	DefaultCreatedAt func() time.Time
	// DefaultUpdatedAt holds the default value on creation for the "updated_at" field.
	DefaultUpdatedAt func() time.Time
	// UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field.
	UpdateDefaultUpdatedAt func() time.Time
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() uuid.UUID
)

Columns holds all SQL columns for reaction fields.

Functions

func And

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

And groups predicates with the AND operator between them.

func CommentID

func CommentID(v uuid.UUID) predicate.Reaction

CommentID applies equality check predicate on the "comment_id" field. It's identical to CommentIDEQ.

func CommentIDEQ

func CommentIDEQ(v uuid.UUID) predicate.Reaction

CommentIDEQ applies the EQ predicate on the "comment_id" field.

func CommentIDIn

func CommentIDIn(vs ...uuid.UUID) predicate.Reaction

CommentIDIn applies the In predicate on the "comment_id" field.

func CommentIDIsNil

func CommentIDIsNil() predicate.Reaction

CommentIDIsNil applies the IsNil predicate on the "comment_id" field.

func CommentIDNEQ

func CommentIDNEQ(v uuid.UUID) predicate.Reaction

CommentIDNEQ applies the NEQ predicate on the "comment_id" field.

func CommentIDNotIn

func CommentIDNotIn(vs ...uuid.UUID) predicate.Reaction

CommentIDNotIn applies the NotIn predicate on the "comment_id" field.

func CommentIDNotNil

func CommentIDNotNil() predicate.Reaction

CommentIDNotNil applies the NotNil predicate on the "comment_id" field.

func CreatedAt

func CreatedAt(v time.Time) predicate.Reaction

CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Reaction

CreatedAtEQ applies the EQ predicate on the "created_at" field.

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Reaction

CreatedAtGT applies the GT predicate on the "created_at" field.

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Reaction

CreatedAtGTE applies the GTE predicate on the "created_at" field.

func CreatedAtIn

func CreatedAtIn(vs ...time.Time) predicate.Reaction

CreatedAtIn applies the In predicate on the "created_at" field.

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Reaction

CreatedAtLT applies the LT predicate on the "created_at" field.

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Reaction

CreatedAtLTE applies the LTE predicate on the "created_at" field.

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Reaction

CreatedAtNEQ applies the NEQ predicate on the "created_at" field.

func CreatedAtNotIn

func CreatedAtNotIn(vs ...time.Time) predicate.Reaction

CreatedAtNotIn applies the NotIn predicate on the "created_at" field.

func HasComment

func HasComment() predicate.Reaction

HasComment applies the HasEdge predicate on the "comment" edge.

func HasCommentWith

func HasCommentWith(preds ...predicate.Comment) predicate.Reaction

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

func HasPost

func HasPost() predicate.Reaction

HasPost applies the HasEdge predicate on the "post" edge.

func HasPostWith

func HasPostWith(preds ...predicate.Post) predicate.Reaction

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

func HasReply

func HasReply() predicate.Reaction

HasReply applies the HasEdge predicate on the "reply" edge.

func HasReplyWith

func HasReplyWith(preds ...predicate.Reply) predicate.Reaction

HasReplyWith applies the HasEdge predicate on the "reply" 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 ID

func ID(id uuid.UUID) predicate.Reaction

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id uuid.UUID) predicate.Reaction

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id uuid.UUID) predicate.Reaction

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id uuid.UUID) predicate.Reaction

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...uuid.UUID) predicate.Reaction

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id uuid.UUID) predicate.Reaction

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id uuid.UUID) predicate.Reaction

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id uuid.UUID) predicate.Reaction

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...uuid.UUID) predicate.Reaction

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

Or groups predicates with the OR operator between them.

func PostID

func PostID(v uuid.UUID) predicate.Reaction

PostID applies equality check predicate on the "post_id" field. It's identical to PostIDEQ.

func PostIDEQ

func PostIDEQ(v uuid.UUID) predicate.Reaction

PostIDEQ applies the EQ predicate on the "post_id" field.

func PostIDIn

func PostIDIn(vs ...uuid.UUID) predicate.Reaction

PostIDIn applies the In predicate on the "post_id" field.

func PostIDIsNil

func PostIDIsNil() predicate.Reaction

PostIDIsNil applies the IsNil predicate on the "post_id" field.

func PostIDNEQ

func PostIDNEQ(v uuid.UUID) predicate.Reaction

PostIDNEQ applies the NEQ predicate on the "post_id" field.

func PostIDNotIn

func PostIDNotIn(vs ...uuid.UUID) predicate.Reaction

PostIDNotIn applies the NotIn predicate on the "post_id" field.

func PostIDNotNil

func PostIDNotNil() predicate.Reaction

PostIDNotNil applies the NotNil predicate on the "post_id" field.

func ReplyID

func ReplyID(v uuid.UUID) predicate.Reaction

ReplyID applies equality check predicate on the "reply_id" field. It's identical to ReplyIDEQ.

func ReplyIDEQ

func ReplyIDEQ(v uuid.UUID) predicate.Reaction

ReplyIDEQ applies the EQ predicate on the "reply_id" field.

func ReplyIDIn

func ReplyIDIn(vs ...uuid.UUID) predicate.Reaction

ReplyIDIn applies the In predicate on the "reply_id" field.

func ReplyIDIsNil

func ReplyIDIsNil() predicate.Reaction

ReplyIDIsNil applies the IsNil predicate on the "reply_id" field.

func ReplyIDNEQ

func ReplyIDNEQ(v uuid.UUID) predicate.Reaction

ReplyIDNEQ applies the NEQ predicate on the "reply_id" field.

func ReplyIDNotIn

func ReplyIDNotIn(vs ...uuid.UUID) predicate.Reaction

ReplyIDNotIn applies the NotIn predicate on the "reply_id" field.

func ReplyIDNotNil

func ReplyIDNotNil() predicate.Reaction

ReplyIDNotNil applies the NotNil predicate on the "reply_id" field.

func RtypeEQ

func RtypeEQ(v Rtype) predicate.Reaction

RtypeEQ applies the EQ predicate on the "rtype" field.

func RtypeIn

func RtypeIn(vs ...Rtype) predicate.Reaction

RtypeIn applies the In predicate on the "rtype" field.

func RtypeNEQ

func RtypeNEQ(v Rtype) predicate.Reaction

RtypeNEQ applies the NEQ predicate on the "rtype" field.

func RtypeNotIn

func RtypeNotIn(vs ...Rtype) predicate.Reaction

RtypeNotIn applies the NotIn predicate on the "rtype" field.

func RtypeValidator

func RtypeValidator(r Rtype) error

RtypeValidator is a validator for the "rtype" field enum values. It is called by the builders before save.

func UpdatedAt

func UpdatedAt(v time.Time) predicate.Reaction

UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.Reaction

UpdatedAtEQ applies the EQ predicate on the "updated_at" field.

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.Reaction

UpdatedAtGT applies the GT predicate on the "updated_at" field.

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.Reaction

UpdatedAtGTE applies the GTE predicate on the "updated_at" field.

func UpdatedAtIn

func UpdatedAtIn(vs ...time.Time) predicate.Reaction

UpdatedAtIn applies the In predicate on the "updated_at" field.

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.Reaction

UpdatedAtLT applies the LT predicate on the "updated_at" field.

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.Reaction

UpdatedAtLTE applies the LTE predicate on the "updated_at" field.

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.Reaction

UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.

func UpdatedAtNotIn

func UpdatedAtNotIn(vs ...time.Time) predicate.Reaction

UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.

func UserID

func UserID(v uuid.UUID) predicate.Reaction

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

func UserIDEQ

func UserIDEQ(v uuid.UUID) predicate.Reaction

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

func UserIDIn

func UserIDIn(vs ...uuid.UUID) predicate.Reaction

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

func UserIDNEQ

func UserIDNEQ(v uuid.UUID) predicate.Reaction

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

func UserIDNotIn

func UserIDNotIn(vs ...uuid.UUID) 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 ByCommentField

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

ByCommentField orders the results by comment field.

func ByCommentID

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

ByCommentID orders the results by the comment_id field.

func ByCreatedAt

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

ByCreatedAt orders the results by the created_at field.

func ByID

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

ByID orders the results by the id field.

func ByPostField

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

ByPostField orders the results by post field.

func ByPostID

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

ByPostID orders the results by the post_id field.

func ByReplyField

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

ByReplyField orders the results by reply field.

func ByReplyID

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

ByReplyID orders the results by the reply_id field.

func ByRtype

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

ByRtype orders the results by the rtype field.

func ByUpdatedAt

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

ByUpdatedAt orders the results by the updated_at 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.

type Rtype

type Rtype string

Rtype defines the type for the "rtype" enum field.

const (
	RtypeLIKE  Rtype = "LIKE"
	RtypeLOVE  Rtype = "LOVE"
	RtypeHAHA  Rtype = "HAHA"
	RtypeWOW   Rtype = "WOW"
	RtypeSAD   Rtype = "SAD"
	RtypeANGRY Rtype = "ANGRY"
)

Rtype values.

func (Rtype) String

func (r Rtype) String() string

Jump to

Keyboard shortcuts

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