message

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2026 License: MIT Imports: 4 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"
	// FieldRole holds the string denoting the role field in the database.
	FieldRole = "role"
	// FieldContent holds the string denoting the content field in the database.
	FieldContent = "content"
	// FieldTimestamp holds the string denoting the timestamp field in the database.
	FieldTimestamp = "timestamp"
	// FieldToolCalls holds the string denoting the tool_calls field in the database.
	FieldToolCalls = "tool_calls"
	// FieldAuthor holds the string denoting the author field in the database.
	FieldAuthor = "author"
	// EdgeSession holds the string denoting the session edge name in mutations.
	EdgeSession = "session"
	// Table holds the table name of the message in the database.
	Table = "messages"
	// SessionTable is the table that holds the session relation/edge.
	SessionTable = "messages"
	// SessionInverseTable is the table name for the Session entity.
	// It exists in this package in order to avoid circular dependency with the "session" package.
	SessionInverseTable = "sessions"
	// SessionColumn is the table column denoting the session relation/edge.
	SessionColumn = "session_messages"
)

Variables

View Source
var (
	// RoleValidator is a validator for the "role" field. It is called by the builders before save.
	RoleValidator func(string) error
	// DefaultTimestamp holds the default value on creation for the "timestamp" field.
	DefaultTimestamp func() time.Time
	// DefaultAuthor holds the default value on creation for the "author" field.
	DefaultAuthor string
)

Columns holds all SQL columns for message fields.

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

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

Functions

func And

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

And groups predicates with the AND operator between them.

func Author

func Author(v string) predicate.Message

Author applies equality check predicate on the "author" field. It's identical to AuthorEQ.

func AuthorContains

func AuthorContains(v string) predicate.Message

AuthorContains applies the Contains predicate on the "author" field.

func AuthorContainsFold

func AuthorContainsFold(v string) predicate.Message

AuthorContainsFold applies the ContainsFold predicate on the "author" field.

func AuthorEQ

func AuthorEQ(v string) predicate.Message

AuthorEQ applies the EQ predicate on the "author" field.

func AuthorEqualFold

func AuthorEqualFold(v string) predicate.Message

AuthorEqualFold applies the EqualFold predicate on the "author" field.

func AuthorGT

func AuthorGT(v string) predicate.Message

AuthorGT applies the GT predicate on the "author" field.

func AuthorGTE

func AuthorGTE(v string) predicate.Message

AuthorGTE applies the GTE predicate on the "author" field.

func AuthorHasPrefix

func AuthorHasPrefix(v string) predicate.Message

AuthorHasPrefix applies the HasPrefix predicate on the "author" field.

func AuthorHasSuffix

func AuthorHasSuffix(v string) predicate.Message

AuthorHasSuffix applies the HasSuffix predicate on the "author" field.

func AuthorIn

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

AuthorIn applies the In predicate on the "author" field.

func AuthorIsNil

func AuthorIsNil() predicate.Message

AuthorIsNil applies the IsNil predicate on the "author" field.

func AuthorLT

func AuthorLT(v string) predicate.Message

AuthorLT applies the LT predicate on the "author" field.

func AuthorLTE

func AuthorLTE(v string) predicate.Message

AuthorLTE applies the LTE predicate on the "author" field.

func AuthorNEQ

func AuthorNEQ(v string) predicate.Message

AuthorNEQ applies the NEQ predicate on the "author" field.

func AuthorNotIn

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

AuthorNotIn applies the NotIn predicate on the "author" field.

func AuthorNotNil

func AuthorNotNil() predicate.Message

AuthorNotNil applies the NotNil predicate on the "author" field.

func Content

func Content(v string) predicate.Message

Content applies equality check predicate on the "content" field. It's identical to ContentEQ.

func ContentContains

func ContentContains(v string) predicate.Message

ContentContains applies the Contains predicate on the "content" field.

func ContentContainsFold

func ContentContainsFold(v string) predicate.Message

ContentContainsFold applies the ContainsFold predicate on the "content" field.

func ContentEQ

func ContentEQ(v string) predicate.Message

ContentEQ applies the EQ predicate on the "content" field.

func ContentEqualFold

func ContentEqualFold(v string) predicate.Message

ContentEqualFold applies the EqualFold predicate on the "content" field.

func ContentGT

func ContentGT(v string) predicate.Message

ContentGT applies the GT predicate on the "content" field.

func ContentGTE

func ContentGTE(v string) predicate.Message

ContentGTE applies the GTE predicate on the "content" field.

func ContentHasPrefix

func ContentHasPrefix(v string) predicate.Message

ContentHasPrefix applies the HasPrefix predicate on the "content" field.

