Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Message) predicate.Message
- func Body(v string) predicate.Message
- func BodyContains(v string) predicate.Message
- func BodyContainsFold(v string) predicate.Message
- func BodyEQ(v string) predicate.Message
- func BodyEqualFold(v string) predicate.Message
- func BodyGT(v string) predicate.Message
- func BodyGTE(v string) predicate.Message
- func BodyHasPrefix(v string) predicate.Message
- func BodyHasSuffix(v string) predicate.Message
- func BodyIn(vs ...string) predicate.Message
- func BodyLT(v string) predicate.Message
- func BodyLTE(v string) predicate.Message
- func BodyNEQ(v string) predicate.Message
- func BodyNotIn(vs ...string) 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 HasFrom() predicate.Message
- func HasFromWith(preds ...predicate.Message) predicate.Message
- func HasTo() predicate.Message
- func HasToWith(preds ...predicate.Message) 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 Not(p predicate.Message) predicate.Message
- func Or(predicates ...predicate.Message) predicate.Message
- 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 ByBody(opts ...sql.OrderTermOption) OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByFrom(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByFromCount(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByTo(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByToCount(opts ...sql.OrderTermOption) OrderOption
- func ByUpdatedAt(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" // 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" // FieldBody holds the string denoting the body field in the database. FieldBody = "body" // EdgeFrom holds the string denoting the from edge name in mutations. EdgeFrom = "from" // EdgeTo holds the string denoting the to edge name in mutations. EdgeTo = "to" // Table holds the table name of the message in the database. Table = "messages" // FromTable is the table that holds the from relation/edge. The primary key declared below. FromTable = "message_to" // ToTable is the table that holds the to relation/edge. The primary key declared below. ToTable = "message_to" )
Variables ¶
var ( // FromPrimaryKey and FromColumn2 are the table columns denoting the // primary key for the from relation (M2M). FromPrimaryKey = []string{"message_id", "from_id"} // ToPrimaryKey and ToColumn2 are the table columns denoting the // primary key for the to relation (M2M). ToPrimaryKey = []string{"message_id", "from_id"} )
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 // BodyValidator is a validator for the "body" field. It is called by the builders before save. BodyValidator func(string) error // DefaultID holds the default value on creation for the "id" field. DefaultID func() uuid.UUID )
var Columns = []string{ FieldID, FieldCreatedAt, FieldUpdatedAt, FieldBody, }
Columns holds all SQL columns for message fields.
Functions ¶
func BodyContains ¶
BodyContains applies the Contains predicate on the "body" field.
func BodyContainsFold ¶
BodyContainsFold applies the ContainsFold predicate on the "body" field.
func BodyEqualFold ¶
BodyEqualFold applies the EqualFold predicate on the "body" field.
func BodyHasPrefix ¶
BodyHasPrefix applies the HasPrefix predicate on the "body" field.
func BodyHasSuffix ¶
BodyHasSuffix applies the HasSuffix predicate on the "body" 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 HasFromWith ¶
HasFromWith applies the HasEdge predicate on the "from" edge with a given conditions (other predicates).
func HasToWith ¶
HasToWith applies the HasEdge predicate on the "to" edge with a given conditions (other predicates).
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 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 ByFrom ¶
func ByFrom(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByFrom orders the results by from terms.
func ByFromCount ¶
func ByFromCount(opts ...sql.OrderTermOption) OrderOption
ByFromCount orders the results by from count.
func ByID ¶
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func ByTo ¶
func ByTo(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByTo orders the results by to terms.
func ByToCount ¶
func ByToCount(opts ...sql.OrderTermOption) OrderOption
ByToCount orders the results by to count.
func ByUpdatedAt ¶
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
ByUpdatedAt orders the results by the updated_at field.