Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.ChatRoom) predicate.ChatRoom
- func CreatedAt(v time.Time) predicate.ChatRoom
- func CreatedAtEQ(v time.Time) predicate.ChatRoom
- func CreatedAtGT(v time.Time) predicate.ChatRoom
- func CreatedAtGTE(v time.Time) predicate.ChatRoom
- func CreatedAtIn(vs ...time.Time) predicate.ChatRoom
- func CreatedAtLT(v time.Time) predicate.ChatRoom
- func CreatedAtLTE(v time.Time) predicate.ChatRoom
- func CreatedAtNEQ(v time.Time) predicate.ChatRoom
- func CreatedAtNotIn(vs ...time.Time) predicate.ChatRoom
- func HasBans() predicate.ChatRoom
- func HasBansWith(preds ...predicate.ChatBan) predicate.ChatRoom
- func HasMessages() predicate.ChatRoom
- func HasMessagesWith(preds ...predicate.ChatMessage) predicate.ChatRoom
- func HasOwner() predicate.ChatRoom
- func HasOwnerWith(preds ...predicate.User) predicate.ChatRoom
- func ID(id int) predicate.ChatRoom
- func IDEQ(id int) predicate.ChatRoom
- func IDGT(id int) predicate.ChatRoom
- func IDGTE(id int) predicate.ChatRoom
- func IDIn(ids ...int) predicate.ChatRoom
- func IDLT(id int) predicate.ChatRoom
- func IDLTE(id int) predicate.ChatRoom
- func IDNEQ(id int) predicate.ChatRoom
- func IDNotIn(ids ...int) predicate.ChatRoom
- func IsPublic(v bool) predicate.ChatRoom
- func IsPublicEQ(v bool) predicate.ChatRoom
- func IsPublicNEQ(v bool) predicate.ChatRoom
- func Name(v string) predicate.ChatRoom
- func NameContains(v string) predicate.ChatRoom
- func NameContainsFold(v string) predicate.ChatRoom
- func NameEQ(v string) predicate.ChatRoom
- func NameEqualFold(v string) predicate.ChatRoom
- func NameGT(v string) predicate.ChatRoom
- func NameGTE(v string) predicate.ChatRoom
- func NameHasPrefix(v string) predicate.ChatRoom
- func NameHasSuffix(v string) predicate.ChatRoom
- func NameIn(vs ...string) predicate.ChatRoom
- func NameLT(v string) predicate.ChatRoom
- func NameLTE(v string) predicate.ChatRoom
- func NameNEQ(v string) predicate.ChatRoom
- func NameNotIn(vs ...string) predicate.ChatRoom
- func Not(p predicate.ChatRoom) predicate.ChatRoom
- func Or(predicates ...predicate.ChatRoom) predicate.ChatRoom
- func PasswordHash(v string) predicate.ChatRoom
- func PasswordHashContains(v string) predicate.ChatRoom
- func PasswordHashContainsFold(v string) predicate.ChatRoom
- func PasswordHashEQ(v string) predicate.ChatRoom
- func PasswordHashEqualFold(v string) predicate.ChatRoom
- func PasswordHashGT(v string) predicate.ChatRoom
- func PasswordHashGTE(v string) predicate.ChatRoom
- func PasswordHashHasPrefix(v string) predicate.ChatRoom
- func PasswordHashHasSuffix(v string) predicate.ChatRoom
- func PasswordHashIn(vs ...string) predicate.ChatRoom
- func PasswordHashIsNil() predicate.ChatRoom
- func PasswordHashLT(v string) predicate.ChatRoom
- func PasswordHashLTE(v string) predicate.ChatRoom
- func PasswordHashNEQ(v string) predicate.ChatRoom
- func PasswordHashNotIn(vs ...string) predicate.ChatRoom
- func PasswordHashNotNil() predicate.ChatRoom
- func ValidColumn(column string) bool
- type OrderOption
- func ByBans(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByBansCount(opts ...sql.OrderTermOption) OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByIsPublic(opts ...sql.OrderTermOption) OrderOption
- func ByMessages(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByMessagesCount(opts ...sql.OrderTermOption) OrderOption
- func ByName(opts ...sql.OrderTermOption) OrderOption
- func ByOwnerField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByPasswordHash(opts ...sql.OrderTermOption) OrderOption
Constants ¶
const ( // Label holds the string label denoting the chatroom type in the database. Label = "chat_room" // FieldID holds the string denoting the id field in the database. FieldID = "id" // FieldName holds the string denoting the name field in the database. FieldName = "name" // FieldIsPublic holds the string denoting the is_public field in the database. FieldIsPublic = "is_public" // FieldPasswordHash holds the string denoting the password_hash field in the database. FieldPasswordHash = "password_hash" // FieldCreatedAt holds the string denoting the created_at field in the database. FieldCreatedAt = "created_at" // EdgeOwner holds the string denoting the owner edge name in mutations. EdgeOwner = "owner" // EdgeMessages holds the string denoting the messages edge name in mutations. EdgeMessages = "messages" // EdgeBans holds the string denoting the bans edge name in mutations. EdgeBans = "bans" // Table holds the table name of the chatroom in the database. Table = "chat_rooms" // OwnerTable is the table that holds the owner relation/edge. OwnerTable = "chat_rooms" // OwnerInverseTable is the table name for the User entity. // It exists in this package in order to avoid circular dependency with the "user" package. OwnerInverseTable = "users" // OwnerColumn is the table column denoting the owner relation/edge. OwnerColumn = "user_owned_chat_rooms" // MessagesTable is the table that holds the messages relation/edge. MessagesTable = "chat_messages" // MessagesInverseTable is the table name for the ChatMessage entity. // It exists in this package in order to avoid circular dependency with the "chatmessage" package. MessagesInverseTable = "chat_messages" // MessagesColumn is the table column denoting the messages relation/edge. MessagesColumn = "chat_room_messages" // BansTable is the table that holds the bans relation/edge. BansTable = "chat_bans" // BansInverseTable is the table name for the ChatBan entity. // It exists in this package in order to avoid circular dependency with the "chatban" package. BansInverseTable = "chat_bans" // BansColumn is the table column denoting the bans relation/edge. BansColumn = "chat_room_bans" )
Variables ¶
var ( // NameValidator is a validator for the "name" field. It is called by the builders before save. NameValidator func(string) error // DefaultIsPublic holds the default value on creation for the "is_public" field. DefaultIsPublic bool // DefaultCreatedAt holds the default value on creation for the "created_at" field. DefaultCreatedAt func() time.Time )
var Columns = []string{ FieldID, FieldName, FieldIsPublic, FieldPasswordHash, FieldCreatedAt, }
Columns holds all SQL columns for chatroom fields.
var ForeignKeys = []string{
"user_owned_chat_rooms",
}
ForeignKeys holds the SQL foreign-keys that are owned by the "chat_rooms" table and are not defined as standalone fields in the schema.
Functions ¶
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 HasBansWith ¶
HasBansWith applies the HasEdge predicate on the "bans" edge with a given conditions (other predicates).
func HasMessages ¶
HasMessages applies the HasEdge predicate on the "messages" edge.
func HasMessagesWith ¶
func HasMessagesWith(preds ...predicate.ChatMessage) predicate.ChatRoom
HasMessagesWith applies the HasEdge predicate on the "messages" edge with a given conditions (other predicates).
func HasOwnerWith ¶
HasOwnerWith applies the HasEdge predicate on the "owner" edge with a given conditions (other predicates).
func IsPublic ¶
IsPublic applies equality check predicate on the "is_public" field. It's identical to IsPublicEQ.
func IsPublicEQ ¶
IsPublicEQ applies the EQ predicate on the "is_public" field.
func IsPublicNEQ ¶
IsPublicNEQ applies the NEQ predicate on the "is_public" field.
func NameContains ¶
NameContains applies the Contains predicate on the "name" field.
func NameContainsFold ¶
NameContainsFold applies the ContainsFold predicate on the "name" field.
func NameEqualFold ¶
NameEqualFold applies the EqualFold predicate on the "name" field.
func NameHasPrefix ¶
NameHasPrefix applies the HasPrefix predicate on the "name" field.
func NameHasSuffix ¶
NameHasSuffix applies the HasSuffix predicate on the "name" field.
func PasswordHash ¶
PasswordHash applies equality check predicate on the "password_hash" field. It's identical to PasswordHashEQ.
func PasswordHashContains ¶
PasswordHashContains applies the Contains predicate on the "password_hash" field.
func PasswordHashContainsFold ¶
PasswordHashContainsFold applies the ContainsFold predicate on the "password_hash" field.
func PasswordHashEQ ¶
PasswordHashEQ applies the EQ predicate on the "password_hash" field.
func PasswordHashEqualFold ¶
PasswordHashEqualFold applies the EqualFold predicate on the "password_hash" field.
func PasswordHashGT ¶
PasswordHashGT applies the GT predicate on the "password_hash" field.
func PasswordHashGTE ¶
PasswordHashGTE applies the GTE predicate on the "password_hash" field.
func PasswordHashHasPrefix ¶
PasswordHashHasPrefix applies the HasPrefix predicate on the "password_hash" field.
func PasswordHashHasSuffix ¶
PasswordHashHasSuffix applies the HasSuffix predicate on the "password_hash" field.
func PasswordHashIn ¶
PasswordHashIn applies the In predicate on the "password_hash" field.
func PasswordHashIsNil ¶
PasswordHashIsNil applies the IsNil predicate on the "password_hash" field.
func PasswordHashLT ¶
PasswordHashLT applies the LT predicate on the "password_hash" field.
func PasswordHashLTE ¶
PasswordHashLTE applies the LTE predicate on the "password_hash" field.
func PasswordHashNEQ ¶
PasswordHashNEQ applies the NEQ predicate on the "password_hash" field.
func PasswordHashNotIn ¶
PasswordHashNotIn applies the NotIn predicate on the "password_hash" field.
func PasswordHashNotNil ¶
PasswordHashNotNil applies the NotNil predicate on the "password_hash" 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 ChatRoom queries.
func ByBans ¶
func ByBans(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByBans orders the results by bans terms.
func ByBansCount ¶
func ByBansCount(opts ...sql.OrderTermOption) OrderOption
ByBansCount orders the results by bans count.
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 ByIsPublic ¶
func ByIsPublic(opts ...sql.OrderTermOption) OrderOption
ByIsPublic orders the results by the is_public field.
func ByMessages ¶
func ByMessages(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByMessages orders the results by messages terms.
func ByMessagesCount ¶
func ByMessagesCount(opts ...sql.OrderTermOption) OrderOption
ByMessagesCount orders the results by messages count.
func ByName ¶
func ByName(opts ...sql.OrderTermOption) OrderOption
ByName orders the results by the name field.
func ByOwnerField ¶
func ByOwnerField(field string, opts ...sql.OrderTermOption) OrderOption
ByOwnerField orders the results by owner field.
func ByPasswordHash ¶
func ByPasswordHash(opts ...sql.OrderTermOption) OrderOption
ByPasswordHash orders the results by the password_hash field.