Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Customer) predicate.Customer
- func CreatedAt(v time.Time) predicate.Customer
- func CreatedAtEQ(v time.Time) predicate.Customer
- func CreatedAtGT(v time.Time) predicate.Customer
- func CreatedAtGTE(v time.Time) predicate.Customer
- func CreatedAtIn(vs ...time.Time) predicate.Customer
- func CreatedAtLT(v time.Time) predicate.Customer
- func CreatedAtLTE(v time.Time) predicate.Customer
- func CreatedAtNEQ(v time.Time) predicate.Customer
- func CreatedAtNotIn(vs ...time.Time) predicate.Customer
- func Email(v string) predicate.Customer
- func EmailContains(v string) predicate.Customer
- func EmailContainsFold(v string) predicate.Customer
- func EmailEQ(v string) predicate.Customer
- func EmailEqualFold(v string) predicate.Customer
- func EmailGT(v string) predicate.Customer
- func EmailGTE(v string) predicate.Customer
- func EmailHasPrefix(v string) predicate.Customer
- func EmailHasSuffix(v string) predicate.Customer
- func EmailIn(vs ...string) predicate.Customer
- func EmailLT(v string) predicate.Customer
- func EmailLTE(v string) predicate.Customer
- func EmailNEQ(v string) predicate.Customer
- func EmailNotIn(vs ...string) predicate.Customer
- func HasBillingAddresses() predicate.Customer
- func HasBillingAddressesWith(preds ...predicate.BillingAddress) predicate.Customer
- func HasCreatedBy() predicate.Customer
- func HasCreatedByWith(preds ...predicate.User) predicate.Customer
- func HasDeliveryAddresses() predicate.Customer
- func HasDeliveryAddressesWith(preds ...predicate.DeliveryAddress) predicate.Customer
- func HasLogin() predicate.Customer
- func HasLoginWith(preds ...predicate.Login) predicate.Customer
- func HasNotes() predicate.Customer
- func HasNotesWith(preds ...predicate.Note) predicate.Customer
- func HasOrders() predicate.Customer
- func HasOrdersWith(preds ...predicate.Order) predicate.Customer
- func HasTels() predicate.Customer
- func HasTelsWith(preds ...predicate.Tel) predicate.Customer
- func ID(id int) predicate.Customer
- func IDEQ(id int) predicate.Customer
- func IDGT(id int) predicate.Customer
- func IDGTE(id int) predicate.Customer
- func IDIn(ids ...int) predicate.Customer
- func IDLT(id int) predicate.Customer
- func IDLTE(id int) predicate.Customer
- func IDNEQ(id int) predicate.Customer
- func IDNotIn(ids ...int) predicate.Customer
- func Name(v string) predicate.Customer
- func NameContains(v string) predicate.Customer
- func NameContainsFold(v string) predicate.Customer
- func NameEQ(v string) predicate.Customer
- func NameEqualFold(v string) predicate.Customer
- func NameGT(v string) predicate.Customer
- func NameGTE(v string) predicate.Customer
- func NameHasPrefix(v string) predicate.Customer
- func NameHasSuffix(v string) predicate.Customer
- func NameIn(vs ...string) predicate.Customer
- func NameLT(v string) predicate.Customer
- func NameLTE(v string) predicate.Customer
- func NameNEQ(v string) predicate.Customer
- func NameNotIn(vs ...string) predicate.Customer
- func Not(p predicate.Customer) predicate.Customer
- func Or(predicates ...predicate.Customer) predicate.Customer
- func Password(v string) predicate.Customer
- func PasswordContains(v string) predicate.Customer
- func PasswordContainsFold(v string) predicate.Customer
- func PasswordEQ(v string) predicate.Customer
- func PasswordEqualFold(v string) predicate.Customer
- func PasswordGT(v string) predicate.Customer
- func PasswordGTE(v string) predicate.Customer
- func PasswordHasPrefix(v string) predicate.Customer
- func PasswordHasSuffix(v string) predicate.Customer
- func PasswordIn(vs ...string) predicate.Customer
- func PasswordLT(v string) predicate.Customer
- func PasswordLTE(v string) predicate.Customer
- func PasswordNEQ(v string) predicate.Customer
- func PasswordNotIn(vs ...string) predicate.Customer
- func UpdatedAt(v time.Time) predicate.Customer
- func UpdatedAtEQ(v time.Time) predicate.Customer
- func UpdatedAtGT(v time.Time) predicate.Customer
- func UpdatedAtGTE(v time.Time) predicate.Customer
- func UpdatedAtIn(vs ...time.Time) predicate.Customer
- func UpdatedAtLT(v time.Time) predicate.Customer
- func UpdatedAtLTE(v time.Time) predicate.Customer
- func UpdatedAtNEQ(v time.Time) predicate.Customer
- func UpdatedAtNotIn(vs ...time.Time) predicate.Customer
- func ValidColumn(column string) bool
- type OrderOption
- func ByBillingAddresses(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByBillingAddressesCount(opts ...sql.OrderTermOption) OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByCreatedByField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByDeliveryAddresses(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByDeliveryAddressesCount(opts ...sql.OrderTermOption) OrderOption
- func ByEmail(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByLoginField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByName(opts ...sql.OrderTermOption) OrderOption
- func ByNotes(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByNotesCount(opts ...sql.OrderTermOption) OrderOption
- func ByOrders(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByOrdersCount(opts ...sql.OrderTermOption) OrderOption
- func ByPassword(opts ...sql.OrderTermOption) OrderOption
- func ByTels(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByTelsCount(opts ...sql.OrderTermOption) OrderOption
- func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
Constants ¶
const ( // Label holds the string label denoting the customer type in the database. Label = "customer" // 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" // FieldEmail holds the string denoting the email field in the database. FieldEmail = "email" // FieldPassword holds the string denoting the password field in the database. FieldPassword = "password" // 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" // EdgeOrders holds the string denoting the orders edge name in mutations. EdgeOrders = "orders" // EdgeBillingAddresses holds the string denoting the billing_addresses edge name in mutations. EdgeBillingAddresses = "billing_addresses" // EdgeDeliveryAddresses holds the string denoting the delivery_addresses edge name in mutations. EdgeDeliveryAddresses = "delivery_addresses" // EdgeTels holds the string denoting the tels edge name in mutations. EdgeTels = "tels" // EdgeCreatedBy holds the string denoting the created_by edge name in mutations. EdgeCreatedBy = "created_by" // EdgeNotes holds the string denoting the notes edge name in mutations. EdgeNotes = "notes" // EdgeLogin holds the string denoting the login edge name in mutations. EdgeLogin = "login" // Table holds the table name of the customer in the database. Table = "customers" // OrdersTable is the table that holds the orders relation/edge. OrdersTable = "orders" // OrdersInverseTable is the table name for the Order entity. // It exists in this package in order to avoid circular dependency with the "order" package. OrdersInverseTable = "orders" // OrdersColumn is the table column denoting the orders relation/edge. OrdersColumn = "customer_orders" // BillingAddressesTable is the table that holds the billing_addresses relation/edge. BillingAddressesTable = "billing_addresses" // BillingAddressesInverseTable is the table name for the BillingAddress entity. // It exists in this package in order to avoid circular dependency with the "billingaddress" package. BillingAddressesInverseTable = "billing_addresses" // BillingAddressesColumn is the table column denoting the billing_addresses relation/edge. BillingAddressesColumn = "customer_billing_addresses" // DeliveryAddressesTable is the table that holds the delivery_addresses relation/edge. DeliveryAddressesTable = "delivery_addresses" // DeliveryAddressesInverseTable is the table name for the DeliveryAddress entity. // It exists in this package in order to avoid circular dependency with the "deliveryaddress" package. DeliveryAddressesInverseTable = "delivery_addresses" // DeliveryAddressesColumn is the table column denoting the delivery_addresses relation/edge. DeliveryAddressesColumn = "customer_delivery_addresses" // TelsTable is the table that holds the tels relation/edge. The primary key declared below. TelsTable = "customer_tels" // TelsInverseTable is the table name for the Tel entity. // It exists in this package in order to avoid circular dependency with the "tel" package. TelsInverseTable = "tels" // CreatedByTable is the table that holds the created_by relation/edge. CreatedByTable = "customers" // CreatedByInverseTable is the table name for the User entity. // It exists in this package in order to avoid circular dependency with the "user" package. CreatedByInverseTable = "users" // CreatedByColumn is the table column denoting the created_by relation/edge. CreatedByColumn = "customer_created_by" // NotesTable is the table that holds the notes relation/edge. NotesTable = "notes" // NotesInverseTable is the table name for the Note entity. // It exists in this package in order to avoid circular dependency with the "note" package. NotesInverseTable = "notes" // NotesColumn is the table column denoting the notes relation/edge. NotesColumn = "customer_notes" // LoginTable is the table that holds the login relation/edge. LoginTable = "customers" // LoginInverseTable is the table name for the Login entity. // It exists in this package in order to avoid circular dependency with the "login" package. LoginInverseTable = "logins" // LoginColumn is the table column denoting the login relation/edge. LoginColumn = "customer_login" )
Variables ¶
var ( // NameValidator is a validator for the "name" field. It is called by the builders before save. NameValidator func(string) error // EmailValidator is a validator for the "email" field. It is called by the builders before save. EmailValidator func(string) error // PasswordValidator is a validator for the "password" field. It is called by the builders before save. PasswordValidator func(string) error // 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 )
var Columns = []string{ FieldID, FieldName, FieldEmail, FieldPassword, FieldCreatedAt, FieldUpdatedAt, }
Columns holds all SQL columns for customer fields.
var ForeignKeys = []string{
"customer_created_by",
"customer_login",
}
ForeignKeys holds the SQL foreign-keys that are owned by the "customers" table and are not defined as standalone fields in the schema.
var ( // TelsPrimaryKey and TelsColumn2 are the table columns denoting the // primary key for the tels relation (M2M). TelsPrimaryKey = []string{"customer_id", "tel_id"} )
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 Email ¶
Email applies equality check predicate on the "email" field. It's identical to EmailEQ.
func EmailContains ¶
EmailContains applies the Contains predicate on the "email" field.
func EmailContainsFold ¶
EmailContainsFold applies the ContainsFold predicate on the "email" field.
func EmailEqualFold ¶
EmailEqualFold applies the EqualFold predicate on the "email" field.
func EmailHasPrefix ¶
EmailHasPrefix applies the HasPrefix predicate on the "email" field.
func EmailHasSuffix ¶
EmailHasSuffix applies the HasSuffix predicate on the "email" field.
func EmailNotIn ¶
EmailNotIn applies the NotIn predicate on the "email" field.
func HasBillingAddresses ¶
HasBillingAddresses applies the HasEdge predicate on the "billing_addresses" edge.
func HasBillingAddressesWith ¶
func HasBillingAddressesWith(preds ...predicate.BillingAddress) predicate.Customer
HasBillingAddressesWith applies the HasEdge predicate on the "billing_addresses" edge with a given conditions (other predicates).
func HasCreatedBy ¶
HasCreatedBy applies the HasEdge predicate on the "created_by" edge.
func HasCreatedByWith ¶
HasCreatedByWith applies the HasEdge predicate on the "created_by" edge with a given conditions (other predicates).
func HasDeliveryAddresses ¶
HasDeliveryAddresses applies the HasEdge predicate on the "delivery_addresses" edge.
func HasDeliveryAddressesWith ¶
func HasDeliveryAddressesWith(preds ...predicate.DeliveryAddress) predicate.Customer
HasDeliveryAddressesWith applies the HasEdge predicate on the "delivery_addresses" edge with a given conditions (other predicates).
func HasLoginWith ¶
HasLoginWith applies the HasEdge predicate on the "login" edge with a given conditions (other predicates).
func HasNotesWith ¶
HasNotesWith applies the HasEdge predicate on the "notes" edge with a given conditions (other predicates).
func HasOrdersWith ¶
HasOrdersWith applies the HasEdge predicate on the "orders" edge with a given conditions (other predicates).
func HasTelsWith ¶
HasTelsWith applies the HasEdge predicate on the "tels" edge with a given conditions (other predicates).
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 Password ¶
Password applies equality check predicate on the "password" field. It's identical to PasswordEQ.
func PasswordContains ¶
PasswordContains applies the Contains predicate on the "password" field.
func PasswordContainsFold ¶
PasswordContainsFold applies the ContainsFold predicate on the "password" field.
func PasswordEQ ¶
PasswordEQ applies the EQ predicate on the "password" field.
func PasswordEqualFold ¶
PasswordEqualFold applies the EqualFold predicate on the "password" field.
func PasswordGT ¶
PasswordGT applies the GT predicate on the "password" field.
func PasswordGTE ¶
PasswordGTE applies the GTE predicate on the "password" field.
func PasswordHasPrefix ¶
PasswordHasPrefix applies the HasPrefix predicate on the "password" field.
func PasswordHasSuffix ¶
PasswordHasSuffix applies the HasSuffix predicate on the "password" field.
func PasswordIn ¶
PasswordIn applies the In predicate on the "password" field.
func PasswordLT ¶
PasswordLT applies the LT predicate on the "password" field.
func PasswordLTE ¶
PasswordLTE applies the LTE predicate on the "password" field.
func PasswordNEQ ¶
PasswordNEQ applies the NEQ predicate on the "password" field.
func PasswordNotIn ¶
PasswordNotIn applies the NotIn predicate on the "password" 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 ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).
Types ¶
type OrderOption ¶
OrderOption defines the ordering options for the Customer queries.
func ByBillingAddresses ¶
func ByBillingAddresses(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByBillingAddresses orders the results by billing_addresses terms.
func ByBillingAddressesCount ¶
func ByBillingAddressesCount(opts ...sql.OrderTermOption) OrderOption
ByBillingAddressesCount orders the results by billing_addresses count.
func ByCreatedAt ¶
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
ByCreatedAt orders the results by the created_at field.
func ByCreatedByField ¶
func ByCreatedByField(field string, opts ...sql.OrderTermOption) OrderOption
ByCreatedByField orders the results by created_by field.
func ByDeliveryAddresses ¶
func ByDeliveryAddresses(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByDeliveryAddresses orders the results by delivery_addresses terms.
func ByDeliveryAddressesCount ¶
func ByDeliveryAddressesCount(opts ...sql.OrderTermOption) OrderOption
ByDeliveryAddressesCount orders the results by delivery_addresses count.
func ByEmail ¶
func ByEmail(opts ...sql.OrderTermOption) OrderOption
ByEmail orders the results by the email field.
func ByID ¶
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func ByLoginField ¶
func ByLoginField(field string, opts ...sql.OrderTermOption) OrderOption
ByLoginField orders the results by login field.
func ByName ¶
func ByName(opts ...sql.OrderTermOption) OrderOption
ByName orders the results by the name field.
func ByNotes ¶
func ByNotes(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByNotes orders the results by notes terms.
func ByNotesCount ¶
func ByNotesCount(opts ...sql.OrderTermOption) OrderOption
ByNotesCount orders the results by notes count.
func ByOrders ¶
func ByOrders(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByOrders orders the results by orders terms.
func ByOrdersCount ¶
func ByOrdersCount(opts ...sql.OrderTermOption) OrderOption
ByOrdersCount orders the results by orders count.
func ByPassword ¶
func ByPassword(opts ...sql.OrderTermOption) OrderOption
ByPassword orders the results by the password field.
func ByTels ¶
func ByTels(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByTels orders the results by tels terms.
func ByTelsCount ¶
func ByTelsCount(opts ...sql.OrderTermOption) OrderOption
ByTelsCount orders the results by tels count.
func ByUpdatedAt ¶
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
ByUpdatedAt orders the results by the updated_at field.