Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Memo) predicate.Memo
- func Content(v string) predicate.Memo
- func ContentContains(v string) predicate.Memo
- func ContentContainsFold(v string) predicate.Memo
- func ContentEQ(v string) predicate.Memo
- func ContentEqualFold(v string) predicate.Memo
- func ContentGT(v string) predicate.Memo
- func ContentGTE(v string) predicate.Memo
- func ContentHasPrefix(v string) predicate.Memo
- func ContentHasSuffix(v string) predicate.Memo
- func ContentIn(vs ...string) predicate.Memo
- func ContentLT(v string) predicate.Memo
- func ContentLTE(v string) predicate.Memo
- func ContentNEQ(v string) predicate.Memo
- func ContentNotIn(vs ...string) predicate.Memo
- func CreateTime(v time.Time) predicate.Memo
- func CreateTimeEQ(v time.Time) predicate.Memo
- func CreateTimeGT(v time.Time) predicate.Memo
- func CreateTimeGTE(v time.Time) predicate.Memo
- func CreateTimeIn(vs ...time.Time) predicate.Memo
- func CreateTimeLT(v time.Time) predicate.Memo
- func CreateTimeLTE(v time.Time) predicate.Memo
- func CreateTimeNEQ(v time.Time) predicate.Memo
- func CreateTimeNotIn(vs ...time.Time) predicate.Memo
- func HasCollaborations() predicate.Memo
- func HasCollaborationsWith(preds ...predicate.Collaboration) predicate.Memo
- func HasCollaborators() predicate.Memo
- func HasCollaboratorsWith(preds ...predicate.User) predicate.Memo
- func HasOwner() predicate.Memo
- func HasOwnerWith(preds ...predicate.User) predicate.Memo
- func HasSubscribers() predicate.Memo
- func HasSubscribersWith(preds ...predicate.User) predicate.Memo
- func HasSubscriptions() predicate.Memo
- func HasSubscriptionsWith(preds ...predicate.Subscription) predicate.Memo
- func HasTags() predicate.Memo
- func HasTagsWith(preds ...predicate.Tag) predicate.Memo
- func ID(id uuid.UUID) predicate.Memo
- func IDEQ(id uuid.UUID) predicate.Memo
- func IDGT(id uuid.UUID) predicate.Memo
- func IDGTE(id uuid.UUID) predicate.Memo
- func IDIn(ids ...uuid.UUID) predicate.Memo
- func IDLT(id uuid.UUID) predicate.Memo
- func IDLTE(id uuid.UUID) predicate.Memo
- func IDNEQ(id uuid.UUID) predicate.Memo
- func IDNotIn(ids ...uuid.UUID) predicate.Memo
- func IsPublished(v bool) predicate.Memo
- func IsPublishedEQ(v bool) predicate.Memo
- func IsPublishedNEQ(v bool) predicate.Memo
- func Not(p predicate.Memo) predicate.Memo
- func Or(predicates ...predicate.Memo) predicate.Memo
- func OwnerID(v uuid.UUID) predicate.Memo
- func OwnerIDEQ(v uuid.UUID) predicate.Memo
- func OwnerIDIn(vs ...uuid.UUID) predicate.Memo
- func OwnerIDNEQ(v uuid.UUID) predicate.Memo
- func OwnerIDNotIn(vs ...uuid.UUID) predicate.Memo
- func Title(v string) predicate.Memo
- func TitleContains(v string) predicate.Memo
- func TitleContainsFold(v string) predicate.Memo
- func TitleEQ(v string) predicate.Memo
- func TitleEqualFold(v string) predicate.Memo
- func TitleGT(v string) predicate.Memo
- func TitleGTE(v string) predicate.Memo
- func TitleHasPrefix(v string) predicate.Memo
- func TitleHasSuffix(v string) predicate.Memo
- func TitleIn(vs ...string) predicate.Memo
- func TitleLT(v string) predicate.Memo
- func TitleLTE(v string) predicate.Memo
- func TitleNEQ(v string) predicate.Memo
- func TitleNotIn(vs ...string) predicate.Memo
- func UpdateTime(v time.Time) predicate.Memo
- func UpdateTimeEQ(v time.Time) predicate.Memo
- func UpdateTimeGT(v time.Time) predicate.Memo
- func UpdateTimeGTE(v time.Time) predicate.Memo
- func UpdateTimeIn(vs ...time.Time) predicate.Memo
- func UpdateTimeLT(v time.Time) predicate.Memo
- func UpdateTimeLTE(v time.Time) predicate.Memo
- func UpdateTimeNEQ(v time.Time) predicate.Memo
- func UpdateTimeNotIn(vs ...time.Time) predicate.Memo
- func ValidColumn(column string) bool
- func Version(v int) predicate.Memo
- func VersionEQ(v int) predicate.Memo
- func VersionGT(v int) predicate.Memo
- func VersionGTE(v int) predicate.Memo
- func VersionIn(vs ...int) predicate.Memo
- func VersionLT(v int) predicate.Memo
- func VersionLTE(v int) predicate.Memo
- func VersionNEQ(v int) predicate.Memo
- func VersionNotIn(vs ...int) predicate.Memo
- type OrderOption
- func ByCollaborations(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByCollaborationsCount(opts ...sql.OrderTermOption) OrderOption
- func ByCollaborators(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByCollaboratorsCount(opts ...sql.OrderTermOption) OrderOption
- func ByContent(opts ...sql.OrderTermOption) OrderOption
- func ByCreateTime(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByIsPublished(opts ...sql.OrderTermOption) OrderOption
- func ByOwnerField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByOwnerID(opts ...sql.OrderTermOption) OrderOption
- func BySubscribers(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func BySubscribersCount(opts ...sql.OrderTermOption) OrderOption
- func BySubscriptions(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func BySubscriptionsCount(opts ...sql.OrderTermOption) OrderOption
- func ByTags(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByTagsCount(opts ...sql.OrderTermOption) OrderOption
- func ByTitle(opts ...sql.OrderTermOption) OrderOption
- func ByUpdateTime(opts ...sql.OrderTermOption) OrderOption
- func ByVersion(opts ...sql.OrderTermOption) OrderOption
Constants ¶
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 ¶
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"} )
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 )
var Columns = []string{ FieldID, FieldOwnerID, FieldTitle, FieldContent, FieldIsPublished, FieldVersion, FieldCreateTime, FieldUpdateTime, }
Columns holds all SQL columns for memo fields.
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 CreateTime ¶
CreateTime applies equality check predicate on the "create_time" field. It's identical to CreateTimeEQ.
func CreateTimeEQ ¶
CreateTimeEQ applies the EQ predicate on the "create_time" field.
func CreateTimeGT ¶
CreateTimeGT applies the GT predicate on the "create_time" field.
func CreateTimeGTE ¶
CreateTimeGTE applies the GTE predicate on the "create_time" field.
func CreateTimeIn ¶
CreateTimeIn applies the In predicate on the "create_time" field.
func CreateTimeLT ¶
CreateTimeLT applies the LT predicate on the "create_time" field.
func CreateTimeLTE ¶
CreateTimeLTE applies the LTE predicate on the "create_time" field.
func CreateTimeNEQ ¶
CreateTimeNEQ applies the NEQ predicate on the "create_time" field.
func CreateTimeNotIn ¶
CreateTimeNotIn applies the NotIn predicate on the "create_time" field.
func HasCollaborations ¶
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 ¶
HasCollaborators applies the HasEdge predicate on the "collaborators" edge.
func HasCollaboratorsWith ¶
HasCollaboratorsWith applies the HasEdge predicate on the "collaborators" edge with a given conditions (other predicates).
func HasOwnerWith ¶
HasOwnerWith applies the HasEdge predicate on the "owner" edge with a given conditions (other predicates).
func HasSubscribers ¶
HasSubscribers applies the HasEdge predicate on the "subscribers" edge.
func HasSubscribersWith ¶
HasSubscribersWith applies the HasEdge predicate on the "subscribers" edge with a given conditions (other predicates).
func HasSubscriptions ¶
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 HasTagsWith ¶
HasTagsWith applies the HasEdge predicate on the "tags" edge with a given conditions (other predicates).
func IsPublished ¶
IsPublished applies equality check predicate on the "is_published" field. It's identical to IsPublishedEQ.
func IsPublishedEQ ¶
IsPublishedEQ applies the EQ predicate on the "is_published" field.
func IsPublishedNEQ ¶
IsPublishedNEQ applies the NEQ predicate on the "is_published" field.
func OwnerID ¶
OwnerID applies equality check predicate on the "owner_id" field. It's identical to OwnerIDEQ.
func OwnerIDNEQ ¶
OwnerIDNEQ applies the NEQ predicate on the "owner_id" field.
func OwnerIDNotIn ¶
OwnerIDNotIn applies the NotIn predicate on the "owner_id" field.
func Title ¶
Title applies equality check predicate on the "title" field. It's identical to TitleEQ.
func TitleContains ¶
TitleContains applies the Contains predicate on the "title" field.
func TitleContainsFold ¶
TitleContainsFold applies the ContainsFold predicate on the "title" field.
func TitleEqualFold ¶
TitleEqualFold applies the EqualFold predicate on the "title" field.
func TitleHasPrefix ¶
TitleHasPrefix applies the HasPrefix predicate on the "title" field.
func TitleHasSuffix ¶
TitleHasSuffix applies the HasSuffix predicate on the "title" field.
func TitleNotIn ¶
TitleNotIn applies the NotIn predicate on the "title" field.
func UpdateTime ¶
UpdateTime applies equality check predicate on the "update_time" field. It's identical to UpdateTimeEQ.
func UpdateTimeEQ ¶
UpdateTimeEQ applies the EQ predicate on the "update_time" field.
func UpdateTimeGT ¶
UpdateTimeGT applies the GT predicate on the "update_time" field.
func UpdateTimeGTE ¶
UpdateTimeGTE applies the GTE predicate on the "update_time" field.
func UpdateTimeIn ¶
UpdateTimeIn applies the In predicate on the "update_time" field.
func UpdateTimeLT ¶
UpdateTimeLT applies the LT predicate on the "update_time" field.
func UpdateTimeLTE ¶
UpdateTimeLTE applies the LTE predicate on the "update_time" field.
func UpdateTimeNEQ ¶
UpdateTimeNEQ applies the NEQ predicate on the "update_time" field.
func UpdateTimeNotIn ¶
UpdateTimeNotIn applies the NotIn predicate on the "update_time" field.
func ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).
func Version ¶
Version applies equality check predicate on the "version" field. It's identical to VersionEQ.
func VersionGTE ¶
VersionGTE applies the GTE predicate on the "version" field.
func VersionLTE ¶
VersionLTE applies the LTE predicate on the "version" field.
func VersionNEQ ¶
VersionNEQ applies the NEQ predicate on the "version" field.
func VersionNotIn ¶
VersionNotIn applies the NotIn predicate on the "version" field.
Types ¶
type OrderOption ¶
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.