message

package
v0.0.0-...-6a61234 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
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"
	// FieldText holds the string denoting the text field in the database.
	FieldText = "text"
	// FieldSenderID holds the string denoting the sender_id field in the database.
	FieldSenderID = "sender_id"
	// FieldChatID holds the string denoting the chat_id field in the database.
	FieldChatID = "chat_id"
	// FieldFileID holds the string denoting the file_id field in the database.
	FieldFileID = "file_id"
	// EdgeSender holds the string denoting the sender edge name in mutations.
	EdgeSender = "sender"
	// EdgeChat holds the string denoting the chat edge name in mutations.
	EdgeChat = "chat"
	// EdgeFile holds the string denoting the file edge name in mutations.
	EdgeFile = "file"
	// Table holds the table name of the message in the database.
	Table = "messages"
	// SenderTable is the table that holds the sender relation/edge.
	SenderTable = "messages"
	// SenderInverseTable is the table name for the User entity.
	// It exists in this package in order to avoid circular dependency with the "user" package.
	SenderInverseTable = "users"
	// SenderColumn is the table column denoting the sender relation/edge.
	SenderColumn = "sender_id"
	// ChatTable is the table that holds the chat relation/edge.
	ChatTable = "messages"
	// ChatInverseTable is the table name for the Chat entity.
	// It exists in this package in order to avoid circular dependency with the "chat" package.
	ChatInverseTable = "chats"
	// ChatColumn is the table column denoting the chat relation/edge.
	ChatColumn = "chat_id"
	// FileTable is the table that holds the file relation/edge.
	FileTable = "messages"
	// FileInverseTable is the table name for the File entity.
	// It exists in this package in order to avoid circular dependency with the "file" package.
	FileInverseTable = "files"
	// FileColumn is the table column denoting the file relation/edge.
	FileColumn = "file_id"
)

Variables

View Source
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
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() uuid.UUID
)

Columns holds all SQL columns for message fields.

Functions

func And

func And(predicates ...predicate.Message) predicate.Message

And groups predicates with the AND operator between them.

func ChatID

func ChatID(v uuid.UUID) predicate.Message

ChatID applies equality check predicate on the "chat_id" field. It's identical to ChatIDEQ.

func ChatIDEQ

func ChatIDEQ(v uuid.UUID) predicate.Message

ChatIDEQ applies the EQ predicate on the "chat_id" field.

func ChatIDIn

func ChatIDIn(vs ...uuid.UUID) predicate.Message

ChatIDIn applies the In predicate on the "chat_id" field.

func ChatIDNEQ

func ChatIDNEQ(v uuid.UUID) predicate.Message

ChatIDNEQ applies the NEQ predicate on the "chat_id" field.

func ChatIDNotIn

func ChatIDNotIn(vs ...uuid.UUID) predicate.Message

ChatIDNotIn applies the NotIn predicate on the "chat_id" field.

func CreatedAt

func CreatedAt(v time.Time) predicate.Message

CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Message

CreatedAtEQ applies the EQ predicate on the "created_at" field.

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Message

CreatedAtGT applies the GT predicate on the "created_at" field.

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Message

CreatedAtGTE applies the GTE predicate on the "created_at" field.

func CreatedAtIn

func CreatedAtIn(vs ...time.Time) predicate.Message

CreatedAtIn applies the In predicate on the "created_at" field.

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Message

CreatedAtLT applies the LT predicate on the "created_at" field.

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Message

CreatedAtLTE applies the LTE predicate on the "created_at" field.

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Message

CreatedAtNEQ applies the NEQ predicate on the "created_at" field.

func CreatedAtNotIn

func CreatedAtNotIn(vs ...time.Time) predicate.Message

CreatedAtNotIn applies the NotIn predicate on the "created_at" field.

func FileID

func FileID(v uuid.UUID) predicate.Message

FileID applies equality check predicate on the "file_id" field. It's identical to FileIDEQ.

func FileIDEQ

func FileIDEQ(v uuid.UUID) predicate.Message

FileIDEQ applies the EQ predicate on the "file_id" field.

func FileIDIn

func FileIDIn(vs ...uuid.UUID) predicate.Message

FileIDIn applies the In predicate on the "file_id" field.

func FileIDIsNil

func FileIDIsNil() predicate.Message

FileIDIsNil applies the IsNil predicate on the "file_id" field.

func FileIDNEQ

func FileIDNEQ(v uuid.UUID) predicate.Message

FileIDNEQ applies the NEQ predicate on the "file_id" field.

func FileIDNotIn

func FileIDNotIn(vs ...uuid.UUID) predicate.Message

FileIDNotIn applies the NotIn predicate on the "file_id" field.

func FileIDNotNil

func FileIDNotNil() predicate.Message

FileIDNotNil applies the NotNil predicate on the "file_id" field.

func HasChat

func HasChat() predicate.Message

HasChat applies the HasEdge predicate on the "chat" edge.

func HasChatWith

func HasChatWith(preds ...predicate.Chat) predicate.Message

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

func HasFile

func HasFile() predicate.Message

