Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Notification) predicate.Notification
- func CreatedAt(v time.Time) predicate.Notification
- func CreatedAtEQ(v time.Time) predicate.Notification
- func CreatedAtGT(v time.Time) predicate.Notification
- func CreatedAtGTE(v time.Time) predicate.Notification
- func CreatedAtIn(vs ...time.Time) predicate.Notification
- func CreatedAtLT(v time.Time) predicate.Notification
- func CreatedAtLTE(v time.Time) predicate.Notification
- func CreatedAtNEQ(v time.Time) predicate.Notification
- func CreatedAtNotIn(vs ...time.Time) predicate.Notification
- func HasRelatedTweet() predicate.Notification
- func HasRelatedTweetWith(preds ...predicate.Tweet) predicate.Notification
- func HasRelatedUser() predicate.Notification
- func HasRelatedUserWith(preds ...predicate.User) predicate.Notification
- func HasUser() predicate.Notification
- func HasUserWith(preds ...predicate.User) predicate.Notification
- func ID(id int) predicate.Notification
- func IDEQ(id int) predicate.Notification
- func IDGT(id int) predicate.Notification
- func IDGTE(id int) predicate.Notification
- func IDIn(ids ...int) predicate.Notification
- func IDLT(id int) predicate.Notification
- func IDLTE(id int) predicate.Notification
- func IDNEQ(id int) predicate.Notification
- func IDNotIn(ids ...int) predicate.Notification
- func Not(p predicate.Notification) predicate.Notification
- func Or(predicates ...predicate.Notification) predicate.Notification
- func ReadAt(v time.Time) predicate.Notification
- func ReadAtEQ(v time.Time) predicate.Notification
- func ReadAtGT(v time.Time) predicate.Notification
- func ReadAtGTE(v time.Time) predicate.Notification
- func ReadAtIn(vs ...time.Time) predicate.Notification
- func ReadAtIsNil() predicate.Notification
- func ReadAtLT(v time.Time) predicate.Notification
- func ReadAtLTE(v time.Time) predicate.Notification
- func ReadAtNEQ(v time.Time) predicate.Notification
- func ReadAtNotIn(vs ...time.Time) predicate.Notification
- func ReadAtNotNil() predicate.Notification
- func TypeEQ(v Type) predicate.Notification
- func TypeIn(vs ...Type) predicate.Notification
- func TypeNEQ(v Type) predicate.Notification
- func TypeNotIn(vs ...Type) predicate.Notification
- func TypeValidator(_type Type) error
- func ValidColumn(column string) bool
- type OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByReadAt(opts ...sql.OrderTermOption) OrderOption
- func ByRelatedTweetField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByRelatedUserField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByType(opts ...sql.OrderTermOption) OrderOption
- func ByUserField(field string, opts ...sql.OrderTermOption) OrderOption
- type Type
Constants ¶
const ( // Label holds the string label denoting the notification type in the database. Label = "notification" // FieldID holds the string denoting the id field in the database. FieldID = "id" // FieldType holds the string denoting the type field in the database. FieldType = "type" // FieldCreatedAt holds the string denoting the created_at field in the database. FieldCreatedAt = "created_at" // FieldReadAt holds the string denoting the read_at field in the database. FieldReadAt = "read_at" // EdgeUser holds the string denoting the user edge name in mutations. EdgeUser = "user" // EdgeRelatedTweet holds the string denoting the related_tweet edge name in mutations. EdgeRelatedTweet = "related_tweet" // EdgeRelatedUser holds the string denoting the related_user edge name in mutations. EdgeRelatedUser = "related_user" // Table holds the table name of the notification in the database. Table = "notifications" // UserTable is the table that holds the user relation/edge. UserTable = "notifications" // UserInverseTable is the table name for the User entity. // It exists in this package in order to avoid circular dependency with the "user" package. UserInverseTable = "users" // UserColumn is the table column denoting the user relation/edge. UserColumn = "user_notifications" // RelatedTweetTable is the table that holds the related_tweet relation/edge. RelatedTweetTable = "notifications" // RelatedTweetInverseTable is the table name for the Tweet entity. // It exists in this package in order to avoid circular dependency with the "tweet" package. RelatedTweetInverseTable = "tweets" // RelatedTweetColumn is the table column denoting the related_tweet relation/edge. RelatedTweetColumn = "notification_related_tweet" // RelatedUserTable is the table that holds the related_user relation/edge. RelatedUserTable = "notifications" // RelatedUserInverseTable is the table name for the User entity. // It exists in this package in order to avoid circular dependency with the "user" package. RelatedUserInverseTable = "users" // RelatedUserColumn is the table column denoting the related_user relation/edge. RelatedUserColumn = "notification_related_user" )
Variables ¶
var Columns = []string{ FieldID, FieldType, FieldCreatedAt, FieldReadAt, }
Columns holds all SQL columns for notification fields.
var ( // DefaultCreatedAt holds the default value on creation for the "created_at" field. DefaultCreatedAt func() time.Time )
var ForeignKeys = []string{
"notification_related_tweet",
"notification_related_user",
"user_notifications",
}
ForeignKeys holds the SQL foreign-keys that are owned by the "notifications" table and are not defined as standalone fields in the schema.
Functions ¶
func And ¶
func And(predicates ...predicate.Notification) predicate.Notification
And groups predicates with the AND operator between them.
func CreatedAt ¶
func CreatedAt(v time.Time) predicate.Notification
CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
func CreatedAtEQ ¶
func CreatedAtEQ(v time.Time) predicate.Notification
CreatedAtEQ applies the EQ predicate on the "created_at" field.
func CreatedAtGT ¶
func CreatedAtGT(v time.Time) predicate.Notification
CreatedAtGT applies the GT predicate on the "created_at" field.
func CreatedAtGTE ¶
func CreatedAtGTE(v time.Time) predicate.Notification
CreatedAtGTE applies the GTE predicate on the "created_at" field.
func CreatedAtIn ¶
func CreatedAtIn(vs ...time.Time) predicate.Notification
CreatedAtIn applies the In predicate on the "created_at" field.
func CreatedAtLT ¶
func CreatedAtLT(v time.Time) predicate.Notification
CreatedAtLT applies the LT predicate on the "created_at" field.
func CreatedAtLTE ¶
func CreatedAtLTE(v time.Time) predicate.Notification
CreatedAtLTE applies the LTE predicate on the "created_at" field.
func CreatedAtNEQ ¶
func CreatedAtNEQ(v time.Time) predicate.Notification
CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
func CreatedAtNotIn ¶
func CreatedAtNotIn(vs ...time.Time) predicate.Notification
CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
func HasRelatedTweet ¶
func HasRelatedTweet() predicate.Notification
HasRelatedTweet applies the HasEdge predicate on the "related_tweet" edge.
func HasRelatedTweetWith ¶
func HasRelatedTweetWith(preds ...predicate.Tweet) predicate.Notification
HasRelatedTweetWith applies the HasEdge predicate on the "related_tweet" edge with a given conditions (other predicates).
func HasRelatedUser ¶
func HasRelatedUser() predicate.Notification
HasRelatedUser applies the HasEdge predicate on the "related_user" edge.
func HasRelatedUserWith ¶
func HasRelatedUserWith(preds ...predicate.User) predicate.Notification
HasRelatedUserWith applies the HasEdge predicate on the "related_user" edge with a given conditions (other predicates).
func HasUser ¶
func HasUser() predicate.Notification
HasUser applies the HasEdge predicate on the "user" edge.
func HasUserWith ¶
func HasUserWith(preds ...predicate.User) predicate.Notification
HasUserWith applies the HasEdge predicate on the "user" edge with a given conditions (other predicates).
func IDGTE ¶
func IDGTE(id int) predicate.Notification
IDGTE applies the GTE predicate on the ID field.
func IDIn ¶
func IDIn(ids ...int) predicate.Notification
IDIn applies the In predicate on the ID field.
func IDLTE ¶
func IDLTE(id int) predicate.Notification
IDLTE applies the LTE predicate on the ID field.
func IDNEQ ¶
func IDNEQ(id int) predicate.Notification
IDNEQ applies the NEQ predicate on the ID field.
func IDNotIn ¶
func IDNotIn(ids ...int) predicate.Notification
IDNotIn applies the NotIn predicate on the ID field.
func Not ¶
func Not(p predicate.Notification) predicate.Notification
Not applies the not operator on the given predicate.
func Or ¶
func Or(predicates ...predicate.Notification) predicate.Notification
Or groups predicates with the OR operator between them.
func ReadAt ¶
func ReadAt(v time.Time) predicate.Notification
ReadAt applies equality check predicate on the "read_at" field. It's identical to ReadAtEQ.
func ReadAtEQ ¶
func ReadAtEQ(v time.Time) predicate.Notification
ReadAtEQ applies the EQ predicate on the "read_at" field.
func ReadAtGT ¶
func ReadAtGT(v time.Time) predicate.Notification
ReadAtGT applies the GT predicate on the "read_at" field.
func ReadAtGTE ¶
func ReadAtGTE(v time.Time) predicate.Notification
ReadAtGTE applies the GTE predicate on the "read_at" field.
func ReadAtIn ¶
func ReadAtIn(vs ...time.Time) predicate.Notification
ReadAtIn applies the In predicate on the "read_at" field.
func ReadAtIsNil ¶
func ReadAtIsNil() predicate.Notification
ReadAtIsNil applies the IsNil predicate on the "read_at" field.
func ReadAtLT ¶
func ReadAtLT(v time.Time) predicate.Notification
ReadAtLT applies the LT predicate on the "read_at" field.
func ReadAtLTE ¶
func ReadAtLTE(v time.Time) predicate.Notification
ReadAtLTE applies the LTE predicate on the "read_at" field.
func ReadAtNEQ ¶
func ReadAtNEQ(v time.Time) predicate.Notification
ReadAtNEQ applies the NEQ predicate on the "read_at" field.
func ReadAtNotIn ¶
func ReadAtNotIn(vs ...time.Time) predicate.Notification
ReadAtNotIn applies the NotIn predicate on the "read_at" field.
func ReadAtNotNil ¶
func ReadAtNotNil() predicate.Notification
ReadAtNotNil applies the NotNil predicate on the "read_at" field.
func TypeEQ ¶
func TypeEQ(v Type) predicate.Notification
TypeEQ applies the EQ predicate on the "type" field.
func TypeIn ¶
func TypeIn(vs ...Type) predicate.Notification
TypeIn applies the In predicate on the "type" field.
func TypeNEQ ¶
func TypeNEQ(v Type) predicate.Notification
TypeNEQ applies the NEQ predicate on the "type" field.
func TypeNotIn ¶
func TypeNotIn(vs ...Type) predicate.Notification
TypeNotIn applies the NotIn predicate on the "type" field.
func TypeValidator ¶
TypeValidator is a validator for the "type" field enum values. It is called by the builders before save.
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 Notification queries.
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 ByReadAt ¶
func ByReadAt(opts ...sql.OrderTermOption) OrderOption
ByReadAt orders the results by the read_at field.
func ByRelatedTweetField ¶
func ByRelatedTweetField(field string, opts ...sql.OrderTermOption) OrderOption
ByRelatedTweetField orders the results by related_tweet field.
func ByRelatedUserField ¶
func ByRelatedUserField(field string, opts ...sql.OrderTermOption) OrderOption
ByRelatedUserField orders the results by related_user field.
func ByType ¶
func ByType(opts ...sql.OrderTermOption) OrderOption
ByType orders the results by the type field.
func ByUserField ¶
func ByUserField(field string, opts ...sql.OrderTermOption) OrderOption
ByUserField orders the results by user field.