operator

package
v0.0.0-...-2b4f063 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 22, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
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

View Source
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"

Columns holds all SQL columns for operator fields.

Functions

func And

func And(predicates ...predicate.Operator) predicate.Operator

And groups predicates with the AND operator between them.

func Color

func Color(v uint32) predicate.Operator

Color applies equality check predicate on the "color" field. It's identical to ColorEQ.

func ColorEQ

func ColorEQ(v uint32) predicate.Operator

ColorEQ applies the EQ predicate on the "color" field.

func ColorGT

func ColorGT(v uint32) predicate.Operator

ColorGT applies the GT predicate on the "color" field.

func ColorGTE

func ColorGTE(v uint32) predicate.Operator

ColorGTE applies the GTE predicate on the "color" field.

func ColorIn

func ColorIn(vs ...uint32) predicate.Operator

ColorIn applies the In predicate on the "color" field.

func ColorLT

func ColorLT(v uint32) predicate.Operator

ColorLT applies the LT predicate on the "color" field.

func ColorLTE

func ColorLTE(v uint32) predicate.Operator

ColorLTE applies the LTE predicate on the "color" field.

func ColorNEQ

func ColorNEQ(v uint32) predicate.Operator

ColorNEQ applies the NEQ predicate on the "color" field.

func ColorNotIn

func ColorNotIn(vs ...uint32) predicate.Operator

ColorNotIn applies the NotIn predicate on the "color" field.

func CreatedAt

func CreatedAt(v time.Time) predicate.Operator

CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Operator

CreatedAtEQ applies the EQ predicate on the "created_at" field.

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Operator

CreatedAtGT applies the GT predicate on the "created_at" field.

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Operator

CreatedAtGTE applies the GTE predicate on the "created_at" field.

func CreatedAtIn

func CreatedAtIn(vs ...time.Time) predicate.Operator

CreatedAtIn applies the In predicate on the "created_at" field.

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Operator

CreatedAtLT applies the LT predicate on the "created_at" field.

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Operator

CreatedAtLTE applies the LTE predicate on the "created_at" field.

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Operator

CreatedAtNEQ applies the NEQ predicate on the "created_at" field.

func CreatedAtNotIn

func CreatedAtNotIn(vs ...time.Time) predicate.Operator

CreatedAtNotIn applies the NotIn predicate on the "created_at" field.

func DeletedAt

func DeletedAt(v time.Time) predicate.Operator

DeletedAt applies equality check predicate on the "deleted_at" field. It's identical to DeletedAtEQ.

func DeletedAtEQ

func DeletedAtEQ(v time.Time) predicate.Operator

DeletedAtEQ applies the EQ predicate on the "deleted_at" field.

func DeletedAtGT

func DeletedAtGT(v time.Time) predicate.Operator

DeletedAtGT applies the GT predicate on the "deleted_at" field.

func DeletedAtGTE

func DeletedAtGTE(v time.Time) predicate.Operator

DeletedAtGTE applies the GTE predicate on the "deleted_at" field.

func DeletedAtIn

func DeletedAtIn(vs ...time.Time) predicate.Operator

DeletedAtIn applies the In predicate on the "deleted_at" field.

func DeletedAtIsNil

func DeletedAtIsNil() predicate.Operator

DeletedAtIsNil applies the IsNil predicate on the "deleted_at" field.

func DeletedAtLT

func DeletedAtLT(v time.Time) predicate.Operator

DeletedAtLT applies the LT predicate on the "deleted_at" field.

func DeletedAtLTE

func DeletedAtLTE(v time.Time) predicate.Operator

DeletedAtLTE applies the LTE predicate on the "deleted_at" field.

func DeletedAtNEQ

func DeletedAtNEQ(v time.Time) predicate.Operator

DeletedAtNEQ applies the NEQ predicate on the "deleted_at" field.

func DeletedAtNotIn

func DeletedAtNotIn(vs ...time.Time) predicate.Operator

DeletedAtNotIn applies the NotIn predicate on the "deleted_at" field.

func DeletedAtNotNil

func DeletedAtNotNil() predicate.Operator

DeletedAtNotNil applies the NotNil predicate on the "deleted_at" field.

func HasChat

func HasChat() predicate.Operator

HasChat applies the HasEdge predicate on the "chat" edge.

func HasChatWith

func HasChatWith(preds ...predicate.Chat) predicate.Operator

HasChatWith applies the HasEdge predicate on the "chat" edge with a given conditions (other predicates).

func HasGroup

func HasGroup() predicate.Operator

HasGroup applies the HasEdge predicate on the "group" edge.

func HasGroupWith

func HasGroupWith(preds ...predicate.Group) predicate.Operator

HasGroupWith applies the HasEdge predicate on the "group" edge with a given conditions (other predicates).

func ID

func ID(id int) predicate.Operator

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Operator

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Operator

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Operator

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...int) predicate.Operator

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Operator

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Operator

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Operator

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...int) predicate.Operator

IDNotIn applies the NotIn predicate on the ID field.

func Last

func Last(v time.Time) predicate.Operator

Last applies equality check predicate on the "last" field. It's identical to LastEQ.

func LastEQ

func LastEQ(v time.Time) predicate.Operator

LastEQ applies the EQ predicate on the "last" field.

func LastGT

func LastGT(v time.Time) predicate.Operator

LastGT applies the GT predicate on the "last" field.

func LastGTE

func LastGTE(v time.Time) predicate.Operator

LastGTE applies the GTE predicate on the "last" field.

func LastIn

func LastIn(vs ...time.Time) predicate.Operator

LastIn applies the In predicate on the "last" field.

func LastLT

