Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Comment) predicate.Comment
- func AuthorID(v uuid.UUID) predicate.Comment
- func AuthorIDEQ(v uuid.UUID) predicate.Comment
- func AuthorIDIn(vs ...uuid.UUID) predicate.Comment
- func AuthorIDNEQ(v uuid.UUID) predicate.Comment
- func AuthorIDNotIn(vs ...uuid.UUID) predicate.Comment
- func CreatedAt(v time.Time) predicate.Comment
- func CreatedAtEQ(v time.Time) predicate.Comment
- func CreatedAtGT(v time.Time) predicate.Comment
- func CreatedAtGTE(v time.Time) predicate.Comment
- func CreatedAtIn(vs ...time.Time) predicate.Comment
- func CreatedAtLT(v time.Time) predicate.Comment
- func CreatedAtLTE(v time.Time) predicate.Comment
- func CreatedAtNEQ(v time.Time) predicate.Comment
- func CreatedAtNotIn(vs ...time.Time) predicate.Comment
- func HasAuthor() predicate.Comment
- func HasAuthorWith(preds ...predicate.User) predicate.Comment
- func HasNotifications() predicate.Comment
- func HasNotificationsWith(preds ...predicate.Notification) predicate.Comment
- func HasPost() predicate.Comment
- func HasPostWith(preds ...predicate.Post) predicate.Comment
- func HasReactions() predicate.Comment
- func HasReactionsWith(preds ...predicate.Reaction) predicate.Comment
- func HasReplies() predicate.Comment
- func HasRepliesWith(preds ...predicate.Reply) predicate.Comment
- func ID(id uuid.UUID) predicate.Comment
- func IDEQ(id uuid.UUID) predicate.Comment
- func IDGT(id uuid.UUID) predicate.Comment
- func IDGTE(id uuid.UUID) predicate.Comment
- func IDIn(ids ...uuid.UUID) predicate.Comment
- func IDLT(id uuid.UUID) predicate.Comment
- func IDLTE(id uuid.UUID) predicate.Comment
- func IDNEQ(id uuid.UUID) predicate.Comment
- func IDNotIn(ids ...uuid.UUID) predicate.Comment
- func Not(p predicate.Comment) predicate.Comment
- func Or(predicates ...predicate.Comment) predicate.Comment
- func PostID(v uuid.UUID) predicate.Comment
- func PostIDEQ(v uuid.UUID) predicate.Comment
- func PostIDIn(vs ...uuid.UUID) predicate.Comment
- func PostIDNEQ(v uuid.UUID) predicate.Comment
- func PostIDNotIn(vs ...uuid.UUID) predicate.Comment
- func Slug(v string) predicate.Comment
- func SlugContains(v string) predicate.Comment
- func SlugContainsFold(v string) predicate.Comment
- func SlugEQ(v string) predicate.Comment
- func SlugEqualFold(v string) predicate.Comment
- func SlugGT(v string) predicate.Comment
- func SlugGTE(v string) predicate.Comment
- func SlugHasPrefix(v string) predicate.Comment
- func SlugHasSuffix(v string) predicate.Comment
- func SlugIn(vs ...string) predicate.Comment
- func SlugLT(v string) predicate.Comment
- func SlugLTE(v string) predicate.Comment
- func SlugNEQ(v string) predicate.Comment
- func SlugNotIn(vs ...string) predicate.Comment
- func Text(v string) predicate.Comment
- func TextContains(v string) predicate.Comment
- func TextContainsFold(v string) predicate.Comment
- func TextEQ(v string) predicate.Comment
- func TextEqualFold(v string) predicate.Comment
- func TextGT(v string) predicate.Comment
- func TextGTE(v string) predicate.Comment
- func TextHasPrefix(v string) predicate.Comment
- func TextHasSuffix(v string) predicate.Comment
- func TextIn(vs ...string) predicate.Comment
- func TextLT(v string) predicate.Comment
- func TextLTE(v string) predicate.Comment
- func TextNEQ(v string) predicate.Comment
- func TextNotIn(vs ...string) predicate.Comment
- func UpdatedAt(v time.Time) predicate.Comment
- func UpdatedAtEQ(v time.Time) predicate.Comment
- func UpdatedAtGT(v time.Time) predicate.Comment
- func UpdatedAtGTE(v time.Time) predicate.Comment
- func UpdatedAtIn(vs ...time.Time) predicate.Comment
- func UpdatedAtLT(v time.Time) predicate.Comment
- func UpdatedAtLTE(v time.Time) predicate.Comment
- func UpdatedAtNEQ(v time.Time) predicate.Comment
- func UpdatedAtNotIn(vs ...time.Time) predicate.Comment
- func ValidColumn(column string) bool
- type OrderOption
- func ByAuthorField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByAuthorID(opts ...sql.OrderTermOption) OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByNotifications(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByNotificationsCount(opts ...sql.OrderTermOption) OrderOption
- func ByPostField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByPostID(opts ...sql.OrderTermOption) OrderOption
- func ByReactions(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByReactionsCount(opts ...sql.OrderTermOption) OrderOption
- func ByReplies(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByRepliesCount(opts ...sql.OrderTermOption) OrderOption
- func BySlug(opts ...sql.OrderTermOption) OrderOption
- func ByText(opts ...sql.OrderTermOption) OrderOption
- func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
Constants ¶
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 ¶
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 )
var Columns = []string{ FieldID, FieldCreatedAt, FieldUpdatedAt, FieldText, FieldSlug, FieldAuthorID, FieldPostID, }
Columns holds all SQL columns for comment fields.
Functions ¶
func AuthorID ¶
AuthorID applies equality check predicate on the "author_id" field. It's identical to AuthorIDEQ.
func AuthorIDEQ ¶
AuthorIDEQ applies the EQ predicate on the "author_id" field.
func AuthorIDIn ¶
AuthorIDIn applies the In predicate on the "author_id" field.
func AuthorIDNEQ ¶
AuthorIDNEQ applies the NEQ predicate on the "author_id" field.
func AuthorIDNotIn ¶
AuthorIDNotIn applies the NotIn predicate on the "author_id" field.
func CreatedAt ¶
CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
func CreatedAtEQ ¶
CreatedAtEQ applies the EQ predicate on the "created_at" field.
func CreatedAtGT ¶
CreatedAtGT applies the GT predicate on the "created_at" field.
func CreatedAtGTE ¶
CreatedAtGTE applies the GTE predicate on the "created_at" field.
func CreatedAtIn ¶
CreatedAtIn applies the In predicate on the "created_at" field.
func CreatedAtLT ¶
CreatedAtLT applies the LT predicate on the "created_at" field.
func CreatedAtLTE ¶
CreatedAtLTE applies the LTE predicate on the "created_at" field.
func CreatedAtNEQ ¶
CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
func CreatedAtNotIn ¶
CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
func HasAuthorWith ¶
HasAuthorWith applies the HasEdge predicate on the "author" edge with a given conditions (other predicates).
func HasNotifications ¶
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 HasPostWith ¶
HasPostWith applies the HasEdge predicate on the "post" edge with a given conditions (other predicates).
func HasReactions ¶
HasReactions applies the HasEdge predicate on the "reactions" edge.
func HasReactionsWith ¶
HasReactionsWith applies the HasEdge predicate on the "reactions" edge with a given conditions (other predicates).
func HasReplies ¶
HasReplies applies the HasEdge predicate on the "replies" edge.
func HasRepliesWith ¶
HasRepliesWith applies the HasEdge predicate on the "replies" edge with a given conditions (other predicates).
func PostID ¶
PostID applies equality check predicate on the "post_id" field. It's identical to PostIDEQ.
func PostIDNotIn ¶
PostIDNotIn applies the NotIn predicate on the "post_id" field.
func SlugContains ¶
SlugContains applies the Contains predicate on the "slug" field.
func SlugContainsFold ¶
SlugContainsFold applies the ContainsFold predicate on the "slug" field.
func SlugEqualFold ¶
SlugEqualFold applies the EqualFold predicate on the "slug" field.
func SlugHasPrefix ¶
SlugHasPrefix applies the HasPrefix predicate on the "slug" field.
func SlugHasSuffix ¶
SlugHasSuffix applies the HasSuffix predicate on the "slug" field.
func TextContains ¶
TextContains applies the Contains predicate on the "text" field.
func TextContainsFold ¶
TextContainsFold applies the ContainsFold predicate on the "text" field.
func TextEqualFold ¶
TextEqualFold applies the EqualFold predicate on the "text" field.
func TextHasPrefix ¶
TextHasPrefix applies the HasPrefix predicate on the "text" field.
func TextHasSuffix ¶
TextHasSuffix applies the HasSuffix predicate on the "text" field.
func UpdatedAt ¶
UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.
func UpdatedAtEQ ¶
UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
func UpdatedAtGT ¶
UpdatedAtGT applies the GT predicate on the "updated_at" field.
func UpdatedAtGTE ¶
UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
func UpdatedAtIn ¶
UpdatedAtIn applies the In predicate on the "updated_at" field.
func UpdatedAtLT ¶
UpdatedAtLT applies the LT predicate on the "updated_at" field.
func UpdatedAtLTE ¶
UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
func UpdatedAtNEQ ¶
UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
func UpdatedAtNotIn ¶
UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
func ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).
Types ¶
type OrderOption ¶
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.