memo

package
v0.0.0-...-08f7c2a Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the memo type in the database.
	Label = "memo"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldOwnerID holds the string denoting the owner_id field in the database.
	FieldOwnerID = "owner_id"
	// 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"
	// FieldIsPublished holds the string denoting the is_published field in the database.
	FieldIsPublished = "is_published"
	// FieldVersion holds the string denoting the version field in the database.
	FieldVersion = "version"
	// 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"
	// EdgeOwner holds the string denoting the owner edge name in mutations.
	EdgeOwner = "owner"
	// EdgeTags holds the string denoting the tags edge name in mutations.
	EdgeTags = "tags"
	// EdgeSubscribers holds the string denoting the subscribers edge name in mutations.
	EdgeSubscribers = "subscribers"
	// EdgeCollaborators holds the string denoting the collaborators edge name in mutations.
	EdgeCollaborators = "collaborators"
	// EdgeSubscriptions holds the string denoting the subscriptions edge name in mutations.
	EdgeSubscriptions = "subscriptions"
	// EdgeCollaborations holds the string denoting the collaborations edge name in mutations.
	EdgeCollaborations = "collaborations"
	// Table holds the table name of the memo in the database.
	Table = "memos"
	// OwnerTable is the table that holds the owner relation/edge.
	OwnerTable = "memos"
	// OwnerInverseTable is the table name for the User entity.
	// It exists in this package in order to avoid circular dependency with the "user" package.
	OwnerInverseTable = "users"
	// OwnerColumn is the table column denoting the owner relation/edge.
	OwnerColumn = "owner_id"
	// TagsTable is the table that holds the tags relation/edge. The primary key declared below.
	TagsTable = "memo_tags"
	// TagsInverseTable is the table name for the Tag entity.
	// It exists in this package in order to avoid circular dependency with the "tag" package.
	TagsInverseTable = "tags"
	// SubscribersTable is the table that holds the subscribers relation/edge. The primary key declared below.
	SubscribersTable = "subscriptions"
	// SubscribersInverseTable is the table name for the User entity.
	// It exists in this package in order to avoid circular dependency with the "user" package.
	SubscribersInverseTable = "users"
	// CollaboratorsTable is the table that holds the collaborators relation/edge. The primary key declared below.
	CollaboratorsTable = "collaborations"
	// CollaboratorsInverseTable is the table name for the User entity.
	// It exists in this package in order to avoid circular dependency with the "user" package.
	CollaboratorsInverseTable = "users"
	// SubscriptionsTable is the table that holds the subscriptions relation/edge.
	SubscriptionsTable = "subscriptions"
	// SubscriptionsInverseTable is the table name for the Subscription entity.
	// It exists in this package in order to avoid circular dependency with the "subscription" package.
	SubscriptionsInverseTable = "subscriptions"
	// SubscriptionsColumn is the table column denoting the subscriptions relation/edge.
	SubscriptionsColumn = "memo_id"
	// CollaborationsTable is the table that holds the collaborations relation/edge.
	CollaborationsTable = "collaborations"
	// CollaborationsInverseTable is the table name for the Collaboration entity.
	// It exists in this package in order to avoid circular dependency with the "collaboration" package.
	CollaborationsInverseTable = "collaborations"
	// CollaborationsColumn is the table column denoting the collaborations relation/edge.
	CollaborationsColumn = "memo_id"
)

Variables

View Source
var (
	// TagsPrimaryKey and TagsColumn2 are the table columns denoting the
	// primary key for the tags relation (M2M).
	TagsPrimaryKey = []string{"memo_id", "tag_id"}
	// SubscribersPrimaryKey and SubscribersColumn2 are the table columns denoting the
	// primary key for the subscribers relation (M2M).
	SubscribersPrimaryKey = []string{"user_id", "memo_id"}
	// CollaboratorsPrimaryKey and CollaboratorsColumn2 are the table columns denoting the
	// primary key for the collaborators relation (M2M).
	CollaboratorsPrimaryKey = []string{"user_id", "memo_id"}
)
View Source
var (
	// TitleValidator is a validator for the "title" field. It is called by the builders before save.
	TitleValidator func(string) error
	// ContentValidator is a validator for the "content" field. It is called by the builders before save.
	ContentValidator func(string) error
	// DefaultIsPublished holds the default value on creation for the "is_published" field.
	DefaultIsPublished bool
	// DefaultVersion holds the default value on creation for the "version" field.
	DefaultVersion int
	// DefaultCreateTime holds the default value on creation for the "create_time" field.
	DefaultCreateTime func() time.Time
	// DefaultUpdateTime holds the default value on creation for the "update_time" field.
	DefaultUpdateTime func() time.Time
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() uuid.UUID
)

Columns holds all SQL columns for memo fields.

Functions

func And

