comment

package
v0.0.0-...-a746138 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 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"
	// FieldParentID holds the string denoting the parent_id field in the database.
	FieldParentID = "parent_id"
	// FieldContent holds the string denoting the content field in the database.
	FieldContent = "content"
	// FieldModifiedAt holds the string denoting the modified_at field in the database.
	FieldModifiedAt = "modified_at"
	// FieldCreatedBy holds the string denoting the created_by field in the database.
	FieldCreatedBy = "created_by"
	// FieldCreatedAt holds the string denoting the created_at field in the database.
	FieldCreatedAt = "created_at"
	// EdgeThreads holds the string denoting the threads edge name in mutations.
	EdgeThreads = "threads"
	// EdgeCommentAuthors holds the string denoting the comment_authors edge name in mutations.
	EdgeCommentAuthors = "comment_authors"
	// EdgeKudoedUsers holds the string denoting the kudoed_users edge name in mutations.
	EdgeKudoedUsers = "kudoed_users"
	// EdgeCommentKudoes holds the string denoting the comment_kudoes edge name in mutations.
	EdgeCommentKudoes = "comment_kudoes"
	// Table holds the table name of the comment in the database.
	Table = "comments"
	// ThreadsTable is the table that holds the threads relation/edge.
	ThreadsTable = "comments"
	// ThreadsInverseTable is the table name for the Thread entity.
	// It exists in this package in order to avoid circular dependency with the "thread" package.
	ThreadsInverseTable = "threads"
	// ThreadsColumn is the table column denoting the threads relation/edge.
	ThreadsColumn = "thread_thread_comments"
	// CommentAuthorsTable is the table that holds the comment_authors relation/edge.
	CommentAuthorsTable = "comments"
	// CommentAuthorsInverseTable is the table name for the User entity.
	// It exists in this package in order to avoid circular dependency with the "user" package.
	CommentAuthorsInverseTable = "users"
	// CommentAuthorsColumn is the table column denoting the comment_authors relation/edge.
	CommentAuthorsColumn = "created_by"
	// KudoedUsersTable is the table that holds the kudoed_users relation/edge. The primary key declared below.
	KudoedUsersTable = "comment_kudos"
	// KudoedUsersInverseTable is the table name for the User entity.
	// It exists in this package in order to avoid circular dependency with the "user" package.
	KudoedUsersInverseTable = "users"
	// CommentKudoesTable is the table that holds the comment_kudoes relation/edge.
	CommentKudoesTable = "comment_kudos"
	// CommentKudoesInverseTable is the table name for the CommentKudo entity.
	// It exists in this package in order to avoid circular dependency with the "commentkudo" package.
	CommentKudoesInverseTable = "comment_kudos"
	// CommentKudoesColumn is the table column denoting the comment_kudoes relation/edge.
	CommentKudoesColumn = "comment_id"
)

Variables

View Source
var (
	// DefaultParentID holds the default value on creation for the "parent_id" field.
	DefaultParentID int
	// ContentValidator is a validator for the "content" field. It is called by the builders before save.
	ContentValidator func(string) error
	// DefaultCreatedAt holds the default value on creation for the "created_at" field.
	DefaultCreatedAt time.Time
)

Columns holds all SQL columns for comment fields.

View Source
var ForeignKeys = []string{
	"thread_thread_comments",
}

ForeignKeys holds the SQL foreign-keys that are owned by the "comments" table and are not defined as standalone fields in the schema.

View Source
var (
	// KudoedUsersPrimaryKey and KudoedUsersColumn2 are the table columns denoting the
	// primary key for the kudoed_users relation (M2M).
	KudoedUsersPrimaryKey = []string{"user_id", "comment_id"}
)

Functions

func And

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

And groups predicates with the AND operator between them.

func Content

func Content(v string) predicate.Comment

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

func ContentContains

func ContentContains(v string) predicate.Comment

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

func ContentContainsFold

func ContentContainsFold(v string) predicate.Comment

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

func ContentEQ

func ContentEQ(v string) predicate.Comment

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

func ContentEqualFold

func ContentEqualFold(v string) predicate.Comment

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

func ContentGT

func ContentGT(v string) predicate.Comment

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

func ContentGTE

func ContentGTE(v string) predicate.Comment

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

func ContentHasPrefix

func ContentHasPrefix(v string) predicate.Comment

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

func ContentHasSuffix

func ContentHasSuffix(v string) predicate.Comment

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

func ContentIn

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

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

func ContentLT

func ContentLT(v string) predicate.Comment

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

func ContentLTE

func ContentLTE(v string) predicate.Comment

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

func ContentNEQ

func ContentNEQ(v string) predicate.Comment

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

func ContentNotIn

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

ContentNotIn applies the NotIn predicate on the "content" 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 CreatedBy

func CreatedBy(v uuid.UUID) predicate.Comment

CreatedBy applies equality check predicate on the "created_by" field. It's identical to CreatedByEQ.

func CreatedByEQ

func CreatedByEQ(v uuid.UUID) predicate.Comment

CreatedByEQ applies the EQ predicate on the "created_by" field.

func CreatedByIn

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

CreatedByIn applies the In predicate on the "created_by" field.

func CreatedByNEQ

func CreatedByNEQ(v uuid.UUID) predicate.Comment

