comment

package
v1.3.14 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: MIT Imports: 4 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"
	// FieldTitle holds the string denoting the title field in the database.
	FieldTitle = "title"
	// FieldContent holds the string denoting the content field in the database.
	FieldContent = "content"
	// FieldMemberId holds the string denoting the memberid field in the database.
	FieldMemberId = "member_id"
	// FieldCreateTime holds the string denoting the create_time field in the database.
	FieldCreateTime = "create_time"
	// FieldUpdateTime holds the string denoting the update_time field in the database.
	FieldUpdateTime = "update_time"
	// FieldIsReply holds the string denoting the is_reply field in the database.
	FieldIsReply = "is_reply"
	// EdgeReplys holds the string denoting the replys edge name in mutations.
	EdgeReplys = "replys"
	// Table holds the table name of the comment in the database.
	Table = "mms_comment"
	// ReplysTable is the table that holds the replys relation/edge.
	ReplysTable = "mms_reply"
	// ReplysInverseTable is the table name for the Reply entity.
	// It exists in this package in order to avoid circular dependency with the "reply" package.
	ReplysInverseTable = "mms_reply"
	// ReplysColumn is the table column denoting the replys relation/edge.
	ReplysColumn = "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
	// DefaultTitle holds the default value on creation for the "title" field.
	DefaultTitle string
	// DefaultContent holds the default value on creation for the "content" field.
	DefaultContent string
	// MemberIdValidator is a validator for the "memberId" field. It is called by the builders before save.
	MemberIdValidator func(string) error
	// DefaultCreateTime holds the default value on creation for the "create_time" field.
	DefaultCreateTime time.Time
	// DefaultUpdateTime holds the default value on creation for the "update_time" field.
	DefaultUpdateTime time.Time
	// DefaultIsReply holds the default value on creation for the "is_reply" field.
	DefaultIsReply bool
)

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

func ContentIsNil() predicate.Comment

ContentIsNil applies the IsNil 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 ContentNotNil

func ContentNotNil() predicate.Comment

ContentNotNil applies the NotNil predicate on the "content" field.

func CreateTime

func CreateTime(v time.Time) predicate.Comment

CreateTime applies equality check predicate on the "create_time" field. It's identical to CreateTimeEQ.

func CreateTimeEQ

func CreateTimeEQ(v time.Time) predicate.Comment

CreateTimeEQ applies the EQ predicate on the "create_time" field.

func CreateTimeGT

func CreateTimeGT(v time.Time) predicate.Comment

CreateTimeGT applies the GT predicate on the "create_time" field.

func CreateTimeGTE

func CreateTimeGTE(v time.Time) predicate.Comment

CreateTimeGTE applies the GTE predicate on the "create_time" field.

func CreateTimeIn

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

CreateTimeIn applies the In predicate on the "create_time" field.

func CreateTimeLT

func CreateTimeLT(v time.Time) predicate.Comment

CreateTimeLT applies the LT predicate on the "create_time" field.

func CreateTimeLTE

func CreateTimeLTE(v time.Time) predicate.Comment

CreateTimeLTE applies the LTE predicate on the "create_time" field.

func CreateTimeNEQ

func CreateTimeNEQ(v time.Time) predicate.Comment

CreateTimeNEQ applies the NEQ predicate on the "create_time" field.

func CreateTimeNotIn

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

CreateTimeNotIn applies the NotIn predicate on the "create_time" 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 HasReplys

func HasReplys() predicate.Comment

HasReplys applies the HasEdge predicate on the "replys" edge.

func HasReplysWith

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

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

func ID

func ID(id uint64) predicate.Comment

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id uint64) predicate.Comment

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id uint64) predicate.Comment

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id uint64) predicate.Comment

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id uint64) predicate.Comment

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id uint64) predicate.Comment

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id uint64) predicate.Comment

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

IDNotIn applies the NotIn predicate on the ID field.

func IsReply

func IsReply(v bool) predicate.Comment

IsReply applies equality check predicate on the "is_reply" field. It's identical to IsReplyEQ.

func IsReplyEQ

func IsReplyEQ(v bool) predicate.Comment

IsReplyEQ applies the EQ predicate on the "is_reply" field.

func IsReplyNEQ

func IsReplyNEQ(v bool) predicate.Comment

IsReplyNEQ applies the NEQ predicate on the "is_reply" field.

func MemberId

func MemberId(v string) predicate.Comment

MemberId applies equality check predicate on the "memberId" field. It's identical to MemberIdEQ.

func MemberIdContains

func MemberIdContains(v string) predicate.Comment

MemberIdContains applies the Contains predicate on the "memberId" field.

func MemberIdContainsFold

func MemberIdContainsFold(v string) predicate.Comment

MemberIdContainsFold applies the ContainsFold predicate on the "memberId" field.

func MemberIdEQ

func MemberIdEQ(v string) predicate.Comment

MemberIdEQ applies the EQ predicate on the "memberId" field.

func MemberIdEqualFold

func MemberIdEqualFold(v string) predicate.Comment

MemberIdEqualFold applies the EqualFold predicate on the "memberId" field.

func MemberIdGT

func MemberIdGT(v string) predicate.Comment