func And(predicates ...predicate.Memo) predicate.Memo

And groups predicates with the AND operator between them.

func Content

func Content(v string) predicate.Memo

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

func ContentContains

func ContentContains(v string) predicate.Memo

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

func ContentContainsFold

func ContentContainsFold(v string) predicate.Memo

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

func ContentEQ

func ContentEQ(v string) predicate.Memo

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

func ContentEqualFold

func ContentEqualFold(v string) predicate.Memo

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

func ContentGT

func ContentGT(v string) predicate.Memo

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

func ContentGTE

func ContentGTE(v string) predicate.Memo

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

func ContentHasPrefix

func ContentHasPrefix(v string) predicate.Memo

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

func ContentHasSuffix

func ContentHasSuffix(v string) predicate.Memo

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

func ContentIn

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

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

func ContentLT

func ContentLT(v string) predicate.Memo

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

func ContentLTE

func ContentLTE(v string) predicate.Memo

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

func ContentNEQ

func ContentNEQ(v string) predicate.Memo

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

func ContentNotIn

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

ContentNotIn applies the NotIn predicate on the "content" field.

func CreateTime

func CreateTime(v time.Time) predicate.Memo

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

func CreateTimeEQ

func CreateTimeEQ(v time.Time) predicate.Memo

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

func CreateTimeGT

func CreateTimeGT(v time.Time) predicate.Memo

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

func CreateTimeGTE

func CreateTimeGTE(v time.Time) predicate.Memo

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

func CreateTimeIn

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

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

func CreateTimeLT

func CreateTimeLT(v time.Time) predicate.Memo

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

func CreateTimeLTE

func CreateTimeLTE(v time.Time) predicate.Memo

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

func CreateTimeNEQ

func CreateTimeNEQ(v time.Time) predicate.Memo

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

func CreateTimeNotIn

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

CreateTimeNotIn applies the NotIn predicate on the "create_time" field.

func HasCollaborations

func HasCollaborations() predicate.Memo

HasCollaborations applies the HasEdge predicate on the "collaborations" edge.

func HasCollaborationsWith

func HasCollaborationsWith(preds ...predicate.Collaboration) predicate.Memo

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

func HasCollaborators

func HasCollaborators() predicate.Memo

HasCollaborators applies the HasEdge predicate on the "collaborators" edge.

func HasCollaboratorsWith

func HasCollaboratorsWith(preds ...predicate.User) predicate.Memo

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

func HasOwner

func HasOwner() predicate.Memo

HasOwner applies the HasEdge predicate on the "owner" edge.

func HasOwnerWith

func HasOwnerWith(preds ...predicate.User) predicate.Memo

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

func HasSubscribers

func HasSubscribers() predicate.Memo

HasSubscribers applies the HasEdge predicate on the "subscribers" edge.

func HasSubscribersWith

func HasSubscribersWith(preds ...predicate.User) predicate.Memo

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

func HasSubscriptions

func HasSubscriptions() predicate.Memo

HasSubscriptions applies the HasEdge predicate on the "subscriptions" edge.

func HasSubscriptionsWith

func HasSubscriptionsWith(preds ...predicate.Subscription) predicate.Memo

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

func HasTags

func HasTags() predicate.Memo

HasTags applies the HasEdge predicate on the "tags" edge.

func HasTagsWith

func HasTagsWith(preds ...predicate.Tag) predicate.Memo

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

func ID

func ID(id uuid.UUID) predicate.Memo

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id uuid.UUID) predicate.Memo

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id uuid.UUID) predicate.Memo

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id uuid.UUID) predicate.Memo

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...uuid.UUID) predicate.Memo

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id uuid.UUID) predicate.Memo

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id uuid.UUID) predicate.Memo

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id uuid.UUID) predicate.Memo

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...uuid.UUID) predicate.Memo

IDNotIn applies the NotIn predicate on the ID field.

func IsPublished

func IsPublished(v bool) predicate.Memo

IsPublished applies equality check predicate on the "is_published" field. It's identical to IsPublishedEQ.

func IsPublishedEQ

func IsPublishedEQ(v bool) predicate.Memo

IsPublishedEQ applies the EQ predicate on the "is_published" field.

func IsPublishedNEQ

func IsPublishedNEQ(v bool) predicate.Memo

IsPublishedNEQ applies the NEQ predicate on the "is_published" field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Memo) predicate.Memo

Or groups predicates with the OR operator between them.

func OwnerID

func OwnerID(v uuid.UUID) predicate.Memo

OwnerID applies equality check predicate on the "owner_id" field. It's identical to OwnerIDEQ.

func OwnerIDEQ

func OwnerIDEQ(v uuid.UUID) predicate.Memo

OwnerIDEQ applies the EQ predicate on the "owner_id" field.

