Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Comment) predicate.Comment
- func Content(v string) predicate.Comment
- func ContentContains(v string) predicate.Comment
- func ContentContainsFold(v string) predicate.Comment
- func ContentEQ(v string) predicate.Comment
- func ContentEqualFold(v string) predicate.Comment
- func ContentGT(v string) predicate.Comment
- func ContentGTE(v string) predicate.Comment
- func ContentHasPrefix(v string) predicate.Comment
- func ContentHasSuffix(v string) predicate.Comment
- func ContentIn(vs ...string) predicate.Comment
- func ContentLT(v string) predicate.Comment
- func ContentLTE(v string) predicate.Comment
- func ContentNEQ(v string) predicate.Comment
- func ContentNotIn(vs ...string) 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 CreatedBy(v uuid.UUID) predicate.Comment
- func CreatedByEQ(v uuid.UUID) predicate.Comment
- func CreatedByIn(vs ...uuid.UUID) predicate.Comment
- func CreatedByNEQ(v uuid.UUID) predicate.Comment
- func CreatedByNotIn(vs ...uuid.UUID) predicate.Comment
- func HasCommentAuthors() predicate.Comment
- func HasCommentAuthorsWith(preds ...predicate.User) predicate.Comment
- func HasCommentKudoes() predicate.Comment
- func HasCommentKudoesWith(preds ...predicate.CommentKudo) predicate.Comment
- func HasKudoedUsers() predicate.Comment
- func HasKudoedUsersWith(preds ...predicate.User) predicate.Comment
- func HasThreads() predicate.Comment
- func HasThreadsWith(preds ...predicate.Thread) predicate.Comment
- func ID(id int) predicate.Comment
- func IDEQ(id int) predicate.Comment
- func IDGT(id int) predicate.Comment
- func IDGTE(id int) predicate.Comment
- func IDIn(ids ...int) predicate.Comment
- func IDLT(id int) predicate.Comment
- func IDLTE(id int) predicate.Comment
- func IDNEQ(id int) predicate.Comment
- func IDNotIn(ids ...int) predicate.Comment
- func ModifiedAt(v time.Time) predicate.Comment
- func ModifiedAtEQ(v time.Time) predicate.Comment
- func ModifiedAtGT(v time.Time) predicate.Comment
- func ModifiedAtGTE(v time.Time) predicate.Comment
- func ModifiedAtIn(vs ...time.Time) predicate.Comment
- func ModifiedAtIsNil() predicate.Comment
- func ModifiedAtLT(v time.Time) predicate.Comment
- func ModifiedAtLTE(v time.Time) predicate.Comment
- func ModifiedAtNEQ(v time.Time) predicate.Comment
- func ModifiedAtNotIn(vs ...time.Time) predicate.Comment
- func ModifiedAtNotNil() predicate.Comment
- func Not(p predicate.Comment) predicate.Comment
- func Or(predicates ...predicate.Comment) predicate.Comment
- func ParentID(v int) predicate.Comment
- func ParentIDEQ(v int) predicate.Comment
- func ParentIDGT(v int) predicate.Comment
- func ParentIDGTE(v int) predicate.Comment
- func ParentIDIn(vs ...int) predicate.Comment
- func ParentIDLT(v int) predicate.Comment
- func ParentIDLTE(v int) predicate.Comment
- func ParentIDNEQ(v int) predicate.Comment
- func ParentIDNotIn(vs ...int) predicate.Comment
- func ValidColumn(column string) bool
- type OrderOption
- func ByCommentAuthorsField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByCommentKudoes(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByCommentKudoesCount(opts ...sql.OrderTermOption) OrderOption
- func ByContent(opts ...sql.OrderTermOption) OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByCreatedBy(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByKudoedUsers(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByKudoedUsersCount(opts ...sql.OrderTermOption) OrderOption
- func ByModifiedAt(opts ...sql.OrderTermOption) OrderOption
- func ByParentID(opts ...sql.OrderTermOption) OrderOption
- func ByThreadsField(field string, 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" // 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 ¶
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 )
var Columns = []string{ FieldID, FieldParentID, FieldContent, FieldModifiedAt, FieldCreatedBy, FieldCreatedAt, }
Columns holds all SQL columns for comment fields.
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.
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 Content ¶
Content applies equality check predicate on the "content" field. It's identical to ContentEQ.
func ContentContains ¶
ContentContains applies the Contains predicate on the "content" field.
func ContentContainsFold ¶
ContentContainsFold applies the ContainsFold predicate on the "content" field.
func ContentEqualFold ¶
ContentEqualFold applies the EqualFold predicate on the "content" field.
func ContentGTE ¶
ContentGTE applies the GTE predicate on the "content" field.
func ContentHasPrefix ¶
ContentHasPrefix applies the HasPrefix predicate on the "content" field.
func ContentHasSuffix ¶
ContentHasSuffix applies the HasSuffix predicate on the "content" field.
func ContentLTE ¶
ContentLTE applies the LTE predicate on the "content" field.
func ContentNEQ ¶
ContentNEQ applies the NEQ predicate on the "content" field.
func ContentNotIn ¶
ContentNotIn applies the NotIn predicate on the "content" 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 CreatedBy ¶
CreatedBy applies equality check predicate on the "created_by" field. It's identical to CreatedByEQ.
func CreatedByEQ ¶
CreatedByEQ applies the EQ predicate on the "created_by" field.
func CreatedByIn ¶
CreatedByIn applies the In predicate on the "created_by" field.
func CreatedByNEQ ¶
CreatedByNEQ applies the NEQ predicate on the "created_by" field.
func CreatedByNotIn ¶
CreatedByNotIn applies the NotIn predicate on the "created_by" field.
func HasCommentAuthors ¶
HasCommentAuthors applies the HasEdge predicate on the "comment_authors" edge.
func HasCommentAuthorsWith ¶
HasCommentAuthorsWith applies the HasEdge predicate on the "comment_authors" edge with a given conditions (other predicates).
func HasCommentKudoes ¶
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 ¶
HasKudoedUsers applies the HasEdge predicate on the "kudoed_users" edge.
func HasKudoedUsersWith ¶
HasKudoedUsersWith applies the HasEdge predicate on the "kudoed_users" edge with a given conditions (other predicates).
func HasThreads ¶
HasThreads applies the HasEdge predicate on the "threads" edge.
func HasThreadsWith ¶
HasThreadsWith applies the HasEdge predicate on the "threads" edge with a given conditions (other predicates).
func ModifiedAt ¶
ModifiedAt applies equality check predicate on the "modified_at" field. It's identical to ModifiedAtEQ.
func ModifiedAtEQ ¶
ModifiedAtEQ applies the EQ predicate on the "modified_at" field.
func ModifiedAtGT ¶
ModifiedAtGT applies the GT predicate on the "modified_at" field.
func ModifiedAtGTE ¶
ModifiedAtGTE applies the GTE predicate on the "modified_at" field.
func ModifiedAtIn ¶
ModifiedAtIn applies the In predicate on the "modified_at" field.
func ModifiedAtIsNil ¶
ModifiedAtIsNil applies the IsNil predicate on the "modified_at" field.
func ModifiedAtLT ¶
ModifiedAtLT applies the LT predicate on the "modified_at" field.
func ModifiedAtLTE ¶
ModifiedAtLTE applies the LTE predicate on the "modified_at" field.
func ModifiedAtNEQ ¶
ModifiedAtNEQ applies the NEQ predicate on the "modified_at" field.
func ModifiedAtNotIn ¶
ModifiedAtNotIn applies the NotIn predicate on the "modified_at" field.
func ModifiedAtNotNil ¶
ModifiedAtNotNil applies the NotNil predicate on the "modified_at" field.
func ParentID ¶
ParentID applies equality check predicate on the "parent_id" field. It's identical to ParentIDEQ.
func ParentIDEQ ¶
ParentIDEQ applies the EQ predicate on the "parent_id" field.
func ParentIDGT ¶
ParentIDGT applies the GT predicate on the "parent_id" field.
func ParentIDGTE ¶
ParentIDGTE applies the GTE predicate on the "parent_id" field.
func ParentIDIn ¶
ParentIDIn applies the In predicate on the "parent_id" field.
func ParentIDLT ¶
ParentIDLT applies the LT predicate on the "parent_id" field.
func ParentIDLTE ¶
ParentIDLTE applies the LTE predicate on the "parent_id" field.
func ParentIDNEQ ¶
ParentIDNEQ applies the NEQ predicate on the "parent_id" field.
func ParentIDNotIn ¶
ParentIDNotIn applies the NotIn predicate on the "parent_id" 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 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.