comment

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: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the comment type in the database.
	Label = "comment"
	// 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"
	// FieldText holds the string denoting the text field in the database.
	FieldText = "text"
	// FieldSlug holds the string denoting the slug field in the database.
	FieldSlug = "slug"
	// FieldAuthorID holds the string denoting the author_id field in the database.
	FieldAuthorID = "author_id"
	// FieldPostID holds the string denoting the post_id field in the database.
	FieldPostID = "post_id"
	// EdgeReactions holds the string denoting the reactions edge name in mutations.
	EdgeReactions = "reactions"
	// EdgeAuthor holds the string denoting the author edge name in mutations.
	EdgeAuthor = "author"
	// EdgePost holds the string denoting the post edge name in mutations.
	EdgePost = "post"
	// EdgeReplies holds the string denoting the replies edge name in mutations.
	EdgeReplies = "replies"
	// EdgeNotifications holds the string denoting the notifications edge name in mutations.
	EdgeNotifications = "notifications"
	// Table holds the table name of the comment in the database.
	Table = "comments"
	// 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 = "comment_id"
	// AuthorTable is the table that holds the author relation/edge.
	AuthorTable = "comments"
	// 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 = "author_id"
	// PostTable is the table that holds the post relation/edge.
	PostTable = "comments"
	// 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"
	// RepliesTable is the table that holds the replies relation/edge.
	RepliesTable = "replies"
	// RepliesInverseTable is the table name for the Reply entity.
	// It exists in this package in order to avoid circular dependency with the "reply" package.
	RepliesInverseTable = "replies"
	// RepliesColumn is the table column denoting the replies relation/edge.
	RepliesColumn = "comment_id"
	// NotificationsTable is the table that holds the notifications relation/edge.
	NotificationsTable = "notifications"
	// NotificationsInverseTable is the table name for the Notification entity.
	// It exists in this package in order to avoid circular dependency with the "notification" package.
	NotificationsInverseTable = "notifications"
	// NotificationsColumn is the table column denoting the notifications relation/edge.
	NotificationsColumn = "comment_id"
)

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
	// TextValidator is a validator for the "text" field. It is called by the builders before save.
	TextValidator func(string) error
	// SlugValidator is a validator for the "slug" field. It is called by the builders before save.
	SlugValidator func(string) error
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() uuid.UUID
)

Columns holds all SQL columns for comment fields.

Functions

func And

func And(predicates ...predicate.Comment) predicate.Comment

And groups predicates with the AND operator between them.

func AuthorID

func AuthorID(v uuid.UUID) predicate.Comment

AuthorID applies equality check predicate on the "author_id" field. It's identical to AuthorIDEQ.

func AuthorIDEQ

func AuthorIDEQ(v uuid.UUID) predicate.Comment

AuthorIDEQ applies the EQ predicate on the "author_id" field.

func AuthorIDIn

func AuthorIDIn(vs ...uuid.UUID) predicate.Comment

AuthorIDIn applies the In predicate on the "author_id" field.

func AuthorIDNEQ

func AuthorIDNEQ(v uuid.UUID) predicate.Comment

AuthorIDNEQ applies the NEQ predicate on the "author_id" field.

func AuthorIDNotIn

func AuthorIDNotIn(vs ...uuid.UUID) predicate.Comment

AuthorIDNotIn applies the NotIn predicate on the "author_id" field.

func CreatedAt

func CreatedAt(v time.Time) predicate.Comment

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

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Comment

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

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Comment

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

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Comment

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

func CreatedAtIn

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

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

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Comment

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

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Comment

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

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Comment

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

func CreatedAtNotIn

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

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

func HasAuthor

func HasAuthor() predicate.Comment

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

func HasAuthorWith

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

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

func HasNotifications

func HasNotifications() predicate.Comment

HasNotifications applies the HasEdge predicate on the "notifications" edge.

func HasNotificationsWith

func HasNotificationsWith(preds ...predicate.Notification) predicate.Comment

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

func HasPost

func HasPost() predicate.Comment

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

func HasPostWith

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

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

func HasReactions

func HasReactions() predicate.Comment

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

func HasReactionsWith

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

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

func HasReplies

func HasReplies() predicate.Comment

HasReplies applies the HasEdge predicate on the "replies" edge.

func HasRepliesWith

func HasRepliesWith(preds ...predicate.Reply) predicate.Comment

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

func ID

func ID(id uuid.UUID) predicate.Comment

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id uuid.UUID) predicate.Comment

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id uuid.UUID) predicate.Comment

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id uuid.UUID) predicate.Comment

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id uuid.UUID) predicate.Comment

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id uuid.UUID) predicate.Comment

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id uuid.UUID) predicate.Comment

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

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

Or groups predicates with the OR operator between them.

func PostID

func PostID(v uuid.UUID) predicate.Comment

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

func PostIDEQ

func PostIDEQ(v uuid.UUID) predicate.Comment

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

