Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.RouteControl) predicate.RouteControl
- func CreatedAt(v time.Time) predicate.RouteControl
- func CreatedAtEQ(v time.Time) predicate.RouteControl
- func CreatedAtGT(v time.Time) predicate.RouteControl
- func CreatedAtGTE(v time.Time) predicate.RouteControl
- func CreatedAtIn(vs ...time.Time) predicate.RouteControl
- func CreatedAtLT(v time.Time) predicate.RouteControl
- func CreatedAtLTE(v time.Time) predicate.RouteControl
- func CreatedAtNEQ(v time.Time) predicate.RouteControl
- func CreatedAtNotIn(vs ...time.Time) predicate.RouteControl
- func DistanceMethodEQ(v DistanceMethod) predicate.RouteControl
- func DistanceMethodIn(vs ...DistanceMethod) predicate.RouteControl
- func DistanceMethodNEQ(v DistanceMethod) predicate.RouteControl
- func DistanceMethodNotIn(vs ...DistanceMethod) predicate.RouteControl
- func DistanceMethodValidator(dm DistanceMethod) error
- func GenerateRoutes(v bool) predicate.RouteControl
- func GenerateRoutesEQ(v bool) predicate.RouteControl
- func GenerateRoutesNEQ(v bool) predicate.RouteControl
- func HasBusinessUnit() predicate.RouteControl
- func HasBusinessUnitWith(preds ...predicate.BusinessUnit) predicate.RouteControl
- func HasOrganization() predicate.RouteControl
- func HasOrganizationWith(preds ...predicate.Organization) predicate.RouteControl
- func ID(id uuid.UUID) predicate.RouteControl
- func IDEQ(id uuid.UUID) predicate.RouteControl
- func IDGT(id uuid.UUID) predicate.RouteControl
- func IDGTE(id uuid.UUID) predicate.RouteControl
- func IDIn(ids ...uuid.UUID) predicate.RouteControl
- func IDLT(id uuid.UUID) predicate.RouteControl
- func IDLTE(id uuid.UUID) predicate.RouteControl
- func IDNEQ(id uuid.UUID) predicate.RouteControl
- func IDNotIn(ids ...uuid.UUID) predicate.RouteControl
- func MileageUnitEQ(v MileageUnit) predicate.RouteControl
- func MileageUnitIn(vs ...MileageUnit) predicate.RouteControl
- func MileageUnitNEQ(v MileageUnit) predicate.RouteControl
- func MileageUnitNotIn(vs ...MileageUnit) predicate.RouteControl
- func MileageUnitValidator(mu MileageUnit) error
- func Not(p predicate.RouteControl) predicate.RouteControl
- func Or(predicates ...predicate.RouteControl) predicate.RouteControl
- func UpdatedAt(v time.Time) predicate.RouteControl
- func UpdatedAtEQ(v time.Time) predicate.RouteControl
- func UpdatedAtGT(v time.Time) predicate.RouteControl
- func UpdatedAtGTE(v time.Time) predicate.RouteControl
- func UpdatedAtIn(vs ...time.Time) predicate.RouteControl
- func UpdatedAtLT(v time.Time) predicate.RouteControl
- func UpdatedAtLTE(v time.Time) predicate.RouteControl
- func UpdatedAtNEQ(v time.Time) predicate.RouteControl
- func UpdatedAtNotIn(vs ...time.Time) predicate.RouteControl
- func ValidColumn(column string) bool
- type DistanceMethod
- type MileageUnit
- type OrderOption
- func ByBusinessUnitField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByDistanceMethod(opts ...sql.OrderTermOption) OrderOption
- func ByGenerateRoutes(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByMileageUnit(opts ...sql.OrderTermOption) OrderOption
- func ByOrganizationField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
Constants ¶
const ( // Label holds the string label denoting the routecontrol type in the database. Label = "route_control" // 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" // FieldDistanceMethod holds the string denoting the distance_method field in the database. FieldDistanceMethod = "distance_method" // FieldMileageUnit holds the string denoting the mileage_unit field in the database. FieldMileageUnit = "mileage_unit" // FieldGenerateRoutes holds the string denoting the generate_routes field in the database. FieldGenerateRoutes = "generate_routes" // EdgeOrganization holds the string denoting the organization edge name in mutations. EdgeOrganization = "organization" // EdgeBusinessUnit holds the string denoting the business_unit edge name in mutations. EdgeBusinessUnit = "business_unit" // Table holds the table name of the routecontrol in the database. Table = "route_controls" // OrganizationTable is the table that holds the organization relation/edge. OrganizationTable = "route_controls" // OrganizationInverseTable is the table name for the Organization entity. // It exists in this package in order to avoid circular dependency with the "organization" package. OrganizationInverseTable = "organizations" // OrganizationColumn is the table column denoting the organization relation/edge. OrganizationColumn = "organization_id" // BusinessUnitTable is the table that holds the business_unit relation/edge. BusinessUnitTable = "route_controls" // BusinessUnitInverseTable is the table name for the BusinessUnit entity. // It exists in this package in order to avoid circular dependency with the "businessunit" package. BusinessUnitInverseTable = "business_units" // BusinessUnitColumn is the table column denoting the business_unit relation/edge. BusinessUnitColumn = "business_unit_id" )
const DefaultDistanceMethod = DistanceMethodT
DistanceMethodT is the default value of the DistanceMethod enum.
const DefaultMileageUnit = MileageUnitM
MileageUnitM is the default value of the MileageUnit enum.
Variables ¶
var ( // 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 // DefaultGenerateRoutes holds the default value on creation for the "generate_routes" field. DefaultGenerateRoutes bool // DefaultID holds the default value on creation for the "id" field. DefaultID func() uuid.UUID )
var Columns = []string{ FieldID, FieldCreatedAt, FieldUpdatedAt, FieldDistanceMethod, FieldMileageUnit, FieldGenerateRoutes, }
Columns holds all SQL columns for routecontrol fields.
var ForeignKeys = []string{
"organization_id",
"business_unit_id",
}
ForeignKeys holds the SQL foreign-keys that are owned by the "route_controls" table and are not defined as standalone fields in the schema.
Functions ¶
func And ¶
func And(predicates ...predicate.RouteControl) predicate.RouteControl
And groups predicates with the AND operator between them.
func CreatedAt ¶
func CreatedAt(v time.Time) predicate.RouteControl
CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
func CreatedAtEQ ¶
func CreatedAtEQ(v time.Time) predicate.RouteControl
CreatedAtEQ applies the EQ predicate on the "created_at" field.
func CreatedAtGT ¶
func CreatedAtGT(v time.Time) predicate.RouteControl
CreatedAtGT applies the GT predicate on the "created_at" field.
func CreatedAtGTE ¶
func CreatedAtGTE(v time.Time) predicate.RouteControl
CreatedAtGTE applies the GTE predicate on the "created_at" field.
func CreatedAtIn ¶
func CreatedAtIn(vs ...time.Time) predicate.RouteControl
CreatedAtIn applies the In predicate on the "created_at" field.
func CreatedAtLT ¶
func CreatedAtLT(v time.Time) predicate.RouteControl
CreatedAtLT applies the LT predicate on the "created_at" field.
func CreatedAtLTE ¶
func CreatedAtLTE(v time.Time) predicate.RouteControl
CreatedAtLTE applies the LTE predicate on the "created_at" field.
func CreatedAtNEQ ¶
func CreatedAtNEQ(v time.Time) predicate.RouteControl
CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
func CreatedAtNotIn ¶
func CreatedAtNotIn(vs ...time.Time) predicate.RouteControl
CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
func DistanceMethodEQ ¶
func DistanceMethodEQ(v DistanceMethod) predicate.RouteControl
DistanceMethodEQ applies the EQ predicate on the "distance_method" field.
func DistanceMethodIn ¶
func DistanceMethodIn(vs ...DistanceMethod) predicate.RouteControl
DistanceMethodIn applies the In predicate on the "distance_method" field.
func DistanceMethodNEQ ¶
func DistanceMethodNEQ(v DistanceMethod) predicate.RouteControl
DistanceMethodNEQ applies the NEQ predicate on the "distance_method" field.
func DistanceMethodNotIn ¶
func DistanceMethodNotIn(vs ...DistanceMethod) predicate.RouteControl
DistanceMethodNotIn applies the NotIn predicate on the "distance_method" field.
func DistanceMethodValidator ¶
func DistanceMethodValidator(dm DistanceMethod) error
DistanceMethodValidator is a validator for the "distance_method" field enum values. It is called by the builders before save.
func GenerateRoutes ¶
func GenerateRoutes(v bool) predicate.RouteControl
GenerateRoutes applies equality check predicate on the "generate_routes" field. It's identical to GenerateRoutesEQ.
func GenerateRoutesEQ ¶
func GenerateRoutesEQ(v bool) predicate.RouteControl
GenerateRoutesEQ applies the EQ predicate on the "generate_routes" field.
func GenerateRoutesNEQ ¶
func GenerateRoutesNEQ(v bool) predicate.RouteControl
GenerateRoutesNEQ applies the NEQ predicate on the "generate_routes" field.
func HasBusinessUnit ¶
func HasBusinessUnit() predicate.RouteControl
HasBusinessUnit applies the HasEdge predicate on the "business_unit" edge.
func HasBusinessUnitWith ¶
func HasBusinessUnitWith(preds ...predicate.BusinessUnit) predicate.RouteControl
HasBusinessUnitWith applies the HasEdge predicate on the "business_unit" edge with a given conditions (other predicates).
func HasOrganization ¶
func HasOrganization() predicate.RouteControl
HasOrganization applies the HasEdge predicate on the "organization" edge.
func HasOrganizationWith ¶
func HasOrganizationWith(preds ...predicate.Organization) predicate.RouteControl
HasOrganizationWith applies the HasEdge predicate on the "organization" edge with a given conditions (other predicates).
func IDEQ ¶
func IDEQ(id uuid.UUID) predicate.RouteControl
IDEQ applies the EQ predicate on the ID field.
func IDGT ¶
func IDGT(id uuid.UUID) predicate.RouteControl
IDGT applies the GT predicate on the ID field.
func IDGTE ¶
func IDGTE(id uuid.UUID) predicate.RouteControl
IDGTE applies the GTE predicate on the ID field.
func IDIn ¶
func IDIn(ids ...uuid.UUID) predicate.RouteControl
IDIn applies the In predicate on the ID field.
func IDLT ¶
func IDLT(id uuid.UUID) predicate.RouteControl
IDLT applies the LT predicate on the ID field.
func IDLTE ¶
func IDLTE(id uuid.UUID) predicate.RouteControl
IDLTE applies the LTE predicate on the ID field.
func IDNEQ ¶
func IDNEQ(id uuid.UUID) predicate.RouteControl
IDNEQ applies the NEQ predicate on the ID field.
func IDNotIn ¶
func IDNotIn(ids ...uuid.UUID) predicate.RouteControl
IDNotIn applies the NotIn predicate on the ID field.
func MileageUnitEQ ¶
func MileageUnitEQ(v MileageUnit) predicate.RouteControl
MileageUnitEQ applies the EQ predicate on the "mileage_unit" field.
func MileageUnitIn ¶
func MileageUnitIn(vs ...MileageUnit) predicate.RouteControl
MileageUnitIn applies the In predicate on the "mileage_unit" field.
func MileageUnitNEQ ¶
func MileageUnitNEQ(v MileageUnit) predicate.RouteControl
MileageUnitNEQ applies the NEQ predicate on the "mileage_unit" field.
func MileageUnitNotIn ¶
func MileageUnitNotIn(vs ...MileageUnit) predicate.RouteControl
MileageUnitNotIn applies the NotIn predicate on the "mileage_unit" field.
func MileageUnitValidator ¶
func MileageUnitValidator(mu MileageUnit) error
MileageUnitValidator is a validator for the "mileage_unit" field enum values. It is called by the builders before save.
func Not ¶
func Not(p predicate.RouteControl) predicate.RouteControl
Not applies the not operator on the given predicate.
func Or ¶
func Or(predicates ...predicate.RouteControl) predicate.RouteControl
Or groups predicates with the OR operator between them.
func UpdatedAt ¶
func UpdatedAt(v time.Time) predicate.RouteControl
UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.
func UpdatedAtEQ ¶
func UpdatedAtEQ(v time.Time) predicate.RouteControl
UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
func UpdatedAtGT ¶
func UpdatedAtGT(v time.Time) predicate.RouteControl
UpdatedAtGT applies the GT predicate on the "updated_at" field.
func UpdatedAtGTE ¶
func UpdatedAtGTE(v time.Time) predicate.RouteControl
UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
func UpdatedAtIn ¶
func UpdatedAtIn(vs ...time.Time) predicate.RouteControl
UpdatedAtIn applies the In predicate on the "updated_at" field.
func UpdatedAtLT ¶
func UpdatedAtLT(v time.Time) predicate.RouteControl
UpdatedAtLT applies the LT predicate on the "updated_at" field.
func UpdatedAtLTE ¶
func UpdatedAtLTE(v time.Time) predicate.RouteControl
UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
func UpdatedAtNEQ ¶
func UpdatedAtNEQ(v time.Time) predicate.RouteControl
UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
func UpdatedAtNotIn ¶
func UpdatedAtNotIn(vs ...time.Time) predicate.RouteControl
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 DistanceMethod ¶
type DistanceMethod string
DistanceMethod defines the type for the "distance_method" enum field.
const ( DistanceMethodT DistanceMethod = "T" DistanceMethodG DistanceMethod = "G" )
DistanceMethod values.
func (DistanceMethod) String ¶
func (dm DistanceMethod) String() string
type MileageUnit ¶
type MileageUnit string
MileageUnit defines the type for the "mileage_unit" enum field.
const ( MileageUnitM MileageUnit = "M" MileageUnitI MileageUnit = "I" )
MileageUnit values.
func (MileageUnit) String ¶
func (mu MileageUnit) String() string
type OrderOption ¶
OrderOption defines the ordering options for the RouteControl queries.
func ByBusinessUnitField ¶
func ByBusinessUnitField(field string, opts ...sql.OrderTermOption) OrderOption
ByBusinessUnitField orders the results by business_unit field.
func ByCreatedAt ¶
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
ByCreatedAt orders the results by the created_at field.
func ByDistanceMethod ¶
func ByDistanceMethod(opts ...sql.OrderTermOption) OrderOption
ByDistanceMethod orders the results by the distance_method field.
func ByGenerateRoutes ¶
func ByGenerateRoutes(opts ...sql.OrderTermOption) OrderOption
ByGenerateRoutes orders the results by the generate_routes field.
func ByID ¶
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func ByMileageUnit ¶
func ByMileageUnit(opts ...sql.OrderTermOption) OrderOption
ByMileageUnit orders the results by the mileage_unit field.
func ByOrganizationField ¶
func ByOrganizationField(field string, opts ...sql.OrderTermOption) OrderOption
ByOrganizationField orders the results by organization field.
func ByUpdatedAt ¶
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
ByUpdatedAt orders the results by the updated_at field.