mirror of
https://github.com/versia-pub/versia-go.git
synced 2025-12-06 06:28:18 +01:00
502 lines
16 KiB
Go
502 lines
16 KiB
Go
|
|
// Code generated by ent, DO NOT EDIT.
|
||
|
|
|
||
|
|
package note
|
||
|
|
|
||
|
|
import (
|
||
|
|
"time"
|
||
|
|
|
||
|
|
"entgo.io/ent/dialect/sql"
|
||
|
|
"entgo.io/ent/dialect/sql/sqlgraph"
|
||
|
|
"github.com/google/uuid"
|
||
|
|
"github.com/lysand-org/versia-go/ent/predicate"
|
||
|
|
)
|
||
|
|
|
||
|
|
// ID filters vertices based on their ID field.
|
||
|
|
func ID(id uuid.UUID) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldEQ(FieldID, id))
|
||
|
|
}
|
||
|
|
|
||
|
|
// IDEQ applies the EQ predicate on the ID field.
|
||
|
|
func IDEQ(id uuid.UUID) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldEQ(FieldID, id))
|
||
|
|
}
|
||
|
|
|
||
|
|
// IDNEQ applies the NEQ predicate on the ID field.
|
||
|
|
func IDNEQ(id uuid.UUID) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldNEQ(FieldID, id))
|
||
|
|
}
|
||
|
|
|
||
|
|
// IDIn applies the In predicate on the ID field.
|
||
|
|
func IDIn(ids ...uuid.UUID) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldIn(FieldID, ids...))
|
||
|
|
}
|
||
|
|
|
||
|
|
// IDNotIn applies the NotIn predicate on the ID field.
|
||
|
|
func IDNotIn(ids ...uuid.UUID) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldNotIn(FieldID, ids...))
|
||
|
|
}
|
||
|
|
|
||
|
|
// IDGT applies the GT predicate on the ID field.
|
||
|
|
func IDGT(id uuid.UUID) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldGT(FieldID, id))
|
||
|
|
}
|
||
|
|
|
||
|
|
// IDGTE applies the GTE predicate on the ID field.
|
||
|
|
func IDGTE(id uuid.UUID) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldGTE(FieldID, id))
|
||
|
|
}
|
||
|
|
|
||
|
|
// IDLT applies the LT predicate on the ID field.
|
||
|
|
func IDLT(id uuid.UUID) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldLT(FieldID, id))
|
||
|
|
}
|
||
|
|
|
||
|
|
// IDLTE applies the LTE predicate on the ID field.
|
||
|
|
func IDLTE(id uuid.UUID) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldLTE(FieldID, id))
|
||
|
|
}
|
||
|
|
|
||
|
|
// IsRemote applies equality check predicate on the "isRemote" field. It's identical to IsRemoteEQ.
|
||
|
|
func IsRemote(v bool) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldEQ(FieldIsRemote, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// URI applies equality check predicate on the "uri" field. It's identical to URIEQ.
|
||
|
|
func URI(v string) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldEQ(FieldURI, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
|
||
|
|
func CreatedAt(v time.Time) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldEQ(FieldCreatedAt, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.
|
||
|
|
func UpdatedAt(v time.Time) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldEQ(FieldUpdatedAt, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// Subject applies equality check predicate on the "subject" field. It's identical to SubjectEQ.
|
||
|
|
func Subject(v string) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldEQ(FieldSubject, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// Content applies equality check predicate on the "content" field. It's identical to ContentEQ.
|
||
|
|
func Content(v string) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldEQ(FieldContent, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// IsSensitive applies equality check predicate on the "isSensitive" field. It's identical to IsSensitiveEQ.
|
||
|
|
func IsSensitive(v bool) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldEQ(FieldIsSensitive, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// IsRemoteEQ applies the EQ predicate on the "isRemote" field.
|
||
|
|
func IsRemoteEQ(v bool) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldEQ(FieldIsRemote, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// IsRemoteNEQ applies the NEQ predicate on the "isRemote" field.
|
||
|
|
func IsRemoteNEQ(v bool) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldNEQ(FieldIsRemote, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// URIEQ applies the EQ predicate on the "uri" field.
|
||
|
|
func URIEQ(v string) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldEQ(FieldURI, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// URINEQ applies the NEQ predicate on the "uri" field.
|
||
|
|
func URINEQ(v string) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldNEQ(FieldURI, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// URIIn applies the In predicate on the "uri" field.
|
||
|
|
func URIIn(vs ...string) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldIn(FieldURI, vs...))
|
||
|
|
}
|
||
|
|
|
||
|
|
// URINotIn applies the NotIn predicate on the "uri" field.
|
||
|
|
func URINotIn(vs ...string) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldNotIn(FieldURI, vs...))
|
||
|
|
}
|
||
|
|
|
||
|
|
// URIGT applies the GT predicate on the "uri" field.
|
||
|
|
func URIGT(v string) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldGT(FieldURI, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// URIGTE applies the GTE predicate on the "uri" field.
|
||
|
|
func URIGTE(v string) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldGTE(FieldURI, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// URILT applies the LT predicate on the "uri" field.
|
||
|
|
func URILT(v string) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldLT(FieldURI, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// URILTE applies the LTE predicate on the "uri" field.
|
||
|
|
func URILTE(v string) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldLTE(FieldURI, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// URIContains applies the Contains predicate on the "uri" field.
|
||
|
|
func URIContains(v string) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldContains(FieldURI, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// URIHasPrefix applies the HasPrefix predicate on the "uri" field.
|
||
|
|
func URIHasPrefix(v string) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldHasPrefix(FieldURI, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// URIHasSuffix applies the HasSuffix predicate on the "uri" field.
|
||
|
|
func URIHasSuffix(v string) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldHasSuffix(FieldURI, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// URIEqualFold applies the EqualFold predicate on the "uri" field.
|
||
|
|
func URIEqualFold(v string) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldEqualFold(FieldURI, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// URIContainsFold applies the ContainsFold predicate on the "uri" field.
|
||
|
|
func URIContainsFold(v string) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldContainsFold(FieldURI, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// CreatedAtEQ applies the EQ predicate on the "created_at" field.
|
||
|
|
func CreatedAtEQ(v time.Time) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldEQ(FieldCreatedAt, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
|
||
|
|
func CreatedAtNEQ(v time.Time) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldNEQ(FieldCreatedAt, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// CreatedAtIn applies the In predicate on the "created_at" field.
|
||
|
|
func CreatedAtIn(vs ...time.Time) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldIn(FieldCreatedAt, vs...))
|
||
|
|
}
|
||
|
|
|
||
|
|
// CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
|
||
|
|
func CreatedAtNotIn(vs ...time.Time) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldNotIn(FieldCreatedAt, vs...))
|
||
|
|
}
|
||
|
|
|
||
|
|
// CreatedAtGT applies the GT predicate on the "created_at" field.
|
||
|
|
func CreatedAtGT(v time.Time) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldGT(FieldCreatedAt, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// CreatedAtGTE applies the GTE predicate on the "created_at" field.
|
||
|
|
func CreatedAtGTE(v time.Time) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldGTE(FieldCreatedAt, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// CreatedAtLT applies the LT predicate on the "created_at" field.
|
||
|
|
func CreatedAtLT(v time.Time) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldLT(FieldCreatedAt, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// CreatedAtLTE applies the LTE predicate on the "created_at" field.
|
||
|
|
func CreatedAtLTE(v time.Time) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldLTE(FieldCreatedAt, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
|
||
|
|
func UpdatedAtEQ(v time.Time) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldEQ(FieldUpdatedAt, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
|
||
|
|
func UpdatedAtNEQ(v time.Time) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldNEQ(FieldUpdatedAt, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// UpdatedAtIn applies the In predicate on the "updated_at" field.
|
||
|
|
func UpdatedAtIn(vs ...time.Time) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldIn(FieldUpdatedAt, vs...))
|
||
|
|
}
|
||
|
|
|
||
|
|
// UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
|
||
|
|
func UpdatedAtNotIn(vs ...time.Time) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldNotIn(FieldUpdatedAt, vs...))
|
||
|
|
}
|
||
|
|
|
||
|
|
// UpdatedAtGT applies the GT predicate on the "updated_at" field.
|
||
|
|
func UpdatedAtGT(v time.Time) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldGT(FieldUpdatedAt, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
|
||
|
|
func UpdatedAtGTE(v time.Time) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldGTE(FieldUpdatedAt, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// UpdatedAtLT applies the LT predicate on the "updated_at" field.
|
||
|
|
func UpdatedAtLT(v time.Time) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldLT(FieldUpdatedAt, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
|
||
|
|
func UpdatedAtLTE(v time.Time) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldLTE(FieldUpdatedAt, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// SubjectEQ applies the EQ predicate on the "subject" field.
|
||
|
|
func SubjectEQ(v string) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldEQ(FieldSubject, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// SubjectNEQ applies the NEQ predicate on the "subject" field.
|
||
|
|
func SubjectNEQ(v string) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldNEQ(FieldSubject, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// SubjectIn applies the In predicate on the "subject" field.
|
||
|
|
func SubjectIn(vs ...string) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldIn(FieldSubject, vs...))
|
||
|
|
}
|
||
|
|
|
||
|
|
// SubjectNotIn applies the NotIn predicate on the "subject" field.
|
||
|
|
func SubjectNotIn(vs ...string) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldNotIn(FieldSubject, vs...))
|
||
|
|
}
|
||
|
|
|
||
|
|
// SubjectGT applies the GT predicate on the "subject" field.
|
||
|
|
func SubjectGT(v string) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldGT(FieldSubject, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// SubjectGTE applies the GTE predicate on the "subject" field.
|
||
|
|
func SubjectGTE(v string) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldGTE(FieldSubject, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// SubjectLT applies the LT predicate on the "subject" field.
|
||
|
|
func SubjectLT(v string) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldLT(FieldSubject, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// SubjectLTE applies the LTE predicate on the "subject" field.
|
||
|
|
func SubjectLTE(v string) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldLTE(FieldSubject, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// SubjectContains applies the Contains predicate on the "subject" field.
|
||
|
|
func SubjectContains(v string) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldContains(FieldSubject, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// SubjectHasPrefix applies the HasPrefix predicate on the "subject" field.
|
||
|
|
func SubjectHasPrefix(v string) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldHasPrefix(FieldSubject, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// SubjectHasSuffix applies the HasSuffix predicate on the "subject" field.
|
||
|
|
func SubjectHasSuffix(v string) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldHasSuffix(FieldSubject, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// SubjectIsNil applies the IsNil predicate on the "subject" field.
|
||
|
|
func SubjectIsNil() predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldIsNull(FieldSubject))
|
||
|
|
}
|
||
|
|
|
||
|
|
// SubjectNotNil applies the NotNil predicate on the "subject" field.
|
||
|
|
func SubjectNotNil() predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldNotNull(FieldSubject))
|
||
|
|
}
|
||
|
|
|
||
|
|
// SubjectEqualFold applies the EqualFold predicate on the "subject" field.
|
||
|
|
func SubjectEqualFold(v string) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldEqualFold(FieldSubject, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// SubjectContainsFold applies the ContainsFold predicate on the "subject" field.
|
||
|
|
func SubjectContainsFold(v string) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldContainsFold(FieldSubject, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// ContentEQ applies the EQ predicate on the "content" field.
|
||
|
|
func ContentEQ(v string) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldEQ(FieldContent, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// ContentNEQ applies the NEQ predicate on the "content" field.
|
||
|
|
func ContentNEQ(v string) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldNEQ(FieldContent, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// ContentIn applies the In predicate on the "content" field.
|
||
|
|
func ContentIn(vs ...string) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldIn(FieldContent, vs...))
|
||
|
|
}
|
||
|
|
|
||
|
|
// ContentNotIn applies the NotIn predicate on the "content" field.
|
||
|
|
func ContentNotIn(vs ...string) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldNotIn(FieldContent, vs...))
|
||
|
|
}
|
||
|
|
|
||
|
|
// ContentGT applies the GT predicate on the "content" field.
|
||
|
|
func ContentGT(v string) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldGT(FieldContent, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// ContentGTE applies the GTE predicate on the "content" field.
|
||
|
|
func ContentGTE(v string) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldGTE(FieldContent, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// ContentLT applies the LT predicate on the "content" field.
|
||
|
|
func ContentLT(v string) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldLT(FieldContent, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// ContentLTE applies the LTE predicate on the "content" field.
|
||
|
|
func ContentLTE(v string) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldLTE(FieldContent, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// ContentContains applies the Contains predicate on the "content" field.
|
||
|
|
func ContentContains(v string) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldContains(FieldContent, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// ContentHasPrefix applies the HasPrefix predicate on the "content" field.
|
||
|
|
func ContentHasPrefix(v string) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldHasPrefix(FieldContent, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// ContentHasSuffix applies the HasSuffix predicate on the "content" field.
|
||
|
|
func ContentHasSuffix(v string) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldHasSuffix(FieldContent, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// ContentEqualFold applies the EqualFold predicate on the "content" field.
|
||
|
|
func ContentEqualFold(v string) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldEqualFold(FieldContent, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// ContentContainsFold applies the ContainsFold predicate on the "content" field.
|
||
|
|
func ContentContainsFold(v string) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldContainsFold(FieldContent, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// IsSensitiveEQ applies the EQ predicate on the "isSensitive" field.
|
||
|
|
func IsSensitiveEQ(v bool) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldEQ(FieldIsSensitive, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// IsSensitiveNEQ applies the NEQ predicate on the "isSensitive" field.
|
||
|
|
func IsSensitiveNEQ(v bool) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldNEQ(FieldIsSensitive, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// VisibilityEQ applies the EQ predicate on the "visibility" field.
|
||
|
|
func VisibilityEQ(v Visibility) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldEQ(FieldVisibility, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// VisibilityNEQ applies the NEQ predicate on the "visibility" field.
|
||
|
|
func VisibilityNEQ(v Visibility) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldNEQ(FieldVisibility, v))
|
||
|
|
}
|
||
|
|
|
||
|
|
// VisibilityIn applies the In predicate on the "visibility" field.
|
||
|
|
func VisibilityIn(vs ...Visibility) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldIn(FieldVisibility, vs...))
|
||
|
|
}
|
||
|
|
|
||
|
|
// VisibilityNotIn applies the NotIn predicate on the "visibility" field.
|
||
|
|
func VisibilityNotIn(vs ...Visibility) predicate.Note {
|
||
|
|
return predicate.Note(sql.FieldNotIn(FieldVisibility, vs...))
|
||
|
|
}
|
||
|
|
|
||
|
|
// HasAuthor applies the HasEdge predicate on the "author" edge.
|
||
|
|
func HasAuthor() predicate.Note {
|
||
|
|
return predicate.Note(func(s *sql.Selector) {
|
||
|
|
step := sqlgraph.NewStep(
|
||
|
|
sqlgraph.From(Table, FieldID),
|
||
|
|
sqlgraph.Edge(sqlgraph.M2O, false, AuthorTable, AuthorColumn),
|
||
|
|
)
|
||
|
|
sqlgraph.HasNeighbors(s, step)
|
||
|
|
})
|
||
|
|
}
|
||
|
|
|
||
|
|
// HasAuthorWith applies the HasEdge predicate on the "author" edge with a given conditions (other predicates).
|
||
|
|
func HasAuthorWith(preds ...predicate.User) predicate.Note {
|
||
|
|
return predicate.Note(func(s *sql.Selector) {
|
||
|
|
step := newAuthorStep()
|
||
|
|
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
||
|
|
for _, p := range preds {
|
||
|
|
p(s)
|
||
|
|
}
|
||
|
|
})
|
||
|
|
})
|
||
|
|
}
|
||
|
|
|
||
|
|
// HasMentions applies the HasEdge predicate on the "mentions" edge.
|
||
|
|
func HasMentions() predicate.Note {
|
||
|
|
return predicate.Note(func(s *sql.Selector) {
|
||
|
|
step := sqlgraph.NewStep(
|
||
|
|
sqlgraph.From(Table, FieldID),
|
||
|
|
sqlgraph.Edge(sqlgraph.M2M, false, MentionsTable, MentionsPrimaryKey...),
|
||
|
|
)
|
||
|
|
sqlgraph.HasNeighbors(s, step)
|
||
|
|
})
|
||
|
|
}
|
||
|
|
|
||
|
|
// HasMentionsWith applies the HasEdge predicate on the "mentions" edge with a given conditions (other predicates).
|
||
|
|
func HasMentionsWith(preds ...predicate.User) predicate.Note {
|
||
|
|
return predicate.Note(func(s *sql.Selector) {
|
||
|
|
step := newMentionsStep()
|
||
|
|
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
||
|
|
for _, p := range preds {
|
||
|
|
p(s)
|
||
|
|
}
|
||
|
|
})
|
||
|
|
})
|
||
|
|
}
|
||
|
|
|
||
|
|
// HasAttachments applies the HasEdge predicate on the "attachments" edge.
|
||
|
|
func HasAttachments() predicate.Note {
|
||
|
|
return predicate.Note(func(s *sql.Selector) {
|
||
|
|
step := sqlgraph.NewStep(
|
||
|
|
sqlgraph.From(Table, FieldID),
|
||
|
|
sqlgraph.Edge(sqlgraph.O2M, false, AttachmentsTable, AttachmentsColumn),
|
||
|
|
)
|
||
|
|
sqlgraph.HasNeighbors(s, step)
|
||
|
|
})
|
||
|
|
}
|
||
|
|
|
||
|
|
// HasAttachmentsWith applies the HasEdge predicate on the "attachments" edge with a given conditions (other predicates).
|
||
|
|
func HasAttachmentsWith(preds ...predicate.Attachment) predicate.Note {
|
||
|
|
return predicate.Note(func(s *sql.Selector) {
|
||
|
|
step := newAttachmentsStep()
|
||
|
|
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
||
|
|
for _, p := range preds {
|
||
|
|
p(s)
|
||
|
|
}
|
||
|
|
})
|
||
|
|
})
|
||
|
|
}
|
||
|
|
|
||
|
|
// And groups predicates with the AND operator between them.
|
||
|
|
func And(predicates ...predicate.Note) predicate.Note {
|
||
|
|
return predicate.Note(sql.AndPredicates(predicates...))
|
||
|
|
}
|
||
|
|
|
||
|
|
// Or groups predicates with the OR operator between them.
|
||
|
|
func Or(predicates ...predicate.Note) predicate.Note {
|
||
|
|
return predicate.Note(sql.OrPredicates(predicates...))
|
||
|
|
}
|
||
|
|
|
||
|
|
// Not applies the not operator on the given predicate.
|
||
|
|
func Not(p predicate.Note) predicate.Note {
|
||
|
|
return predicate.Note(sql.NotPredicates(p))
|
||
|
|
}
|