func PostIDIn

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

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

func PostIDNEQ

func PostIDNEQ(v uuid.UUID) predicate.Comment

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

func PostIDNotIn

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

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

func Slug

func Slug(v string) predicate.Comment

Slug applies equality check predicate on the "slug" field. It's identical to SlugEQ.

func SlugContains

func SlugContains(v string) predicate.Comment

SlugContains applies the Contains predicate on the "slug" field.

func SlugContainsFold

func SlugContainsFold(v string) predicate.Comment

SlugContainsFold applies the ContainsFold predicate on the "slug" field.

func SlugEQ

func SlugEQ(v string) predicate.Comment

SlugEQ applies the EQ predicate on the "slug" field.

func SlugEqualFold

func SlugEqualFold(v string) predicate.Comment

SlugEqualFold applies the EqualFold predicate on the "slug" field.

func SlugGT

func SlugGT(v string) predicate.Comment

SlugGT applies the GT predicate on the "slug" field.

func SlugGTE

func SlugGTE(v string) predicate.Comment

SlugGTE applies the GTE predicate on the "slug" field.

func SlugHasPrefix

func SlugHasPrefix(v string) predicate.Comment

SlugHasPrefix applies the HasPrefix predicate on the "slug" field.

func SlugHasSuffix

func SlugHasSuffix(v string) predicate.Comment

SlugHasSuffix applies the HasSuffix predicate on the "slug" field.

func SlugIn

func SlugIn(vs ...string) predicate.Comment

SlugIn applies the In predicate on the "slug" field.

func SlugLT

func SlugLT(v string) predicate.Comment

SlugLT applies the LT predicate on the "slug" field.

func SlugLTE

func SlugLTE(v string) predicate.Comment

SlugLTE applies the LTE predicate on the "slug" field.

func SlugNEQ

func SlugNEQ(v string) predicate.Comment

SlugNEQ applies the NEQ predicate on the "slug" field.

func SlugNotIn

func SlugNotIn(vs ...string) predicate.Comment

SlugNotIn applies the NotIn predicate on the "slug" field.

func Text

func Text(v string) predicate.Comment

Text applies equality check predicate on the "text" field. It's identical to TextEQ.

func TextContains

func TextContains(v string) predicate.Comment

TextContains applies the Contains predicate on the "text" field.

func TextContainsFold

func TextContainsFold(v string) predicate.Comment

TextContainsFold applies the ContainsFold predicate on the "text" field.

func TextEQ

func TextEQ(v string) predicate.Comment

TextEQ applies the EQ predicate on the "text" field.

func TextEqualFold

func TextEqualFold(v string) predicate.Comment

TextEqualFold applies the EqualFold predicate on the "text" field.

func TextGT

func TextGT(v string) predicate.Comment

TextGT applies the GT predicate on the "text" field.

func TextGTE

func TextGTE(v string) predicate.Comment

TextGTE applies the GTE predicate on the "text" field.

func TextHasPrefix

func TextHasPrefix(v string) predicate.Comment

TextHasPrefix applies the HasPrefix predicate on the "text" field.

func TextHasSuffix

func TextHasSuffix(v string) predicate.Comment

TextHasSuffix applies the HasSuffix predicate on the "text" field.

func TextIn

func TextIn(vs ...string) predicate.Comment

TextIn applies the In predicate on the "text" field.

func TextLT

func TextLT(v string) predicate.Comment

TextLT applies the LT predicate on the "text" field.

func TextLTE

func TextLTE(v string) predicate.Comment

TextLTE applies the LTE predicate on the "text" field.

func TextNEQ

func TextNEQ(v string) predicate.Comment

TextNEQ applies the NEQ predicate on the "text" field.

func TextNotIn

func TextNotIn(vs ...string) predicate.Comment

TextNotIn applies the NotIn predicate on the "text" field.

func UpdatedAt

func UpdatedAt(v time.Time) predicate.Comment

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

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.Comment

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

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.Comment

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

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.Comment

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

func UpdatedAtIn

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

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

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.Comment

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

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.Comment

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

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.Comment

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

func UpdatedAtNotIn

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

UpdatedAtNotIn applies the NotIn predicate on the "updated_at" 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 Comment queries.

func ByAuthorField

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

ByAuthorField orders the results by author field.

func ByAuthorID

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

ByAuthorID orders the results by the author_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 ByNotifications

func ByNotifications(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption

ByNotifications orders the results by notifications terms.

func ByNotificationsCount

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

ByNotificationsCount orders the results by notifications count.

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

func ByReplies(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption

ByReplies orders the results by replies terms.

func ByRepliesCount

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

ByRepliesCount orders the results by replies count.

func BySlug

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

BySlug orders the results by the slug field.

func ByText

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

ByText orders the results by the text field.

func ByUpdatedAt

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

ByUpdatedAt orders the results by the updated_at field.

Jump to

Keyboard shortcuts

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