Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Country) predicate.Country
- func Code(v string) predicate.Country
- func CodeContains(v string) predicate.Country
- func CodeContainsFold(v string) predicate.Country
- func CodeEQ(v string) predicate.Country
- func CodeEqualFold(v string) predicate.Country
- func CodeGT(v string) predicate.Country
- func CodeGTE(v string) predicate.Country
- func CodeHasPrefix(v string) predicate.Country
- func CodeHasSuffix(v string) predicate.Country
- func CodeIn(vs ...string) predicate.Country
- func CodeLT(v string) predicate.Country
- func CodeLTE(v string) predicate.Country
- func CodeNEQ(v string) predicate.Country
- func CodeNotIn(vs ...string) predicate.Country
- func CreatedAt(v time.Time) predicate.Country
- func CreatedAtEQ(v time.Time) predicate.Country
- func CreatedAtGT(v time.Time) predicate.Country
- func CreatedAtGTE(v time.Time) predicate.Country
- func CreatedAtIn(vs ...time.Time) predicate.Country
- func CreatedAtLT(v time.Time) predicate.Country
- func CreatedAtLTE(v time.Time) predicate.Country
- func CreatedAtNEQ(v time.Time) predicate.Country
- func CreatedAtNotIn(vs ...time.Time) predicate.Country
- func HasCities() predicate.Country
- func HasCitiesWith(preds ...predicate.City) predicate.Country
- func HasRegions() predicate.Country
- func HasRegionsWith(preds ...predicate.Region) predicate.Country
- func ID(id uuid.UUID) predicate.Country
- func IDEQ(id uuid.UUID) predicate.Country
- func IDGT(id uuid.UUID) predicate.Country
- func IDGTE(id uuid.UUID) predicate.Country
- func IDIn(ids ...uuid.UUID) predicate.Country
- func IDLT(id uuid.UUID) predicate.Country
- func IDLTE(id uuid.UUID) predicate.Country
- func IDNEQ(id uuid.UUID) predicate.Country
- func IDNotIn(ids ...uuid.UUID) predicate.Country
- func Name(v string) predicate.Country
- func NameContains(v string) predicate.Country
- func NameContainsFold(v string) predicate.Country
- func NameEQ(v string) predicate.Country
- func NameEqualFold(v string) predicate.Country
- func NameGT(v string) predicate.Country
- func NameGTE(v string) predicate.Country
- func NameHasPrefix(v string) predicate.Country
- func NameHasSuffix(v string) predicate.Country
- func NameIn(vs ...string) predicate.Country
- func NameLT(v string) predicate.Country
- func NameLTE(v string) predicate.Country
- func NameNEQ(v string) predicate.Country
- func NameNotIn(vs ...string) predicate.Country
- func Not(p predicate.Country) predicate.Country
- func Or(predicates ...predicate.Country) predicate.Country
- func UpdatedAt(v time.Time) predicate.Country
- func UpdatedAtEQ(v time.Time) predicate.Country
- func UpdatedAtGT(v time.Time) predicate.Country
- func UpdatedAtGTE(v time.Time) predicate.Country
- func UpdatedAtIn(vs ...time.Time) predicate.Country
- func UpdatedAtLT(v time.Time) predicate.Country
- func UpdatedAtLTE(v time.Time) predicate.Country
- func UpdatedAtNEQ(v time.Time) predicate.Country
- func UpdatedAtNotIn(vs ...time.Time) predicate.Country
- func ValidColumn(column string) bool
- type OrderOption
- func ByCities(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByCitiesCount(opts ...sql.OrderTermOption) OrderOption
- func ByCode(opts ...sql.OrderTermOption) OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByName(opts ...sql.OrderTermOption) OrderOption
- func ByRegions(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByRegionsCount(opts ...sql.OrderTermOption) OrderOption
- func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
Constants ¶
const ( // Label holds the string label denoting the country type in the database. Label = "country" // 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" // FieldCode holds the string denoting the code field in the database. FieldCode = "code" // EdgeCities holds the string denoting the cities edge name in mutations. EdgeCities = "cities" // EdgeRegions holds the string denoting the regions edge name in mutations. EdgeRegions = "regions" // Table holds the table name of the country in the database. Table = "countries" // CitiesTable is the table that holds the cities relation/edge. CitiesTable = "cities" // CitiesInverseTable is the table name for the City entity. // It exists in this package in order to avoid circular dependency with the "city" package. CitiesInverseTable = "cities" // CitiesColumn is the table column denoting the cities relation/edge. CitiesColumn = "country_id" // RegionsTable is the table that holds the regions relation/edge. RegionsTable = "regions" // RegionsInverseTable is the table name for the Region entity. // It exists in this package in order to avoid circular dependency with the "region" package. RegionsInverseTable = "regions" // RegionsColumn is the table column denoting the regions relation/edge. RegionsColumn = "country_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 // CodeValidator is a validator for the "code" field. It is called by the builders before save. CodeValidator 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, FieldCode, }
Columns holds all SQL columns for country fields.
Functions ¶
func CodeContains ¶
CodeContains applies the Contains predicate on the "code" field.
func CodeContainsFold ¶
CodeContainsFold applies the ContainsFold predicate on the "code" field.
func CodeEqualFold ¶
CodeEqualFold applies the EqualFold predicate on the "code" field.
func CodeHasPrefix ¶
CodeHasPrefix applies the HasPrefix predicate on the "code" field.
func CodeHasSuffix ¶
CodeHasSuffix applies the HasSuffix predicate on the "code" 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 HasCitiesWith ¶
HasCitiesWith applies the HasEdge predicate on the "cities" edge with a given conditions (other predicates).
func HasRegions ¶
HasRegions applies the HasEdge predicate on the "regions" edge.
func HasRegionsWith ¶
HasRegionsWith applies the HasEdge predicate on the "regions" 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 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 Country queries.
func ByCities ¶
func ByCities(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByCities orders the results by cities terms.
func ByCitiesCount ¶
func ByCitiesCount(opts ...sql.OrderTermOption) OrderOption
ByCitiesCount orders the results by cities count.
func ByCode ¶
func ByCode(opts ...sql.OrderTermOption) OrderOption
ByCode orders the results by the code 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 ByRegions ¶
func ByRegions(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByRegions orders the results by regions terms.
func ByRegionsCount ¶
func ByRegionsCount(opts ...sql.OrderTermOption) OrderOption
ByRegionsCount orders the results by regions count.
func ByUpdatedAt ¶
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
ByUpdatedAt orders the results by the updated_at field.