Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.City) predicate.City
- func CountryID(v uuid.UUID) predicate.City
- func CountryIDEQ(v uuid.UUID) predicate.City
- func CountryIDIn(vs ...uuid.UUID) predicate.City
- func CountryIDNEQ(v uuid.UUID) predicate.City
- func CountryIDNotIn(vs ...uuid.UUID) predicate.City
- func CreatedAt(v time.Time) predicate.City
- func CreatedAtEQ(v time.Time) predicate.City
- func CreatedAtGT(v time.Time) predicate.City
- func CreatedAtGTE(v time.Time) predicate.City
- func CreatedAtIn(vs ...time.Time) predicate.City
- func CreatedAtLT(v time.Time) predicate.City
- func CreatedAtLTE(v time.Time) predicate.City
- func CreatedAtNEQ(v time.Time) predicate.City
- func CreatedAtNotIn(vs ...time.Time) predicate.City
- func HasCountry() predicate.City
- func HasCountryWith(preds ...predicate.Country) predicate.City
- func HasRegion() predicate.City
- func HasRegionWith(preds ...predicate.Region) predicate.City
- func HasUsers() predicate.City
- func HasUsersWith(preds ...predicate.User) predicate.City
- func ID(id uuid.UUID) predicate.City
- func IDEQ(id uuid.UUID) predicate.City
- func IDGT(id uuid.UUID) predicate.City
- func IDGTE(id uuid.UUID) predicate.City
- func IDIn(ids ...uuid.UUID) predicate.City
- func IDLT(id uuid.UUID) predicate.City
- func IDLTE(id uuid.UUID) predicate.City
- func IDNEQ(id uuid.UUID) predicate.City
- func IDNotIn(ids ...uuid.UUID) predicate.City
- func Name(v string) predicate.City
- func NameContains(v string) predicate.City
- func NameContainsFold(v string) predicate.City
- func NameEQ(v string) predicate.City
- func NameEqualFold(v string) predicate.City
- func NameGT(v string) predicate.City
- func NameGTE(v string) predicate.City
- func NameHasPrefix(v string) predicate.City
- func NameHasSuffix(v string) predicate.City
- func NameIn(vs ...string) predicate.City
- func NameLT(v string) predicate.City
- func NameLTE(v string) predicate.City
- func NameNEQ(v string) predicate.City
- func NameNotIn(vs ...string) predicate.City
- func Not(p predicate.City) predicate.City
- func Or(predicates ...predicate.City) predicate.City
- func RegionID(v uuid.UUID) predicate.City
- func RegionIDEQ(v uuid.UUID) predicate.City
- func RegionIDIn(vs ...uuid.UUID) predicate.City
- func RegionIDIsNil() predicate.City
- func RegionIDNEQ(v uuid.UUID) predicate.City
- func RegionIDNotIn(vs ...uuid.UUID) predicate.City
- func RegionIDNotNil() predicate.City
- func UpdatedAt(v time.Time) predicate.City
- func UpdatedAtEQ(v time.Time) predicate.City
- func UpdatedAtGT(v time.Time) predicate.City
- func UpdatedAtGTE(v time.Time) predicate.City
- func UpdatedAtIn(vs ...time.Time) predicate.City
- func UpdatedAtLT(v time.Time) predicate.City
- func UpdatedAtLTE(v time.Time) predicate.City
- func UpdatedAtNEQ(v time.Time) predicate.City
- func UpdatedAtNotIn(vs ...time.Time) predicate.City
- func ValidColumn(column string) bool
- type OrderOption
- func ByCountryField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByCountryID(opts ...sql.OrderTermOption) OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByName(opts ...sql.OrderTermOption) OrderOption
- func ByRegionField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByRegionID(opts ...sql.OrderTermOption) OrderOption
- func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByUsers(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByUsersCount(opts ...sql.OrderTermOption) OrderOption
Constants ¶
const ( // Label holds the string label denoting the city type in the database. Label = "city" // 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" // FieldName holds the string denoting the name field in the database. FieldName = "name" // FieldRegionID holds the string denoting the region_id field in the database. FieldRegionID = "region_id" // FieldCountryID holds the string denoting the country_id field in the database. FieldCountryID = "country_id" // EdgeRegion holds the string denoting the region edge name in mutations. EdgeRegion = "region" // EdgeCountry holds the string denoting the country edge name in mutations. EdgeCountry = "country" // EdgeUsers holds the string denoting the users edge name in mutations. EdgeUsers = "users" // Table holds the table name of the city in the database. Table = "cities" // RegionTable is the table that holds the region relation/edge. RegionTable = "cities" // RegionInverseTable is the table name for the Region entity. // It exists in this package in order to avoid circular dependency with the "region" package. RegionInverseTable = "regions" // RegionColumn is the table column denoting the region relation/edge. RegionColumn = "region_id" // CountryTable is the table that holds the country relation/edge. CountryTable = "cities" // CountryInverseTable is the table name for the Country entity. // It exists in this package in order to avoid circular dependency with the "country" package. CountryInverseTable = "countries" // CountryColumn is the table column denoting the country relation/edge. CountryColumn = "country_id" // UsersTable is the table that holds the users relation/edge. UsersTable = "users" // UsersInverseTable is the table name for the User entity. // It exists in this package in order to avoid circular dependency with the "user" package. UsersInverseTable = "users" // UsersColumn is the table column denoting the users relation/edge. UsersColumn = "city_id" )
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 // NameValidator is a validator for the "name" field. It is called by the builders before save. NameValidator func(string) error // DefaultID holds the default value on creation for the "id" field. DefaultID func() uuid.UUID )
var Columns = []string{ FieldID, FieldCreatedAt, FieldUpdatedAt, FieldName, FieldRegionID, FieldCountryID, }
Columns holds all SQL columns for city fields.
Functions ¶
func CountryID ¶
CountryID applies equality check predicate on the "country_id" field. It's identical to CountryIDEQ.
func CountryIDEQ ¶
CountryIDEQ applies the EQ predicate on the "country_id" field.
func CountryIDIn ¶
CountryIDIn applies the In predicate on the "country_id" field.
func CountryIDNEQ ¶
CountryIDNEQ applies the NEQ predicate on the "country_id" field.
func CountryIDNotIn ¶
CountryIDNotIn applies the NotIn predicate on the "country_id" field.
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 HasCountry ¶
HasCountry applies the HasEdge predicate on the "country" edge.
func HasCountryWith ¶
HasCountryWith applies the HasEdge predicate on the "country" edge with a given conditions (other predicates).
func HasRegionWith ¶
HasRegionWith applies the HasEdge predicate on the "region" edge with a given conditions (other predicates).
func HasUsersWith ¶
HasUsersWith applies the HasEdge predicate on the "users" 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 RegionID ¶
RegionID applies equality check predicate on the "region_id" field. It's identical to RegionIDEQ.
func RegionIDEQ ¶
RegionIDEQ applies the EQ predicate on the "region_id" field.
func RegionIDIn ¶
RegionIDIn applies the In predicate on the "region_id" field.
func RegionIDIsNil ¶
RegionIDIsNil applies the IsNil predicate on the "region_id" field.
func RegionIDNEQ ¶
RegionIDNEQ applies the NEQ predicate on the "region_id" field.
func RegionIDNotIn ¶
RegionIDNotIn applies the NotIn predicate on the "region_id" field.
func RegionIDNotNil ¶
RegionIDNotNil applies the NotNil predicate on the "region_id" 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 City queries.
func ByCountryField ¶
func ByCountryField(field string, opts ...sql.OrderTermOption) OrderOption
ByCountryField orders the results by country field.
func ByCountryID ¶
func ByCountryID(opts ...sql.OrderTermOption) OrderOption
ByCountryID orders the results by the country_id field.
func ByCreatedAt ¶
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
ByCreatedAt orders the results by the created_at 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 ByRegionField ¶
func ByRegionField(field string, opts ...sql.OrderTermOption) OrderOption
ByRegionField orders the results by region field.
func ByRegionID ¶
func ByRegionID(opts ...sql.OrderTermOption) OrderOption
ByRegionID orders the results by the region_id field.
func ByUpdatedAt ¶
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
ByUpdatedAt orders the results by the updated_at field.
func ByUsers ¶
func ByUsers(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByUsers orders the results by users terms.
func ByUsersCount ¶
func ByUsersCount(opts ...sql.OrderTermOption) OrderOption
ByUsersCount orders the results by users count.