MemberIdGT applies the GT predicate on the "memberId" field.

func MemberIdGTE

func MemberIdGTE(v string) predicate.Comment

MemberIdGTE applies the GTE predicate on the "memberId" field.

func MemberIdHasPrefix

func MemberIdHasPrefix(v string) predicate.Comment

MemberIdHasPrefix applies the HasPrefix predicate on the "memberId" field.

func MemberIdHasSuffix

func MemberIdHasSuffix(v string) predicate.Comment

MemberIdHasSuffix applies the HasSuffix predicate on the "memberId" field.

func MemberIdIn

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

MemberIdIn applies the In predicate on the "memberId" field.

func MemberIdLT

func MemberIdLT(v string) predicate.Comment

MemberIdLT applies the LT predicate on the "memberId" field.

func MemberIdLTE

func MemberIdLTE(v string) predicate.Comment

MemberIdLTE applies the LTE predicate on the "memberId" field.

func MemberIdNEQ

func MemberIdNEQ(v string) predicate.Comment

MemberIdNEQ applies the NEQ predicate on the "memberId" field.

func MemberIdNotIn

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

MemberIdNotIn applies the NotIn predicate on the "memberId" 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 Title

func Title(v string) predicate.Comment

Title applies equality check predicate on the "title" field. It's identical to TitleEQ.

func TitleContains

func TitleContains(v string) predicate.Comment

TitleContains applies the Contains predicate on the "title" field.

func TitleContainsFold

func TitleContainsFold(v string) predicate.Comment

TitleContainsFold applies the ContainsFold predicate on the "title" field.

func TitleEQ

func TitleEQ(v string) predicate.Comment

TitleEQ applies the EQ predicate on the "title" field.

func TitleEqualFold

func TitleEqualFold(v string) predicate.Comment

TitleEqualFold applies the EqualFold predicate on the "title" field.

func TitleGT

func TitleGT(v string) predicate.Comment

TitleGT applies the GT predicate on the "title" field.

func TitleGTE

func TitleGTE(v string) predicate.Comment

TitleGTE applies the GTE predicate on the "title" field.

func TitleHasPrefix

func TitleHasPrefix(v string) predicate.Comment

TitleHasPrefix applies the HasPrefix predicate on the "title" field.

func TitleHasSuffix

func TitleHasSuffix(v string) predicate.Comment

TitleHasSuffix applies the HasSuffix predicate on the "title" field.

func TitleIn

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

TitleIn applies the In predicate on the "title" field.

func TitleIsNil

func TitleIsNil() predicate.Comment

TitleIsNil applies the IsNil predicate on the "title" field.

func TitleLT

func TitleLT(v string) predicate.Comment

TitleLT applies the LT predicate on the "title" field.

func TitleLTE

func TitleLTE(v string) predicate.Comment

TitleLTE applies the LTE predicate on the "title" field.

func TitleNEQ

func TitleNEQ(v string) predicate.Comment

TitleNEQ applies the NEQ predicate on the "title" field.

func TitleNotIn

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

TitleNotIn applies the NotIn predicate on the "title" field.

func TitleNotNil

func TitleNotNil() predicate.Comment

TitleNotNil applies the NotNil predicate on the "title" field.

func UpdateTime

func UpdateTime(v time.Time) predicate.Comment

UpdateTime applies equality check predicate on the "update_time" field. It's identical to UpdateTimeEQ.

func UpdateTimeEQ

func UpdateTimeEQ(v time.Time) predicate.Comment

UpdateTimeEQ applies the EQ predicate on the "update_time" field.

func UpdateTimeGT

func UpdateTimeGT(v time.Time) predicate.Comment

UpdateTimeGT applies the GT predicate on the "update_time" field.

func UpdateTimeGTE

func UpdateTimeGTE(v time.Time) predicate.Comment

UpdateTimeGTE applies the GTE predicate on the "update_time" field.

func UpdateTimeIn

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

UpdateTimeIn applies the In predicate on the "update_time" field.

func UpdateTimeLT

func UpdateTimeLT(v time.Time) predicate.Comment

UpdateTimeLT applies the LT predicate on the "update_time" field.

func UpdateTimeLTE

func UpdateTimeLTE(v time.Time) predicate.Comment

UpdateTimeLTE applies the LTE predicate on the "update_time" field.

func UpdateTimeNEQ

func UpdateTimeNEQ(v time.Time) predicate.Comment

UpdateTimeNEQ applies the NEQ predicate on the "update_time" field.

func UpdateTimeNotIn

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

UpdateTimeNotIn applies the NotIn predicate on the "update_time" 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 ByContent

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

ByContent orders the results by the content field.

func ByCreateTime

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

ByCreateTime orders the results by the create_time 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 ByIsReply

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

ByIsReply orders the results by the is_reply field.

func ByMemberId

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

ByMemberId orders the results by the memberId field.

func ByReplys

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

ByReplys orders the results by replys terms.

func ByReplysCount

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

ByReplysCount orders the results by replys count.

func ByTitle

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

ByTitle orders the results by the title field.

func ByUpdateTime

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

ByUpdateTime orders the results by the update_time 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