CreatedByNEQ applies the NEQ predicate on the "created_by" field.

func CreatedByNotIn

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

CreatedByNotIn applies the NotIn predicate on the "created_by" field.

func HasCommentAuthors

func HasCommentAuthors() predicate.Comment

HasCommentAuthors applies the HasEdge predicate on the "comment_authors" edge.

func HasCommentAuthorsWith

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

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

func HasCommentKudoes

func HasCommentKudoes() predicate.Comment

HasCommentKudoes applies the HasEdge predicate on the "comment_kudoes" edge.

func HasCommentKudoesWith

func HasCommentKudoesWith(preds ...predicate.CommentKudo) predicate.Comment

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

func HasKudoedUsers

func HasKudoedUsers() predicate.Comment

HasKudoedUsers applies the HasEdge predicate on the "kudoed_users" edge.

func HasKudoedUsersWith

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

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

func HasThreads

func HasThreads() predicate.Comment

HasThreads applies the HasEdge predicate on the "threads" edge.

func HasThreadsWith

func HasThreadsWith(preds ...predicate.Thread) predicate.Comment

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

func ID

func ID(id int) predicate.Comment

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Comment

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Comment

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Comment

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Comment

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Comment

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Comment

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

IDNotIn applies the NotIn predicate on the ID field.

func ModifiedAt

func ModifiedAt(v time.Time) predicate.Comment

ModifiedAt applies equality check predicate on the "modified_at" field. It's identical to ModifiedAtEQ.

func ModifiedAtEQ

func ModifiedAtEQ(v time.Time) predicate.Comment

ModifiedAtEQ applies the EQ predicate on the "modified_at" field.

func ModifiedAtGT

func ModifiedAtGT(v time.Time) predicate.Comment

ModifiedAtGT applies the GT predicate on the "modified_at" field.

func ModifiedAtGTE

func ModifiedAtGTE(v time.Time) predicate.Comment

ModifiedAtGTE applies the GTE predicate on the "modified_at" field.

func ModifiedAtIn

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

ModifiedAtIn applies the In predicate on the "modified_at" field.

func ModifiedAtIsNil

func ModifiedAtIsNil() predicate.Comment

ModifiedAtIsNil applies the IsNil predicate on the "modified_at" field.

func ModifiedAtLT

func ModifiedAtLT(v time.Time) predicate.Comment

ModifiedAtLT applies the LT predicate on the "modified_at" field.

func ModifiedAtLTE

func ModifiedAtLTE(v time.Time) predicate.Comment

ModifiedAtLTE applies the LTE predicate on the "modified_at" field.

func ModifiedAtNEQ

func ModifiedAtNEQ(v time.Time) predicate.Comment

ModifiedAtNEQ applies the NEQ predicate on the "modified_at" field.

func ModifiedAtNotIn

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

ModifiedAtNotIn applies the NotIn predicate on the "modified_at" field.

func ModifiedAtNotNil

func ModifiedAtNotNil() predicate.Comment

ModifiedAtNotNil applies the NotNil predicate on the "modified_at" 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 ParentID

func ParentID(v int) predicate.Comment

ParentID applies equality check predicate on the "parent_id" field. It's identical to ParentIDEQ.

func ParentIDEQ

func ParentIDEQ(v int) predicate.Comment

ParentIDEQ applies the EQ predicate on the "parent_id" field.

func ParentIDGT

func ParentIDGT(v int) predicate.Comment

ParentIDGT applies the GT predicate on the "parent_id" field.

func ParentIDGTE

func ParentIDGTE(v int) predicate.Comment

ParentIDGTE applies the GTE predicate on the "parent_id" field.

func ParentIDIn

func ParentIDIn(vs ...int) predicate.Comment

ParentIDIn applies the In predicate on the "parent_id" field.

func ParentIDLT

func ParentIDLT(v int) predicate.Comment

ParentIDLT applies the LT predicate on the "parent_id" field.

func ParentIDLTE

func ParentIDLTE(v int) predicate.Comment

ParentIDLTE applies the LTE predicate on the "parent_id" field.

func ParentIDNEQ

func ParentIDNEQ(v int) predicate.Comment

ParentIDNEQ applies the NEQ predicate on the "parent_id" field.

func ParentIDNotIn

func ParentIDNotIn(vs ...int) predicate.Comment

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

func ByCommentAuthorsField

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

ByCommentAuthorsField orders the results by comment_authors field.

func ByCommentKudoes

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

ByCommentKudoes orders the results by comment_kudoes terms.

func ByCommentKudoesCount

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

ByCommentKudoesCount orders the results by comment_kudoes count.

func ByContent

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

ByContent orders the results by the content field.

func ByCreatedAt

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

ByCreatedAt orders the results by the created_at field.

func ByCreatedBy

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

ByCreatedBy orders the results by the created_by field.

func ByID

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

ByID orders the results by the id field.

func ByKudoedUsers

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

ByKudoedUsers orders the results by kudoed_users terms.

func ByKudoedUsersCount

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

ByKudoedUsersCount orders the results by kudoed_users count.

func ByModifiedAt

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

ByModifiedAt orders the results by the modified_at field.

func ByParentID

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

ByParentID orders the results by the parent_id field.

func ByThreadsField

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

ByThreadsField orders the results by threads field.

Jump to

Keyboard shortcuts

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