Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Operator) predicate.Operator
- func Color(v uint32) predicate.Operator
- func ColorEQ(v uint32) predicate.Operator
- func ColorGT(v uint32) predicate.Operator
- func ColorGTE(v uint32) predicate.Operator
- func ColorIn(vs ...uint32) predicate.Operator
- func ColorLT(v uint32) predicate.Operator
- func ColorLTE(v uint32) predicate.Operator
- func ColorNEQ(v uint32) predicate.Operator
- func ColorNotIn(vs ...uint32) predicate.Operator
- func CreatedAt(v time.Time) predicate.Operator
- func CreatedAtEQ(v time.Time) predicate.Operator
- func CreatedAtGT(v time.Time) predicate.Operator
- func CreatedAtGTE(v time.Time) predicate.Operator
- func CreatedAtIn(vs ...time.Time) predicate.Operator
- func CreatedAtLT(v time.Time) predicate.Operator
- func CreatedAtLTE(v time.Time) predicate.Operator
- func CreatedAtNEQ(v time.Time) predicate.Operator
- func CreatedAtNotIn(vs ...time.Time) predicate.Operator
- func DeletedAt(v time.Time) predicate.Operator
- func DeletedAtEQ(v time.Time) predicate.Operator
- func DeletedAtGT(v time.Time) predicate.Operator
- func DeletedAtGTE(v time.Time) predicate.Operator
- func DeletedAtIn(vs ...time.Time) predicate.Operator
- func DeletedAtIsNil() predicate.Operator
- func DeletedAtLT(v time.Time) predicate.Operator
- func DeletedAtLTE(v time.Time) predicate.Operator
- func DeletedAtNEQ(v time.Time) predicate.Operator
- func DeletedAtNotIn(vs ...time.Time) predicate.Operator
- func DeletedAtNotNil() predicate.Operator
- func HasChat() predicate.Operator
- func HasChatWith(preds ...predicate.Chat) predicate.Operator
- func HasGroup() predicate.Operator
- func HasGroupWith(preds ...predicate.Group) predicate.Operator
- func ID(id int) predicate.Operator
- func IDEQ(id int) predicate.Operator
- func IDGT(id int) predicate.Operator
- func IDGTE(id int) predicate.Operator
- func IDIn(ids ...int) predicate.Operator
- func IDLT(id int) predicate.Operator
- func IDLTE(id int) predicate.Operator
- func IDNEQ(id int) predicate.Operator
- func IDNotIn(ids ...int) predicate.Operator
- func Last(v time.Time) predicate.Operator
- func LastEQ(v time.Time) predicate.Operator
- func LastGT(v time.Time) predicate.Operator
- func LastGTE(v time.Time) predicate.Operator
- func LastIn(vs ...time.Time) predicate.Operator
- func LastLT(v time.Time) predicate.Operator
- func LastLTE(v time.Time) predicate.Operator
- func LastNEQ(v time.Time) predicate.Operator
- func LastNotIn(vs ...time.Time) predicate.Operator
- func Not(p predicate.Operator) predicate.Operator
- func Or(predicates ...predicate.Operator) predicate.Operator
- func Token(v string) predicate.Operator
- func TokenContains(v string) predicate.Operator
- func TokenContainsFold(v string) predicate.Operator
- func TokenEQ(v string) predicate.Operator
- func TokenEqualFold(v string) predicate.Operator
- func TokenGT(v string) predicate.Operator
- func TokenGTE(v string) predicate.Operator
- func TokenHasPrefix(v string) predicate.Operator
- func TokenHasSuffix(v string) predicate.Operator
- func TokenIn(vs ...string) predicate.Operator
- func TokenIsNil() predicate.Operator
- func TokenLT(v string) predicate.Operator
- func TokenLTE(v string) predicate.Operator
- func TokenNEQ(v string) predicate.Operator
- func TokenNotIn(vs ...string) predicate.Operator
- func TokenNotNil() predicate.Operator
- func UpdatedAt(v time.Time) predicate.Operator
- func UpdatedAtEQ(v time.Time) predicate.Operator
- func UpdatedAtGT(v time.Time) predicate.Operator
- func UpdatedAtGTE(v time.Time) predicate.Operator
- func UpdatedAtIn(vs ...time.Time) predicate.Operator
- func UpdatedAtLT(v time.Time) predicate.Operator
- func UpdatedAtLTE(v time.Time) predicate.Operator
- func UpdatedAtNEQ(v time.Time) predicate.Operator
- func UpdatedAtNotIn(vs ...time.Time) predicate.Operator
- func Username(v string) predicate.Operator
- func UsernameContains(v string) predicate.Operator
- func UsernameContainsFold(v string) predicate.Operator
- func UsernameEQ(v string) predicate.Operator
- func UsernameEqualFold(v string) predicate.Operator
- func UsernameGT(v string) predicate.Operator
- func UsernameGTE(v string) predicate.Operator
- func UsernameHasPrefix(v string) predicate.Operator
- func UsernameHasSuffix(v string) predicate.Operator
- func UsernameIn(vs ...string) predicate.Operator
- func UsernameLT(v string) predicate.Operator
- func UsernameLTE(v string) predicate.Operator
- func UsernameNEQ(v string) predicate.Operator
- func UsernameNotIn(vs ...string) predicate.Operator
- func ValidColumn(column string) bool
- type OrderOption
- func ByChat(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByChatCount(opts ...sql.OrderTermOption) OrderOption
- func ByColor(opts ...sql.OrderTermOption) OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption
- func ByGroup(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByGroupCount(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByLast(opts ...sql.OrderTermOption) OrderOption
- func ByToken(opts ...sql.OrderTermOption) OrderOption
- func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByUsername(opts ...sql.OrderTermOption) OrderOption
Constants ¶
const ( // Label holds the string label denoting the operator type in the database. Label = "operator" // 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" // FieldDeletedAt holds the string denoting the deleted_at field in the database. FieldDeletedAt = "deleted_at" // FieldUsername holds the string denoting the username field in the database. FieldUsername = "username" // FieldToken holds the string denoting the token field in the database. FieldToken = "token" // FieldColor holds the string denoting the color field in the database. FieldColor = "color" // FieldLast holds the string denoting the last field in the database. FieldLast = "last" // EdgeChat holds the string denoting the chat edge name in mutations. EdgeChat = "chat" // EdgeGroup holds the string denoting the group edge name in mutations. EdgeGroup = "group" // Table holds the table name of the operator in the database. Table = "operator" // ChatTable is the table that holds the chat relation/edge. ChatTable = "chat" // ChatInverseTable is the table name for the Chat entity. // It exists in this package in order to avoid circular dependency with the "chat" package. ChatInverseTable = "chat" // ChatColumn is the table column denoting the chat relation/edge. ChatColumn = "from" // GroupTable is the table that holds the group relation/edge. GroupTable = "group" // GroupInverseTable is the table name for the Group entity. // It exists in this package in order to avoid circular dependency with the "group" package. GroupInverseTable = "group" // GroupColumn is the table column denoting the group relation/edge. GroupColumn = "author" )
Variables ¶
var ( Hooks [1]ent.Hook Interceptors [1]ent.Interceptor // 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 // UsernameValidator is a validator for the "username" field. It is called by the builders before save. UsernameValidator func(string) error // TokenValidator is a validator for the "token" field. It is called by the builders before save. TokenValidator func(string) error // DefaultColor holds the default value on creation for the "color" field. DefaultColor uint32 // DefaultLast holds the default value on creation for the "last" field. DefaultLast func() time.Time )
Note that the variables below are initialized by the runtime package on the initialization of the application. Therefore, it should be imported in the main as follows:
import _ "github.com/c2micro/c2m/internal/ent/runtime"
var Columns = []string{ FieldID, FieldCreatedAt, FieldUpdatedAt, FieldDeletedAt, FieldUsername, FieldToken, FieldColor, FieldLast, }
Columns holds all SQL columns for operator fields.
Functions ¶
func Color ¶
Color applies equality check predicate on the "color" field. It's identical to ColorEQ.
func ColorNotIn ¶
ColorNotIn applies the NotIn predicate on the "color" 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 DeletedAt ¶
DeletedAt applies equality check predicate on the "deleted_at" field. It's identical to DeletedAtEQ.
func DeletedAtEQ ¶
DeletedAtEQ applies the EQ predicate on the "deleted_at" field.
func DeletedAtGT ¶
DeletedAtGT applies the GT predicate on the "deleted_at" field.
func DeletedAtGTE ¶
DeletedAtGTE applies the GTE predicate on the "deleted_at" field.
func DeletedAtIn ¶
DeletedAtIn applies the In predicate on the "deleted_at" field.
func DeletedAtIsNil ¶
DeletedAtIsNil applies the IsNil predicate on the "deleted_at" field.
func DeletedAtLT ¶
DeletedAtLT applies the LT predicate on the "deleted_at" field.
func DeletedAtLTE ¶
DeletedAtLTE applies the LTE predicate on the "deleted_at" field.
func DeletedAtNEQ ¶
DeletedAtNEQ applies the NEQ predicate on the "deleted_at" field.
func DeletedAtNotIn ¶
DeletedAtNotIn applies the NotIn predicate on the "deleted_at" field.
func DeletedAtNotNil ¶
DeletedAtNotNil applies the NotNil predicate on the "deleted_at" field.
func HasChatWith ¶
HasChatWith applies the HasEdge predicate on the "chat" edge with a given conditions (other predicates).
func HasGroupWith ¶
HasGroupWith applies the HasEdge predicate on the "group" edge with a given conditions (other predicates).
func Token ¶
Token applies equality check predicate on the "token" field. It's identical to TokenEQ.
func TokenContains ¶
TokenContains applies the Contains predicate on the "token" field.
func TokenContainsFold ¶
TokenContainsFold applies the ContainsFold predicate on the "token" field.
func TokenEqualFold ¶
TokenEqualFold applies the EqualFold predicate on the "token" field.
func TokenHasPrefix ¶
TokenHasPrefix applies the HasPrefix predicate on the "token" field.
func TokenHasSuffix ¶
TokenHasSuffix applies the HasSuffix predicate on the "token" field.
func TokenIsNil ¶
TokenIsNil applies the IsNil predicate on the "token" field.
func TokenNotIn ¶
TokenNotIn applies the NotIn predicate on the "token" field.
func TokenNotNil ¶
TokenNotNil applies the NotNil predicate on the "token" field.
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 Username ¶
Username applies equality check predicate on the "username" field. It's identical to UsernameEQ.
func UsernameContains ¶
UsernameContains applies the Contains predicate on the "username" field.
func UsernameContainsFold ¶
UsernameContainsFold applies the ContainsFold predicate on the "username" field.
func UsernameEQ ¶
UsernameEQ applies the EQ predicate on the "username" field.
func UsernameEqualFold ¶
UsernameEqualFold applies the EqualFold predicate on the "username" field.
func UsernameGT ¶
UsernameGT applies the GT predicate on the "username" field.
func UsernameGTE ¶
UsernameGTE applies the GTE predicate on the "username" field.
func UsernameHasPrefix ¶
UsernameHasPrefix applies the HasPrefix predicate on the "username" field.
func UsernameHasSuffix ¶
UsernameHasSuffix applies the HasSuffix predicate on the "username" field.
func UsernameIn ¶
UsernameIn applies the In predicate on the "username" field.
func UsernameLT ¶
UsernameLT applies the LT predicate on the "username" field.
func UsernameLTE ¶
UsernameLTE applies the LTE predicate on the "username" field.
func UsernameNEQ ¶
UsernameNEQ applies the NEQ predicate on the "username" field.
func UsernameNotIn ¶
UsernameNotIn applies the NotIn predicate on the "username" 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 Operator queries.
func ByChat ¶
func ByChat(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByChat orders the results by chat terms.
func ByChatCount ¶
func ByChatCount(opts ...sql.OrderTermOption) OrderOption
ByChatCount orders the results by chat count.
func ByColor ¶
func ByColor(opts ...sql.OrderTermOption) OrderOption
ByColor orders the results by the color field.
func ByCreatedAt ¶
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
ByCreatedAt orders the results by the created_at field.
func ByDeletedAt ¶
func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption
ByDeletedAt orders the results by the deleted_at field.
func ByGroup ¶
func ByGroup(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByGroup orders the results by group terms.
func ByGroupCount ¶
func ByGroupCount(opts ...sql.OrderTermOption) OrderOption
ByGroupCount orders the results by group count.
func ByID ¶
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func ByLast ¶
func ByLast(opts ...sql.OrderTermOption) OrderOption
ByLast orders the results by the last field.
func ByToken ¶
func ByToken(opts ...sql.OrderTermOption) OrderOption
ByToken orders the results by the token field.
func ByUpdatedAt ¶
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
ByUpdatedAt orders the results by the updated_at field.
func ByUsername ¶
func ByUsername(opts ...sql.OrderTermOption) OrderOption
ByUsername orders the results by the username field.