Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.User) predicate.User
- func HasManager() predicate.User
- func HasManagerWith(preds ...predicate.User) predicate.User
- func HasReports() predicate.User
- func HasReportsWith(preds ...predicate.User) predicate.User
- func ID(id int) predicate.User
- func IDEQ(id int) predicate.User
- func IDGT(id int) predicate.User
- func IDGTE(id int) predicate.User
- func IDIn(ids ...int) predicate.User
- func IDLT(id int) predicate.User
- func IDLTE(id int) predicate.User
- func IDNEQ(id int) predicate.User
- func IDNotIn(ids ...int) predicate.User
- func ManagerID(v int) predicate.User
- func ManagerIDEQ(v int) predicate.User
- func ManagerIDIn(vs ...int) predicate.User
- func ManagerIDIsNil() predicate.User
- func ManagerIDNEQ(v int) predicate.User
- func ManagerIDNotIn(vs ...int) predicate.User
- func ManagerIDNotNil() predicate.User
- func Name(v string) predicate.User
- func NameContains(v string) predicate.User
- func NameContainsFold(v string) predicate.User
- func NameEQ(v string) predicate.User
- func NameEqualFold(v string) predicate.User
- func NameGT(v string) predicate.User
- func NameGTE(v string) predicate.User
- func NameHasPrefix(v string) predicate.User
- func NameHasSuffix(v string) predicate.User
- func NameIn(vs ...string) predicate.User
- func NameLT(v string) predicate.User
- func NameLTE(v string) predicate.User
- func NameNEQ(v string) predicate.User
- func NameNotIn(vs ...string) predicate.User
- func Not(p predicate.User) predicate.User
- func Or(predicates ...predicate.User) predicate.User
- func ValidColumn(column string) bool
- type OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByManagerField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByManagerID(opts ...sql.OrderTermOption) OrderOption
- func ByName(opts ...sql.OrderTermOption) OrderOption
- func ByReports(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByReportsCount(opts ...sql.OrderTermOption) OrderOption
Constants ¶
const ( // Label holds the string label denoting the user type in the database. Label = "user" // 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" // FieldManagerID holds the string denoting the manager_id field in the database. FieldManagerID = "manager_id" // EdgeManager holds the string denoting the manager edge name in mutations. EdgeManager = "manager" // EdgeReports holds the string denoting the reports edge name in mutations. EdgeReports = "reports" // Table holds the table name of the user in the database. Table = "users" // ManagerTable is the table that holds the manager relation/edge. ManagerTable = "users" // ManagerColumn is the table column denoting the manager relation/edge. ManagerColumn = "manager_id" // ReportsTable is the table that holds the reports relation/edge. ReportsTable = "users" // ReportsColumn is the table column denoting the reports relation/edge. ReportsColumn = "manager_id" )
Variables ¶
var Columns = []string{ FieldID, FieldName, FieldManagerID, }
Columns holds all SQL columns for user fields.
var ( // NameValidator is a validator for the "name" field. It is called by the builders before save. NameValidator func(string) error )
Functions ¶
func HasManager ¶
HasManager applies the HasEdge predicate on the "manager" edge.
func HasManagerWith ¶
HasManagerWith applies the HasEdge predicate on the "manager" edge with a given conditions (other predicates).
func HasReports ¶
HasReports applies the HasEdge predicate on the "reports" edge.
func HasReportsWith ¶
HasReportsWith applies the HasEdge predicate on the "reports" edge with a given conditions (other predicates).
func ManagerID ¶
ManagerID applies equality check predicate on the "manager_id" field. It's identical to ManagerIDEQ.
func ManagerIDEQ ¶
ManagerIDEQ applies the EQ predicate on the "manager_id" field.
func ManagerIDIn ¶
ManagerIDIn applies the In predicate on the "manager_id" field.
func ManagerIDIsNil ¶
ManagerIDIsNil applies the IsNil predicate on the "manager_id" field.
func ManagerIDNEQ ¶
ManagerIDNEQ applies the NEQ predicate on the "manager_id" field.
func ManagerIDNotIn ¶
ManagerIDNotIn applies the NotIn predicate on the "manager_id" field.
func ManagerIDNotNil ¶
ManagerIDNotNil applies the NotNil predicate on the "manager_id" 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 ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).
Types ¶
type OrderOption ¶
OrderOption defines the ordering options for the User queries.
func ByID ¶
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func ByManagerField ¶
func ByManagerField(field string, opts ...sql.OrderTermOption) OrderOption
ByManagerField orders the results by manager field.
func ByManagerID ¶
func ByManagerID(opts ...sql.OrderTermOption) OrderOption
ByManagerID orders the results by the manager_id field.
func ByName ¶
func ByName(opts ...sql.OrderTermOption) OrderOption
ByName orders the results by the name field.
func ByReports ¶
func ByReports(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByReports orders the results by reports terms.
func ByReportsCount ¶
func ByReportsCount(opts ...sql.OrderTermOption) OrderOption
ByReportsCount orders the results by reports count.