Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Message) predicate.Message
- func Content(v string) predicate.Message
- func ContentContains(v string) predicate.Message
- func ContentContainsFold(v string) predicate.Message
- func ContentEQ(v string) predicate.Message
- func ContentEqualFold(v string) predicate.Message
- func ContentGT(v string) predicate.Message
- func ContentGTE(v string) predicate.Message
- func ContentHasPrefix(v string) predicate.Message
- func ContentHasSuffix(v string) predicate.Message
- func ContentIn(vs ...string) predicate.Message
- func ContentLT(v string) predicate.Message
- func ContentLTE(v string) predicate.Message
- func ContentNEQ(v string) predicate.Message
- func ContentNotIn(vs ...string) predicate.Message
- func ConversationID(v uuid.UUID) predicate.Message
- func ConversationIDEQ(v uuid.UUID) predicate.Message
- func ConversationIDIn(vs ...uuid.UUID) predicate.Message
- func ConversationIDNEQ(v uuid.UUID) predicate.Message
- func ConversationIDNotIn(vs ...uuid.UUID) predicate.Message
- func CreatedAt(v time.Time) predicate.Message
- func CreatedAtEQ(v time.Time) predicate.Message
- func CreatedAtGT(v time.Time) predicate.Message
- func CreatedAtGTE(v time.Time) predicate.Message
- func CreatedAtIn(vs ...time.Time) predicate.Message
- func CreatedAtLT(v time.Time) predicate.Message
- func CreatedAtLTE(v time.Time) predicate.Message
- func CreatedAtNEQ(v time.Time) predicate.Message
- func CreatedAtNotIn(vs ...time.Time) predicate.Message
- func HasConversation() predicate.Message
- func HasConversationWith(preds ...predicate.Conversation) predicate.Message
- func HasSender() predicate.Message
- func HasSenderWith(preds ...predicate.Person) predicate.Message
- func ID(id uuid.UUID) predicate.Message
- func IDEQ(id uuid.UUID) predicate.Message
- func IDGT(id uuid.UUID) predicate.Message
- func IDGTE(id uuid.UUID) predicate.Message
- func IDIn(ids ...uuid.UUID) predicate.Message
- func IDLT(id uuid.UUID) predicate.Message
- func IDLTE(id uuid.UUID) predicate.Message
- func IDNEQ(id uuid.UUID) predicate.Message
- func IDNotIn(ids ...uuid.UUID) predicate.Message
- func IsRead(v bool) predicate.Message
- func IsReadEQ(v bool) predicate.Message
- func IsReadNEQ(v bool) predicate.Message
- func Not(p predicate.Message) predicate.Message
- func Or(predicates ...predicate.Message) predicate.Message
- func SenderID(v uuid.UUID) predicate.Message
- func SenderIDEQ(v uuid.UUID) predicate.Message
- func SenderIDIn(vs ...uuid.UUID) predicate.Message
- func SenderIDNEQ(v uuid.UUID) predicate.Message
- func SenderIDNotIn(vs ...uuid.UUID) predicate.Message
- func TypeEQ(v Type) predicate.Message
- func TypeIn(vs ...Type) predicate.Message
- func TypeNEQ(v Type) predicate.Message
- func TypeNotIn(vs ...Type) predicate.Message
- func TypeValidator(_type Type) error
- func UpdatedAt(v time.Time) predicate.Message
- func UpdatedAtEQ(v time.Time) predicate.Message
- func UpdatedAtGT(v time.Time) predicate.Message
- func UpdatedAtGTE(v time.Time) predicate.Message
- func UpdatedAtIn(vs ...time.Time) predicate.Message
- func UpdatedAtLT(v time.Time) predicate.Message
- func UpdatedAtLTE(v time.Time) predicate.Message
- func UpdatedAtNEQ(v time.Time) predicate.Message
- func UpdatedAtNotIn(vs ...time.Time) predicate.Message
- func ValidColumn(column string) bool
- type OrderOption
- func ByContent(opts ...sql.OrderTermOption) OrderOption
- func ByConversationField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByConversationID(opts ...sql.OrderTermOption) OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByIsRead(opts ...sql.OrderTermOption) OrderOption
- func BySenderField(field string, opts ...sql.OrderTermOption) OrderOption
- func BySenderID(opts ...sql.OrderTermOption) OrderOption
- func ByType(opts ...sql.OrderTermOption) OrderOption
- func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
- type Type
Constants ¶
const ( // Label holds the string label denoting the message type in the database. Label = "message" // 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" // FieldConversationID holds the string denoting the conversation_id field in the database. FieldConversationID = "conversation_id" // FieldSenderID holds the string denoting the sender_id field in the database. FieldSenderID = "sender_id" // FieldType holds the string denoting the type field in the database. FieldType = "type" // FieldContent holds the string denoting the content field in the database. FieldContent = "content" // FieldIsRead holds the string denoting the is_read field in the database. FieldIsRead = "is_read" // EdgeConversation holds the string denoting the conversation edge name in mutations. EdgeConversation = "conversation" // EdgeSender holds the string denoting the sender edge name in mutations. EdgeSender = "sender" // Table holds the table name of the message in the database. Table = "messages" // ConversationTable is the table that holds the conversation relation/edge. ConversationTable = "messages" // ConversationInverseTable is the table name for the Conversation entity. // It exists in this package in order to avoid circular dependency with the "conversation" package. ConversationInverseTable = "conversations" // ConversationColumn is the table column denoting the conversation relation/edge. ConversationColumn = "conversation_id" // SenderTable is the table that holds the sender relation/edge. SenderTable = "messages" // SenderInverseTable is the table name for the Person entity. // It exists in this package in order to avoid circular dependency with the "person" package. SenderInverseTable = "persons" // SenderColumn is the table column denoting the sender relation/edge. SenderColumn = "sender_id" )
const DefaultType = TypeText
TypeText is the default value of the Type enum.
Variables ¶
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 // ContentValidator is a validator for the "content" field. It is called by the builders before save. ContentValidator func(string) error // DefaultIsRead holds the default value on creation for the "is_read" field. DefaultIsRead bool // DefaultID holds the default value on creation for the "id" field. DefaultID func() uuid.UUID )
var Columns = []string{ FieldID, FieldCreatedAt, FieldUpdatedAt, FieldConversationID, FieldSenderID, FieldType, FieldContent, FieldIsRead, }
Columns holds all SQL columns for message 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 ConversationID ¶
ConversationID applies equality check predicate on the "conversation_id" field. It's identical to ConversationIDEQ.
func ConversationIDEQ ¶
ConversationIDEQ applies the EQ predicate on the "conversation_id" field.
func ConversationIDIn ¶
ConversationIDIn applies the In predicate on the "conversation_id" field.
func ConversationIDNEQ ¶
ConversationIDNEQ applies the NEQ predicate on the "conversation_id" field.
func ConversationIDNotIn ¶
ConversationIDNotIn applies the NotIn predicate on the "conversation_id" field.
func CreatedAt ¶
CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
func CreatedAtEQ ¶
CreatedAtEQ applies the EQ predicate on the "created_at" field.
func CreatedAtGT ¶
CreatedAtGT applies the GT predicate on the "created_at" field.
func CreatedAtGTE ¶
CreatedAtGTE applies the GTE predicate on the "created_at" field.
func CreatedAtIn ¶
CreatedAtIn applies the In predicate on the "created_at" field.
func CreatedAtLT ¶
CreatedAtLT applies the LT predicate on the "created_at" field.
func CreatedAtLTE ¶
CreatedAtLTE applies the LTE predicate on the "created_at" field.
func CreatedAtNEQ ¶
CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
func CreatedAtNotIn ¶
CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
func HasConversation ¶
HasConversation applies the HasEdge predicate on the "conversation" edge.
func HasConversationWith ¶
func HasConversationWith(preds ...predicate.Conversation) predicate.Message
HasConversationWith applies the HasEdge predicate on the "conversation" edge with a given conditions (other predicates).
func HasSenderWith ¶
HasSenderWith applies the HasEdge predicate on the "sender" edge with a given conditions (other predicates).
func IsRead ¶
IsRead applies equality check predicate on the "is_read" field. It's identical to IsReadEQ.
func SenderID ¶
SenderID applies equality check predicate on the "sender_id" field. It's identical to SenderIDEQ.
func SenderIDEQ ¶
SenderIDEQ applies the EQ predicate on the "sender_id" field.
func SenderIDIn ¶
SenderIDIn applies the In predicate on the "sender_id" field.
func SenderIDNEQ ¶
SenderIDNEQ applies the NEQ predicate on the "sender_id" field.
func SenderIDNotIn ¶
SenderIDNotIn applies the NotIn predicate on the "sender_id" field.
func TypeValidator ¶
TypeValidator is a validator for the "type" field enum values. It is called by the builders before save.
func UpdatedAt ¶
UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.
func UpdatedAtEQ ¶
UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
func UpdatedAtGT ¶
UpdatedAtGT applies the GT predicate on the "updated_at" field.
func UpdatedAtGTE ¶
UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
func UpdatedAtIn ¶
UpdatedAtIn applies the In predicate on the "updated_at" field.
func UpdatedAtLT ¶
UpdatedAtLT applies the LT predicate on the "updated_at" field.
func UpdatedAtLTE ¶
UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
func UpdatedAtNEQ ¶
UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
func UpdatedAtNotIn ¶
UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
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 Message queries.
func ByContent ¶
func ByContent(opts ...sql.OrderTermOption) OrderOption
ByContent orders the results by the content field.
func ByConversationField ¶
func ByConversationField(field string, opts ...sql.OrderTermOption) OrderOption
ByConversationField orders the results by conversation field.
func ByConversationID ¶
func ByConversationID(opts ...sql.OrderTermOption) OrderOption
ByConversationID orders the results by the conversation_id 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 ByIsRead ¶
func ByIsRead(opts ...sql.OrderTermOption) OrderOption
ByIsRead orders the results by the is_read field.
func BySenderField ¶
func BySenderField(field string, opts ...sql.OrderTermOption) OrderOption
BySenderField orders the results by sender field.
func BySenderID ¶
func BySenderID(opts ...sql.OrderTermOption) OrderOption
BySenderID orders the results by the sender_id field.
func ByType ¶
func ByType(opts ...sql.OrderTermOption) OrderOption
ByType orders the results by the type field.
func ByUpdatedAt ¶
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
ByUpdatedAt orders the results by the updated_at field.