func ContentHasSuffix

func ContentHasSuffix(v string) predicate.Message

ContentHasSuffix applies the HasSuffix predicate on the "content" field.

func ContentIn

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

ContentIn applies the In predicate on the "content" field.

func ContentLT

func ContentLT(v string) predicate.Message

ContentLT applies the LT predicate on the "content" field.

func ContentLTE

func ContentLTE(v string) predicate.Message

ContentLTE applies the LTE predicate on the "content" field.

func ContentNEQ

func ContentNEQ(v string) predicate.Message

ContentNEQ applies the NEQ predicate on the "content" field.

func ContentNotIn

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

ContentNotIn applies the NotIn predicate on the "content" field.

func HasSession

func HasSession() predicate.Message

HasSession applies the HasEdge predicate on the "session" edge.

func HasSessionWith

func HasSessionWith(preds ...predicate.Session) predicate.Message

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

func ID

func ID(id int) predicate.Message

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Message

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Message

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Message

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Message

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Message

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Message

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...int) 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 Role

func Role(v string) predicate.Message

Role applies equality check predicate on the "role" field. It's identical to RoleEQ.

func RoleContains

func RoleContains(v string) predicate.Message

RoleContains applies the Contains predicate on the "role" field.

func RoleContainsFold

func RoleContainsFold(v string) predicate.Message

RoleContainsFold applies the ContainsFold predicate on the "role" field.

func RoleEQ

func RoleEQ(v string) predicate.Message

RoleEQ applies the EQ predicate on the "role" field.

func RoleEqualFold

func RoleEqualFold(v string) predicate.Message

RoleEqualFold applies the EqualFold predicate on the "role" field.

func RoleGT

func RoleGT(v string) predicate.Message

RoleGT applies the GT predicate on the "role" field.

func RoleGTE

func RoleGTE(v string) predicate.Message

RoleGTE applies the GTE predicate on the "role" field.

func RoleHasPrefix

func RoleHasPrefix(v string) predicate.Message

RoleHasPrefix applies the HasPrefix predicate on the "role" field.

func RoleHasSuffix

func RoleHasSuffix(v string) predicate.Message

RoleHasSuffix applies the HasSuffix predicate on the "role" field.

func RoleIn

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

RoleIn applies the In predicate on the "role" field.

func RoleLT

func RoleLT(v string) predicate.Message

RoleLT applies the LT predicate on the "role" field.

func RoleLTE

func RoleLTE(v string) predicate.Message

RoleLTE applies the LTE predicate on the "role" field.

func RoleNEQ

func RoleNEQ(v string) predicate.Message

RoleNEQ applies the NEQ predicate on the "role" field.

func RoleNotIn

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

RoleNotIn applies the NotIn predicate on the "role" field.

func Timestamp

func Timestamp(v time.Time) predicate.Message

Timestamp applies equality check predicate on the "timestamp" field. It's identical to TimestampEQ.

func TimestampEQ

func TimestampEQ(v time.Time) predicate.Message

TimestampEQ applies the EQ predicate on the "timestamp" field.

func TimestampGT

func TimestampGT(v time.Time) predicate.Message

TimestampGT applies the GT predicate on the "timestamp" field.

func TimestampGTE

func TimestampGTE(v time.Time) predicate.Message

TimestampGTE applies the GTE predicate on the "timestamp" field.

func TimestampIn

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

TimestampIn applies the In predicate on the "timestamp" field.

func TimestampLT

func TimestampLT(v time.Time) predicate.Message

TimestampLT applies the LT predicate on the "timestamp" field.

func TimestampLTE

func TimestampLTE(v time.Time) predicate.Message

TimestampLTE applies the LTE predicate on the "timestamp" field.

func TimestampNEQ

func TimestampNEQ(v time.Time) predicate.Message

TimestampNEQ applies the NEQ predicate on the "timestamp" field.

func TimestampNotIn

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

TimestampNotIn applies the NotIn predicate on the "timestamp" field.

func ToolCallsIsNil

func ToolCallsIsNil() predicate.Message

ToolCallsIsNil applies the IsNil predicate on the "tool_calls" field.

func ToolCallsNotNil

func ToolCallsNotNil() predicate.Message

ToolCallsNotNil applies the NotNil predicate on the "tool_calls" 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 ByAuthor

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

ByAuthor orders the results by the author field.

func ByContent

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

ByContent orders the results by the content field.

func ByID

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

ByID orders the results by the id field.

func ByRole

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

ByRole orders the results by the role field.

func BySessionField

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

BySessionField orders the results by session field.

func ByTimestamp

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

ByTimestamp orders the results by the timestamp field.

Jump to

Keyboard shortcuts

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