Documentation
¶
Index ¶
- Constants
- Variables
- func Age(v uint32) predicate.User
- func AgeEQ(v uint32) predicate.User
- func AgeGT(v uint32) predicate.User
- func AgeGTE(v uint32) predicate.User
- func AgeIn(vs ...uint32) predicate.User
- func AgeLT(v uint32) predicate.User
- func AgeLTE(v uint32) predicate.User
- func AgeNEQ(v uint32) predicate.User
- func AgeNotIn(vs ...uint32) predicate.User
- func And(predicates ...predicate.User) predicate.User
- func ID(id uint32) predicate.User
- func IDEQ(id uint32) predicate.User
- func IDGT(id uint32) predicate.User
- func IDGTE(id uint32) predicate.User
- func IDIn(ids ...uint32) predicate.User
- func IDLT(id uint32) predicate.User
- func IDLTE(id uint32) predicate.User
- func IDNEQ(id uint32) predicate.User
- func IDNotIn(ids ...uint32) 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 TenantID(v uint32) predicate.User
- func TenantIDEQ(v uint32) predicate.User
- func TenantIDGT(v uint32) predicate.User
- func TenantIDGTE(v uint32) predicate.User
- func TenantIDIn(vs ...uint32) predicate.User
- func TenantIDIsNil() predicate.User
- func TenantIDLT(v uint32) predicate.User
- func TenantIDLTE(v uint32) predicate.User
- func TenantIDNEQ(v uint32) predicate.User
- func TenantIDNotIn(vs ...uint32) predicate.User
- func TenantIDNotNil() predicate.User
- func ValidColumn(column string) bool
- type 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" // FieldTenantID holds the string denoting the tenant_id field in the database. FieldTenantID = "tenant_id" // FieldName holds the string denoting the name field in the database. FieldName = "name" // FieldAge holds the string denoting the age field in the database. FieldAge = "age" // Table holds the table name of the user in the database. Table = "users" )
Variables ¶
var ( Hooks [1]ent.Hook Policy ent.Policy // DefaultTenantID holds the default value on creation for the "tenant_id" field. DefaultTenantID uint32 // NameValidator is a validator for the "name" field. It is called by the builders before save. NameValidator func(string) error // DefaultAge holds the default value on creation for the "age" field. DefaultAge uint32 // IDValidator is a validator for the "id" field. It is called by the builders before save. IDValidator func(uint32) error )
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/52dev/go-crud/entgo/ent/runtime"
var Columns = []string{ FieldID, FieldTenantID, FieldName, FieldAge, }
Columns holds all SQL columns for user fields.
Functions ¶
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 TenantID ¶
TenantID applies equality check predicate on the "tenant_id" field. It's identical to TenantIDEQ.
func TenantIDEQ ¶
TenantIDEQ applies the EQ predicate on the "tenant_id" field.
func TenantIDGT ¶
TenantIDGT applies the GT predicate on the "tenant_id" field.
func TenantIDGTE ¶
TenantIDGTE applies the GTE predicate on the "tenant_id" field.
func TenantIDIn ¶
TenantIDIn applies the In predicate on the "tenant_id" field.
func TenantIDIsNil ¶
TenantIDIsNil applies the IsNil predicate on the "tenant_id" field.
func TenantIDLT ¶
TenantIDLT applies the LT predicate on the "tenant_id" field.
func TenantIDLTE ¶
TenantIDLTE applies the LTE predicate on the "tenant_id" field.
func TenantIDNEQ ¶
TenantIDNEQ applies the NEQ predicate on the "tenant_id" field.
func TenantIDNotIn ¶
TenantIDNotIn applies the NotIn predicate on the "tenant_id" field.
func TenantIDNotNil ¶
TenantIDNotNil applies the NotNil predicate on the "tenant_id" 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 ByAge ¶
func ByAge(opts ...sql.OrderTermOption) OrderOption
ByAge orders the results by the age field.
func ByID ¶
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func ByName ¶
func ByName(opts ...sql.OrderTermOption) OrderOption
ByName orders the results by the name field.
func ByTenantID ¶
func ByTenantID(opts ...sql.OrderTermOption) OrderOption
ByTenantID orders the results by the tenant_id field.