Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.ChatBan) predicate.ChatBan
- func CreatedAt(v time.Time) predicate.ChatBan
- func CreatedAtEQ(v time.Time) predicate.ChatBan
- func CreatedAtGT(v time.Time) predicate.ChatBan
- func CreatedAtGTE(v time.Time) predicate.ChatBan
- func CreatedAtIn(vs ...time.Time) predicate.ChatBan
- func CreatedAtLT(v time.Time) predicate.ChatBan
- func CreatedAtLTE(v time.Time) predicate.ChatBan
- func CreatedAtNEQ(v time.Time) predicate.ChatBan
- func CreatedAtNotIn(vs ...time.Time) predicate.ChatBan
- func HasBannedByUser() predicate.ChatBan
- func HasBannedByUserWith(preds ...predicate.User) predicate.ChatBan
- func HasRoom() predicate.ChatBan
- func HasRoomWith(preds ...predicate.ChatRoom) predicate.ChatBan
- func HasUser() predicate.ChatBan
- func HasUserWith(preds ...predicate.User) predicate.ChatBan
- func ID(id int) predicate.ChatBan
- func IDEQ(id int) predicate.ChatBan
- func IDGT(id int) predicate.ChatBan
- func IDGTE(id int) predicate.ChatBan
- func IDIn(ids ...int) predicate.ChatBan
- func IDLT(id int) predicate.ChatBan
- func IDLTE(id int) predicate.ChatBan
- func IDNEQ(id int) predicate.ChatBan
- func IDNotIn(ids ...int) predicate.ChatBan
- func IPHash(v string) predicate.ChatBan
- func IPHashContains(v string) predicate.ChatBan
- func IPHashContainsFold(v string) predicate.ChatBan
- func IPHashEQ(v string) predicate.ChatBan
- func IPHashEqualFold(v string) predicate.ChatBan
- func IPHashGT(v string) predicate.ChatBan
- func IPHashGTE(v string) predicate.ChatBan
- func IPHashHasPrefix(v string) predicate.ChatBan
- func IPHashHasSuffix(v string) predicate.ChatBan
- func IPHashIn(vs ...string) predicate.ChatBan
- func IPHashIsNil() predicate.ChatBan
- func IPHashLT(v string) predicate.ChatBan
- func IPHashLTE(v string) predicate.ChatBan
- func IPHashNEQ(v string) predicate.ChatBan
- func IPHashNotIn(vs ...string) predicate.ChatBan
- func IPHashNotNil() predicate.ChatBan
- func Not(p predicate.ChatBan) predicate.ChatBan
- func Or(predicates ...predicate.ChatBan) predicate.ChatBan
- func Reason(v string) predicate.ChatBan
- func ReasonContains(v string) predicate.ChatBan
- func ReasonContainsFold(v string) predicate.ChatBan
- func ReasonEQ(v string) predicate.ChatBan
- func ReasonEqualFold(v string) predicate.ChatBan
- func ReasonGT(v string) predicate.ChatBan
- func ReasonGTE(v string) predicate.ChatBan
- func ReasonHasPrefix(v string) predicate.ChatBan
- func ReasonHasSuffix(v string) predicate.ChatBan
- func ReasonIn(vs ...string) predicate.ChatBan
- func ReasonIsNil() predicate.ChatBan
- func ReasonLT(v string) predicate.ChatBan
- func ReasonLTE(v string) predicate.ChatBan
- func ReasonNEQ(v string) predicate.ChatBan
- func ReasonNotIn(vs ...string) predicate.ChatBan
- func ReasonNotNil() predicate.ChatBan
- func ValidColumn(column string) bool
- type OrderOption
- func ByBannedByUserField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByIPHash(opts ...sql.OrderTermOption) OrderOption
- func ByReason(opts ...sql.OrderTermOption) OrderOption
- func ByRoomField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByUserField(field string, opts ...sql.OrderTermOption) OrderOption
Constants ¶
const ( // Label holds the string label denoting the chatban type in the database. Label = "chat_ban" // FieldID holds the string denoting the id field in the database. FieldID = "id" // FieldIPHash holds the string denoting the ip_hash field in the database. FieldIPHash = "ip_hash" // FieldReason holds the string denoting the reason field in the database. FieldReason = "reason" // 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" // EdgeUser holds the string denoting the user edge name in mutations. EdgeUser = "user" // EdgeBannedByUser holds the string denoting the banned_by_user edge name in mutations. EdgeBannedByUser = "banned_by_user" // Table holds the table name of the chatban in the database. Table = "chat_bans" // RoomTable is the table that holds the room relation/edge. RoomTable = "chat_bans" // 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_bans" // UserTable is the table that holds the user relation/edge. UserTable = "chat_bans" // UserInverseTable is the table name for the User entity. // It exists in this package in order to avoid circular dependency with the "user" package. UserInverseTable = "users" // UserColumn is the table column denoting the user relation/edge. UserColumn = "user_chat_bans" // BannedByUserTable is the table that holds the banned_by_user relation/edge. BannedByUserTable = "chat_bans" // BannedByUserInverseTable is the table name for the User entity. // It exists in this package in order to avoid circular dependency with the "user" package. BannedByUserInverseTable = "users" // BannedByUserColumn is the table column denoting the banned_by_user relation/edge. BannedByUserColumn = "user_chat_bans_issued" )
Variables ¶
var ( // IPHashValidator is a validator for the "ip_hash" field. It is called by the builders before save. IPHashValidator func(string) error // ReasonValidator is a validator for the "reason" field. It is called by the builders before save. ReasonValidator func(string) error // DefaultCreatedAt holds the default value on creation for the "created_at" field. DefaultCreatedAt func() time.Time )
var Columns = []string{ FieldID, FieldIPHash, FieldReason, FieldCreatedAt, }
Columns holds all SQL columns for chatban fields.
var ForeignKeys = []string{
"chat_room_bans",
"user_chat_bans",
"user_chat_bans_issued",
}
ForeignKeys holds the SQL foreign-keys that are owned by the "chat_bans" 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 HasBannedByUser ¶
HasBannedByUser applies the HasEdge predicate on the "banned_by_user" edge.
func HasBannedByUserWith ¶
HasBannedByUserWith applies the HasEdge predicate on the "banned_by_user" edge with a given conditions (other predicates).
func HasRoomWith ¶
HasRoomWith applies the HasEdge predicate on the "room" edge with a given conditions (other predicates).
func HasUserWith ¶
HasUserWith applies the HasEdge predicate on the "user" edge with a given conditions (other predicates).
func IPHash ¶
IPHash applies equality check predicate on the "ip_hash" field. It's identical to IPHashEQ.
func IPHashContains ¶
IPHashContains applies the Contains predicate on the "ip_hash" field.
func IPHashContainsFold ¶
IPHashContainsFold applies the ContainsFold predicate on the "ip_hash" field.
func IPHashEqualFold ¶
IPHashEqualFold applies the EqualFold predicate on the "ip_hash" field.
func IPHashHasPrefix ¶
IPHashHasPrefix applies the HasPrefix predicate on the "ip_hash" field.
func IPHashHasSuffix ¶
IPHashHasSuffix applies the HasSuffix predicate on the "ip_hash" field.
func IPHashIsNil ¶
IPHashIsNil applies the IsNil predicate on the "ip_hash" field.
func IPHashNotIn ¶
IPHashNotIn applies the NotIn predicate on the "ip_hash" field.
func IPHashNotNil ¶
IPHashNotNil applies the NotNil predicate on the "ip_hash" field.
func Reason ¶
Reason applies equality check predicate on the "reason" field. It's identical to ReasonEQ.
func ReasonContains ¶
ReasonContains applies the Contains predicate on the "reason" field.
func ReasonContainsFold ¶
ReasonContainsFold applies the ContainsFold predicate on the "reason" field.
func ReasonEqualFold ¶
ReasonEqualFold applies the EqualFold predicate on the "reason" field.
func ReasonHasPrefix ¶
ReasonHasPrefix applies the HasPrefix predicate on the "reason" field.
func ReasonHasSuffix ¶
ReasonHasSuffix applies the HasSuffix predicate on the "reason" field.
func ReasonIsNil ¶
ReasonIsNil applies the IsNil predicate on the "reason" field.
func ReasonNotIn ¶
ReasonNotIn applies the NotIn predicate on the "reason" field.
func ReasonNotNil ¶
ReasonNotNil applies the NotNil predicate on the "reason" 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 ChatBan queries.
func ByBannedByUserField ¶
func ByBannedByUserField(field string, opts ...sql.OrderTermOption) OrderOption
ByBannedByUserField orders the results by banned_by_user 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 ByIPHash ¶
func ByIPHash(opts ...sql.OrderTermOption) OrderOption
ByIPHash orders the results by the ip_hash field.
func ByReason ¶
func ByReason(opts ...sql.OrderTermOption) OrderOption
ByReason orders the results by the reason field.
func ByRoomField ¶
func ByRoomField(field string, opts ...sql.OrderTermOption) OrderOption
ByRoomField orders the results by room field.
func ByUserField ¶
func ByUserField(field string, opts ...sql.OrderTermOption) OrderOption
ByUserField orders the results by user field.