HasFile applies the HasEdge predicate on the "file" edge.

func HasFileWith

func HasFileWith(preds ...predicate.File) predicate.Message

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

func HasSender

func HasSender() predicate.Message

HasSender applies the HasEdge predicate on the "sender" edge.

func HasSenderWith

func HasSenderWith(preds ...predicate.User) predicate.Message

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

func ID

func ID(id uuid.UUID) predicate.Message

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id uuid.UUID) predicate.Message

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id uuid.UUID) predicate.Message

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id uuid.UUID) predicate.Message

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id uuid.UUID) predicate.Message

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id uuid.UUID) predicate.Message

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id uuid.UUID) predicate.Message

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

IDNotIn applies the NotIn predicate on the ID field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Message) predicate.Message

Or groups predicates with the OR operator between them.

func SenderID

func SenderID(v uuid.UUID) predicate.Message

SenderID applies equality check predicate on the "sender_id" field. It's identical to SenderIDEQ.

func SenderIDEQ

func SenderIDEQ(v uuid.UUID) predicate.Message

SenderIDEQ applies the EQ predicate on the "sender_id" field.

func SenderIDIn

func SenderIDIn(vs ...uuid.UUID) predicate.Message

SenderIDIn applies the In predicate on the "sender_id" field.

func SenderIDNEQ

func SenderIDNEQ(v uuid.UUID) predicate.Message

SenderIDNEQ applies the NEQ predicate on the "sender_id" field.

func SenderIDNotIn

func SenderIDNotIn(vs ...uuid.UUID) predicate.Message

SenderIDNotIn applies the NotIn predicate on the "sender_id" field.

func Text

func Text(v string) predicate.Message

Text applies equality check predicate on the "text" field. It's identical to TextEQ.

func TextContains

func TextContains(v string) predicate.Message

TextContains applies the Contains predicate on the "text" field.

func TextContainsFold

func TextContainsFold(v string) predicate.Message

TextContainsFold applies the ContainsFold predicate on the "text" field.

func TextEQ

func TextEQ(v string) predicate.Message

TextEQ applies the EQ predicate on the "text" field.

func TextEqualFold

func TextEqualFold(v string) predicate.Message

TextEqualFold applies the EqualFold predicate on the "text" field.

func TextGT

func TextGT(v string) predicate.Message

TextGT applies the GT predicate on the "text" field.

func TextGTE

func TextGTE(v string) predicate.Message

TextGTE applies the GTE predicate on the "text" field.

func TextHasPrefix

func TextHasPrefix(v string) predicate.Message

TextHasPrefix applies the HasPrefix predicate on the "text" field.

func TextHasSuffix

func TextHasSuffix(v string) predicate.Message

TextHasSuffix applies the HasSuffix predicate on the "text" field.

func TextIn

func TextIn(vs ...string) predicate.Message

TextIn applies the In predicate on the "text" field.

func TextIsNil

func TextIsNil() predicate.Message

TextIsNil applies the IsNil predicate on the "text" field.

func TextLT

func TextLT(v string) predicate.Message

TextLT applies the LT predicate on the "text" field.

func TextLTE

func TextLTE(v string) predicate.Message

TextLTE applies the LTE predicate on the "text" field.

func TextNEQ

func TextNEQ(v string) predicate.Message

TextNEQ applies the NEQ predicate on the "text" field.

func TextNotIn

func TextNotIn(vs ...string) predicate.Message

TextNotIn applies the NotIn predicate on the "text" field.

func TextNotNil

func TextNotNil() predicate.Message

TextNotNil applies the NotNil predicate on the "text" field.

func UpdatedAt

func UpdatedAt(v time.Time) predicate.Message

UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.Message

UpdatedAtEQ applies the EQ predicate on the "updated_at" field.

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.Message

UpdatedAtGT applies the GT predicate on the "updated_at" field.

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.Message

UpdatedAtGTE applies the GTE predicate on the "updated_at" field.

func UpdatedAtIn

func UpdatedAtIn(vs ...time.Time) predicate.Message

UpdatedAtIn applies the In predicate on the "updated_at" field.

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.Message

UpdatedAtLT applies the LT predicate on the "updated_at" field.

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.Message

UpdatedAtLTE applies the LTE predicate on the "updated_at" field.

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.Message

UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.

func UpdatedAtNotIn

func UpdatedAtNotIn(vs ...time.Time) predicate.Message

UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.

func ValidColumn

func ValidColumn(column string) bool

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

Types

type OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the Message queries.

func ByChatField

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

ByChatField orders the results by chat field.

func ByChatID

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

ByChatID orders the results by the chat_id field.

func ByCreatedAt

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

ByCreatedAt orders the results by the created_at field.

func ByFileField

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

ByFileField orders the results by file field.

func ByFileID

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

ByFileID orders the results by the file_id field.

func ByID

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

ByID orders the results by the id 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 ByText

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

ByText orders the results by the text field.

func ByUpdatedAt

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

ByUpdatedAt orders the results by the updated_at field.

Jump to

Keyboard shortcuts

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