func OwnerIDIn

func OwnerIDIn(vs ...uuid.UUID) predicate.Memo

OwnerIDIn applies the In predicate on the "owner_id" field.

func OwnerIDNEQ

func OwnerIDNEQ(v uuid.UUID) predicate.Memo

OwnerIDNEQ applies the NEQ predicate on the "owner_id" field.

func OwnerIDNotIn

func OwnerIDNotIn(vs ...uuid.UUID) predicate.Memo

OwnerIDNotIn applies the NotIn predicate on the "owner_id" field.

func Title

func Title(v string) predicate.Memo

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

func TitleContains

func TitleContains(v string) predicate.Memo

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

func TitleContainsFold

func TitleContainsFold(v string) predicate.Memo

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

func TitleEQ

func TitleEQ(v string) predicate.Memo

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

func TitleEqualFold

func TitleEqualFold(v string) predicate.Memo

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

func TitleGT

func TitleGT(v string) predicate.Memo

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

func TitleGTE

func TitleGTE(v string) predicate.Memo

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

func TitleHasPrefix

func TitleHasPrefix(v string) predicate.Memo

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

func TitleHasSuffix

func TitleHasSuffix(v string) predicate.Memo

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

func TitleIn

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

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

func TitleLT

func TitleLT(v string) predicate.Memo

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

func TitleLTE

func TitleLTE(v string) predicate.Memo

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

func TitleNEQ

func TitleNEQ(v string) predicate.Memo

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

func TitleNotIn

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

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

func UpdateTime

func UpdateTime(v time.Time) predicate.Memo

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

func UpdateTimeEQ

func UpdateTimeEQ(v time.Time) predicate.Memo

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

func UpdateTimeGT

func UpdateTimeGT(v time.Time) predicate.Memo

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

func UpdateTimeGTE

func UpdateTimeGTE(v time.Time) predicate.Memo

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

func UpdateTimeIn

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

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

func UpdateTimeLT

func UpdateTimeLT(v time.Time) predicate.Memo

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

func UpdateTimeLTE

func UpdateTimeLTE(v time.Time) predicate.Memo

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

func UpdateTimeNEQ

func UpdateTimeNEQ(v time.Time) predicate.Memo

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

func UpdateTimeNotIn

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

UpdateTimeNotIn applies the NotIn predicate on the "update_time" field.

func ValidColumn

func ValidColumn(column string) bool

ValidColumn reports if the column name is valid (part of the table columns).

func Version

func Version(v int) predicate.Memo

Version applies equality check predicate on the "version" field. It's identical to VersionEQ.

func VersionEQ

func VersionEQ(v int) predicate.Memo

VersionEQ applies the EQ predicate on the "version" field.

func VersionGT

func VersionGT(v int) predicate.Memo

VersionGT applies the GT predicate on the "version" field.

func VersionGTE

func VersionGTE(v int) predicate.Memo

VersionGTE applies the GTE predicate on the "version" field.

func VersionIn

func VersionIn(vs ...int) predicate.Memo

VersionIn applies the In predicate on the "version" field.

func VersionLT

func VersionLT(v int) predicate.Memo

VersionLT applies the LT predicate on the "version" field.

func VersionLTE

func VersionLTE(v int) predicate.Memo

VersionLTE applies the LTE predicate on the "version" field.

func VersionNEQ

func VersionNEQ(v int) predicate.Memo

VersionNEQ applies the NEQ predicate on the "version" field.

func VersionNotIn

func VersionNotIn(vs ...int) predicate.Memo

VersionNotIn applies the NotIn predicate on the "version" field.

Types

type OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the Memo queries.

func ByCollaborations

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

ByCollaborations orders the results by collaborations terms.

func ByCollaborationsCount

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

ByCollaborationsCount orders the results by collaborations count.

func ByCollaborators

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

ByCollaborators orders the results by collaborators terms.

func ByCollaboratorsCount

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

ByCollaboratorsCount orders the results by collaborators count.

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 ByID

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

ByID orders the results by the id field.

func ByIsPublished

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

ByIsPublished orders the results by the is_published field.

func ByOwnerField

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

ByOwnerField orders the results by owner field.

func ByOwnerID

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

ByOwnerID orders the results by the owner_id field.

func BySubscribers

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

BySubscribers orders the results by subscribers terms.

func BySubscribersCount

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

BySubscribersCount orders the results by subscribers count.

func BySubscriptions

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

BySubscriptions orders the results by subscriptions terms.

func BySubscriptionsCount

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

BySubscriptionsCount orders the results by subscriptions count.

func ByTags

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

ByTags orders the results by tags terms.

func ByTagsCount

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

ByTagsCount orders the results by tags 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 ByVersion

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

ByVersion orders the results by the version field.

Jump to

Keyboard shortcuts

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