Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Message) predicate.Message
- func Author(v string) predicate.Message
- func AuthorContains(v string) predicate.Message
- func AuthorContainsFold(v string) predicate.Message
- func AuthorEQ(v string) predicate.Message
- func AuthorEqualFold(v string) predicate.Message
- func AuthorGT(v string) predicate.Message
- func AuthorGTE(v string) predicate.Message
- func AuthorHasPrefix(v string) predicate.Message
- func AuthorHasSuffix(v string) predicate.Message
- func AuthorIn(vs ...string) predicate.Message
- func AuthorIsNil() predicate.Message
- func AuthorLT(v string) predicate.Message
- func AuthorLTE(v string) predicate.Message
- func AuthorNEQ(v string) predicate.Message
- func AuthorNotIn(vs ...string) predicate.Message
- func AuthorNotNil() 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 HasSession() predicate.Message
- func HasSessionWith(preds ...predicate.Session) predicate.Message
- func ID(id int) predicate.Message
- func IDEQ(id int) predicate.Message
- func IDGT(id int) predicate.Message
- func IDGTE(id int) predicate.Message
- func IDIn(ids ...int) predicate.Message
- func IDLT(id int) predicate.Message
- func IDLTE(id int) predicate.Message
- func IDNEQ(id int) predicate.Message
- func IDNotIn(ids ...int) predicate.Message
- func Not(p predicate.Message) predicate.Message
- func Or(predicates ...predicate.Message) predicate.Message
- func Role(v string) predicate.Message
- func RoleContains(v string) predicate.Message
- func RoleContainsFold(v string) predicate.Message
- func RoleEQ(v string) predicate.Message
- func RoleEqualFold(v string) predicate.Message
- func RoleGT(v string) predicate.Message
- func RoleGTE(v string) predicate.Message
- func RoleHasPrefix(v string) predicate.Message
- func RoleHasSuffix(v string) predicate.Message
- func RoleIn(vs ...string) predicate.Message
- func RoleLT(v string) predicate.Message
- func RoleLTE(v string) predicate.Message
- func RoleNEQ(v string) predicate.Message
- func RoleNotIn(vs ...string) predicate.Message
- func Timestamp(v time.Time) predicate.Message
- func TimestampEQ(v time.Time) predicate.Message
- func TimestampGT(v time.Time) predicate.Message
- func TimestampGTE(v time.Time) predicate.Message
- func TimestampIn(vs ...time.Time) predicate.Message
- func TimestampLT(v time.Time) predicate.Message
- func TimestampLTE(v time.Time) predicate.Message
- func TimestampNEQ(v time.Time) predicate.Message
- func TimestampNotIn(vs ...time.Time) predicate.Message
- func ToolCallsIsNil() predicate.Message
- func ToolCallsNotNil() predicate.Message
- func ValidColumn(column string) bool
- type OrderOption
- func ByAuthor(opts ...sql.OrderTermOption) OrderOption
- func ByContent(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByRole(opts ...sql.OrderTermOption) OrderOption
- func BySessionField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByTimestamp(opts ...sql.OrderTermOption) OrderOption
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" // 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 ¶
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 )
var Columns = []string{ FieldID, FieldRole, FieldContent, FieldTimestamp, FieldToolCalls, FieldAuthor, }
Columns holds all SQL columns for message fields.
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 Author ¶
Author applies equality check predicate on the "author" field. It's identical to AuthorEQ.
func AuthorContains ¶
AuthorContains applies the Contains predicate on the "author" field.
func AuthorContainsFold ¶
AuthorContainsFold applies the ContainsFold predicate on the "author" field.
func AuthorEqualFold ¶
AuthorEqualFold applies the EqualFold predicate on the "author" field.
func AuthorHasPrefix ¶
AuthorHasPrefix applies the HasPrefix predicate on the "author" field.
func AuthorHasSuffix ¶
AuthorHasSuffix applies the HasSuffix predicate on the "author" field.
func AuthorIsNil ¶
AuthorIsNil applies the IsNil predicate on the "author" field.
func AuthorNotIn ¶
AuthorNotIn applies the NotIn predicate on the "author" field.
func AuthorNotNil ¶
AuthorNotNil applies the NotNil predicate on the "author" field.
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 HasSession ¶
HasSession applies the HasEdge predicate on the "session" edge.
func HasSessionWith ¶
HasSessionWith applies the HasEdge predicate on the "session" edge with a given conditions (other predicates).
func RoleContains ¶
RoleContains applies the Contains predicate on the "role" field.
func RoleContainsFold ¶
RoleContainsFold applies the ContainsFold predicate on the "role" field.
func RoleEqualFold ¶
RoleEqualFold applies the EqualFold predicate on the "role" field.
func RoleHasPrefix ¶
RoleHasPrefix applies the HasPrefix predicate on the "role" field.
func RoleHasSuffix ¶
RoleHasSuffix applies the HasSuffix predicate on the "role" field.
func Timestamp ¶
Timestamp applies equality check predicate on the "timestamp" field. It's identical to TimestampEQ.
func TimestampEQ ¶
TimestampEQ applies the EQ predicate on the "timestamp" field.
func TimestampGT ¶
TimestampGT applies the GT predicate on the "timestamp" field.
func TimestampGTE ¶
TimestampGTE applies the GTE predicate on the "timestamp" field.
func TimestampIn ¶
TimestampIn applies the In predicate on the "timestamp" field.
func TimestampLT ¶
TimestampLT applies the LT predicate on the "timestamp" field.
func TimestampLTE ¶
TimestampLTE applies the LTE predicate on the "timestamp" field.
func TimestampNEQ ¶
TimestampNEQ applies the NEQ predicate on the "timestamp" field.
func TimestampNotIn ¶
TimestampNotIn applies the NotIn predicate on the "timestamp" field.
func ToolCallsIsNil ¶
ToolCallsIsNil applies the IsNil predicate on the "tool_calls" field.
func ToolCallsNotNil ¶
ToolCallsNotNil applies the NotNil predicate on the "tool_calls" 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 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.