chatmessage

package
v0.0.0-...-9d82fa0 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the chatmessage type in the database.
	Label = "chat_message"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldBody holds the string denoting the body field in the database.
	FieldBody = "body"
	// FieldSenderName holds the string denoting the sender_name field in the database.
	FieldSenderName = "sender_name"
	// FieldCreatedAt holds the string denoting the created_at field in the database.
	FieldCreatedAt = "created_at"
	// EdgeRoom holds the string denoting the room edge name in mutations.
	EdgeRoom = "room"
	// EdgeSender holds the string denoting the sender edge name in mutations.
	EdgeSender = "sender"
	// Table holds the table name of the chatmessage in the database.
	Table = "chat_messages"
	// RoomTable is the table that holds the room relation/edge.
	RoomTable = "chat_messages"
	// RoomInverseTable is the table name for the ChatRoom entity.
	// It exists in this package in order to avoid circular dependency with the "chatroom" package.
	RoomInverseTable = "chat_rooms"
	// RoomColumn is the table column denoting the room relation/edge.
	RoomColumn = "chat_room_messages"
	// SenderTable is the table that holds the sender relation/edge.
	SenderTable = "chat_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 = "user_chat_messages"
)

Variables

View Source
var (
	// BodyValidator is a validator for the "body" field. It is called by the builders before save.
	BodyValidator func(string) error
	// SenderNameValidator is a validator for the "sender_name" field. It is called by the builders before save.
	SenderNameValidator func(string) error
	// DefaultCreatedAt holds the default value on creation for the "created_at" field.
	DefaultCreatedAt func() time.Time
)

Columns holds all SQL columns for chatmessage fields.

View Source
var ForeignKeys = []string{
	"chat_room_messages",
	"user_chat_messages",
}

ForeignKeys holds the SQL foreign-keys that are owned by the "chat_messages" table and are not defined as standalone fields in the schema.

Functions

func And

func And(predicates ...predicate.ChatMessage) predicate.ChatMessage

And groups predicates with the AND operator between them.

func Body

Body applies equality check predicate on the "body" field. It's identical to BodyEQ.

func BodyContains

func BodyContains(v string) predicate.ChatMessage

BodyContains applies the Contains predicate on the "body" field.

func BodyContainsFold

func BodyContainsFold(v string) predicate.ChatMessage

BodyContainsFold applies the ContainsFold predicate on the "body" field.

func BodyEQ

func BodyEQ(v string) predicate.ChatMessage

BodyEQ applies the EQ predicate on the "body" field.

func BodyEqualFold

func BodyEqualFold(v string) predicate.ChatMessage

BodyEqualFold applies the EqualFold predicate on the "body" field.

func BodyGT

func BodyGT(v string) predicate.ChatMessage

BodyGT applies the GT predicate on the "body" field.

func BodyGTE

func BodyGTE(v string) predicate.ChatMessage

BodyGTE applies the GTE predicate on the "body" field.

func BodyHasPrefix

func BodyHasPrefix(v string) predicate.ChatMessage

BodyHasPrefix applies the HasPrefix predicate on the "body" field.

func BodyHasSuffix

func BodyHasSuffix(v string) predicate.ChatMessage

BodyHasSuffix applies the HasSuffix predicate on the "body" field.

func BodyIn

func BodyIn(vs ...string) predicate.ChatMessage

BodyIn applies the In predicate on the "body" field.

func BodyLT

func BodyLT(v string) predicate.ChatMessage

BodyLT applies the LT predicate on the "body" field.

func BodyLTE

func BodyLTE(v string) predicate.ChatMessage

BodyLTE applies the LTE predicate on the "body" field.

func BodyNEQ

func BodyNEQ(v string) predicate.ChatMessage

BodyNEQ applies the NEQ predicate on the "body" field.

func BodyNotIn

func BodyNotIn(vs ...string) predicate.ChatMessage

BodyNotIn applies the NotIn predicate on the "body" field.

func CreatedAt

func CreatedAt(v time.Time) predicate.ChatMessage

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

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.ChatMessage

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

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.ChatMessage

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

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.ChatMessage

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

func CreatedAtIn

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

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

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.ChatMessage

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

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.ChatMessage

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

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.ChatMessage

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

func CreatedAtNotIn

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

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

func HasRoom

func HasRoom() predicate.ChatMessage

HasRoom applies the HasEdge predicate on the "room" edge.

func HasRoomWith

func HasRoomWith(preds ...predicate.ChatRoom) predicate.ChatMessage

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

func HasSender

func HasSender() predicate.ChatMessage

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

func HasSenderWith

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

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

func ID

func ID(id int) predicate.ChatMessage

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.ChatMessage

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.ChatMessage

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.ChatMessage

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...int) predicate.ChatMessage

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.ChatMessage

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.ChatMessage

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.ChatMessage

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...int) predicate.ChatMessage

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.ChatMessage) predicate.ChatMessage

Or groups predicates with the OR operator between them.

func SenderName

func SenderName(v string) predicate.ChatMessage

SenderName applies equality check predicate on the "sender_name" field. It's identical to SenderNameEQ.

func SenderNameContains

func SenderNameContains(v string) predicate.ChatMessage

SenderNameContains applies the Contains predicate on the "sender_name" field.

func SenderNameContainsFold

func SenderNameContainsFold(v string) predicate.ChatMessage

SenderNameContainsFold applies the ContainsFold predicate on the "sender_name" field.

func SenderNameEQ

func SenderNameEQ(v string) predicate.ChatMessage

SenderNameEQ applies the EQ predicate on the "sender_name" field.

func SenderNameEqualFold

func SenderNameEqualFold(v string) predicate.ChatMessage

SenderNameEqualFold applies the EqualFold predicate on the "sender_name" field.

func SenderNameGT

func SenderNameGT(v string) predicate.ChatMessage

SenderNameGT applies the GT predicate on the "sender_name" field.

func SenderNameGTE

func SenderNameGTE(v string) predicate.ChatMessage

SenderNameGTE applies the GTE predicate on the "sender_name" field.

func SenderNameHasPrefix

func SenderNameHasPrefix(v string) predicate.ChatMessage

SenderNameHasPrefix applies the HasPrefix predicate on the "sender_name" field.

func SenderNameHasSuffix

func SenderNameHasSuffix(v string) predicate.ChatMessage

SenderNameHasSuffix applies the HasSuffix predicate on the "sender_name" field.

func SenderNameIn

func SenderNameIn(vs ...string) predicate.ChatMessage

SenderNameIn applies the In predicate on the "sender_name" field.

func SenderNameLT

func SenderNameLT(v string) predicate.ChatMessage

SenderNameLT applies the LT predicate on the "sender_name" field.

func SenderNameLTE

func SenderNameLTE(v string) predicate.ChatMessage

SenderNameLTE applies the LTE predicate on the "sender_name" field.

func SenderNameNEQ

func SenderNameNEQ(v string) predicate.ChatMessage

SenderNameNEQ applies the NEQ predicate on the "sender_name" field.

func SenderNameNotIn

func SenderNameNotIn(vs ...string) predicate.ChatMessage

SenderNameNotIn applies the NotIn predicate on the "sender_name" 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 ChatMessage queries.

func ByBody

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

ByBody orders the results by the body 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 ByRoomField

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

ByRoomField orders the results by room field.

func BySenderField

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

BySenderField orders the results by sender field.

func BySenderName

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

BySenderName orders the results by the sender_name field.

Jump to

Keyboard shortcuts

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