func LastLT(v time.Time) predicate.Operator

LastLT applies the LT predicate on the "last" field.

func LastLTE

func LastLTE(v time.Time) predicate.Operator

LastLTE applies the LTE predicate on the "last" field.

func LastNEQ

func LastNEQ(v time.Time) predicate.Operator

LastNEQ applies the NEQ predicate on the "last" field.

func LastNotIn

func LastNotIn(vs ...time.Time) predicate.Operator

LastNotIn applies the NotIn predicate on the "last" field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Operator) predicate.Operator

Or groups predicates with the OR operator between them.

func Token

func Token(v string) predicate.Operator

Token applies equality check predicate on the "token" field. It's identical to TokenEQ.

func TokenContains

func TokenContains(v string) predicate.Operator

TokenContains applies the Contains predicate on the "token" field.

func TokenContainsFold

func TokenContainsFold(v string) predicate.Operator

TokenContainsFold applies the ContainsFold predicate on the "token" field.

func TokenEQ

func TokenEQ(v string) predicate.Operator

TokenEQ applies the EQ predicate on the "token" field.

func TokenEqualFold

func TokenEqualFold(v string) predicate.Operator

TokenEqualFold applies the EqualFold predicate on the "token" field.

func TokenGT

func TokenGT(v string) predicate.Operator

TokenGT applies the GT predicate on the "token" field.

func TokenGTE

func TokenGTE(v string) predicate.Operator

TokenGTE applies the GTE predicate on the "token" field.

func TokenHasPrefix

func TokenHasPrefix(v string) predicate.Operator

TokenHasPrefix applies the HasPrefix predicate on the "token" field.

func TokenHasSuffix

func TokenHasSuffix(v string) predicate.Operator

TokenHasSuffix applies the HasSuffix predicate on the "token" field.

func TokenIn

func TokenIn(vs ...string) predicate.Operator

TokenIn applies the In predicate on the "token" field.

func TokenIsNil

func TokenIsNil() predicate.Operator

TokenIsNil applies the IsNil predicate on the "token" field.

func TokenLT

func TokenLT(v string) predicate.Operator

TokenLT applies the LT predicate on the "token" field.

func TokenLTE

func TokenLTE(v string) predicate.Operator

TokenLTE applies the LTE predicate on the "token" field.

func TokenNEQ

func TokenNEQ(v string) predicate.Operator

TokenNEQ applies the NEQ predicate on the "token" field.

func TokenNotIn

func TokenNotIn(vs ...string) predicate.Operator

TokenNotIn applies the NotIn predicate on the "token" field.

func TokenNotNil

func TokenNotNil() predicate.Operator

TokenNotNil applies the NotNil predicate on the "token" field.

func UpdatedAt

func UpdatedAt(v time.Time) predicate.Operator

UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.Operator

UpdatedAtEQ applies the EQ predicate on the "updated_at" field.

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.Operator

UpdatedAtGT applies the GT predicate on the "updated_at" field.

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.Operator

UpdatedAtGTE applies the GTE predicate on the "updated_at" field.

func UpdatedAtIn

func UpdatedAtIn(vs ...time.Time) predicate.Operator

UpdatedAtIn applies the In predicate on the "updated_at" field.

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.Operator

UpdatedAtLT applies the LT predicate on the "updated_at" field.

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.Operator

UpdatedAtLTE applies the LTE predicate on the "updated_at" field.

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.Operator

UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.

func UpdatedAtNotIn

func UpdatedAtNotIn(vs ...time.Time) predicate.Operator

UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.

func Username

func Username(v string) predicate.Operator

Username applies equality check predicate on the "username" field. It's identical to UsernameEQ.

func UsernameContains

func UsernameContains(v string) predicate.Operator

UsernameContains applies the Contains predicate on the "username" field.

func UsernameContainsFold

func UsernameContainsFold(v string) predicate.Operator

UsernameContainsFold applies the ContainsFold predicate on the "username" field.

func UsernameEQ

func UsernameEQ(v string) predicate.Operator

UsernameEQ applies the EQ predicate on the "username" field.

func UsernameEqualFold

func UsernameEqualFold(v string) predicate.Operator

UsernameEqualFold applies the EqualFold predicate on the "username" field.

func UsernameGT

func UsernameGT(v string) predicate.Operator

UsernameGT applies the GT predicate on the "username" field.

func UsernameGTE

func UsernameGTE(v string) predicate.Operator

UsernameGTE applies the GTE predicate on the "username" field.

func UsernameHasPrefix

func UsernameHasPrefix(v string) predicate.Operator

UsernameHasPrefix applies the HasPrefix predicate on the "username" field.

func UsernameHasSuffix

func UsernameHasSuffix(v string) predicate.Operator

UsernameHasSuffix applies the HasSuffix predicate on the "username" field.

func UsernameIn

func UsernameIn(vs ...string) predicate.Operator

UsernameIn applies the In predicate on the "username" field.

func UsernameLT

func UsernameLT(v string) predicate.Operator

UsernameLT applies the LT predicate on the "username" field.

func UsernameLTE

func UsernameLTE(v string) predicate.Operator

UsernameLTE applies the LTE predicate on the "username" field.

func UsernameNEQ

func UsernameNEQ(v string) predicate.Operator

UsernameNEQ applies the NEQ predicate on the "username" field.

func UsernameNotIn

func UsernameNotIn(vs ...string) predicate.Operator

UsernameNotIn applies the NotIn predicate on the "username" field.

func ValidColumn

func ValidColumn(column string) bool

ValidColumn reports if the column name is valid (part of the table columns).

Types

type OrderOption

type OrderOption func(*sql.Selector)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL