Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Location) predicate.Location
- func CreatedAt(v time.Time) predicate.Location
- func CreatedAtEQ(v time.Time) predicate.Location
- func CreatedAtGT(v time.Time) predicate.Location
- func CreatedAtGTE(v time.Time) predicate.Location
- func CreatedAtIn(vs ...time.Time) predicate.Location
- func CreatedAtLT(v time.Time) predicate.Location
- func CreatedAtLTE(v time.Time) predicate.Location
- func CreatedAtNEQ(v time.Time) predicate.Location
- func CreatedAtNotIn(vs ...time.Time) predicate.Location
- func Description(v string) predicate.Location
- func DescriptionContains(v string) predicate.Location
- func DescriptionContainsFold(v string) predicate.Location
- func DescriptionEQ(v string) predicate.Location
- func DescriptionEqualFold(v string) predicate.Location
- func DescriptionGT(v string) predicate.Location
- func DescriptionGTE(v string) predicate.Location
- func DescriptionHasPrefix(v string) predicate.Location
- func DescriptionHasSuffix(v string) predicate.Location
- func DescriptionIn(vs ...string) predicate.Location
- func DescriptionIsNil() predicate.Location
- func DescriptionLT(v string) predicate.Location
- func DescriptionLTE(v string) predicate.Location
- func DescriptionNEQ(v string) predicate.Location
- func DescriptionNotIn(vs ...string) predicate.Location
- func DescriptionNotNil() predicate.Location
- func HasChildren() predicate.Location
- func HasChildrenWith(preds ...predicate.Location) predicate.Location
- func HasGroup() predicate.Location
- func HasGroupWith(preds ...predicate.Group) predicate.Location
- func HasItems() predicate.Location
- func HasItemsWith(preds ...predicate.Item) predicate.Location
- func HasParent() predicate.Location
- func HasParentWith(preds ...predicate.Location) predicate.Location
- func ID(id uuid.UUID) predicate.Location
- func IDEQ(id uuid.UUID) predicate.Location
- func IDGT(id uuid.UUID) predicate.Location
- func IDGTE(id uuid.UUID) predicate.Location
- func IDIn(ids ...uuid.UUID) predicate.Location
- func IDLT(id uuid.UUID) predicate.Location
- func IDLTE(id uuid.UUID) predicate.Location
- func IDNEQ(id uuid.UUID) predicate.Location
- func IDNotIn(ids ...uuid.UUID) predicate.Location
- func Name(v string) predicate.Location
- func NameContains(v string) predicate.Location
- func NameContainsFold(v string) predicate.Location
- func NameEQ(v string) predicate.Location
- func NameEqualFold(v string) predicate.Location
- func NameGT(v string) predicate.Location
- func NameGTE(v string) predicate.Location
- func NameHasPrefix(v string) predicate.Location
- func NameHasSuffix(v string) predicate.Location
- func NameIn(vs ...string) predicate.Location
- func NameLT(v string) predicate.Location
- func NameLTE(v string) predicate.Location
- func NameNEQ(v string) predicate.Location
- func NameNotIn(vs ...string) predicate.Location
- func Not(p predicate.Location) predicate.Location
- func Or(predicates ...predicate.Location) predicate.Location
- func UpdatedAt(v time.Time) predicate.Location
- func UpdatedAtEQ(v time.Time) predicate.Location
- func UpdatedAtGT(v time.Time) predicate.Location
- func UpdatedAtGTE(v time.Time) predicate.Location
- func UpdatedAtIn(vs ...time.Time) predicate.Location
- func UpdatedAtLT(v time.Time) predicate.Location
- func UpdatedAtLTE(v time.Time) predicate.Location
- func UpdatedAtNEQ(v time.Time) predicate.Location
- func UpdatedAtNotIn(vs ...time.Time) predicate.Location
- func ValidColumn(column string) bool
- type OrderOption
- func ByChildren(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByChildrenCount(opts ...sql.OrderTermOption) OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByDescription(opts ...sql.OrderTermOption) OrderOption
- func ByGroupField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByItems(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByItemsCount(opts ...sql.OrderTermOption) OrderOption
- func ByName(opts ...sql.OrderTermOption) OrderOption
- func ByParentField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
Constants ¶
const ( // Label holds the string label denoting the location type in the database. Label = "location" // 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" // FieldDescription holds the string denoting the description field in the database. FieldDescription = "description" // EdgeGroup holds the string denoting the group edge name in mutations. EdgeGroup = "group" // EdgeParent holds the string denoting the parent edge name in mutations. EdgeParent = "parent" // EdgeChildren holds the string denoting the children edge name in mutations. EdgeChildren = "children" // EdgeItems holds the string denoting the items edge name in mutations. EdgeItems = "items" // Table holds the table name of the location in the database. Table = "locations" // GroupTable is the table that holds the group relation/edge. GroupTable = "locations" // GroupInverseTable is the table name for the Group entity. // It exists in this package in order to avoid circular dependency with the "group" package. GroupInverseTable = "groups" // GroupColumn is the table column denoting the group relation/edge. GroupColumn = "group_locations" // ParentTable is the table that holds the parent relation/edge. ParentTable = "locations" // ParentColumn is the table column denoting the parent relation/edge. ParentColumn = "location_children" // ChildrenTable is the table that holds the children relation/edge. ChildrenTable = "locations" // ChildrenColumn is the table column denoting the children relation/edge. ChildrenColumn = "location_children" // ItemsTable is the table that holds the items relation/edge. ItemsTable = "items" // ItemsInverseTable is the table name for the Item entity. // It exists in this package in order to avoid circular dependency with the "item" package. ItemsInverseTable = "items" // ItemsColumn is the table column denoting the items relation/edge. ItemsColumn = "location_items" )
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 // DescriptionValidator is a validator for the "description" field. It is called by the builders before save. DescriptionValidator 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, FieldDescription, }
Columns holds all SQL columns for location fields.
var ForeignKeys = []string{
"group_locations",
"location_children",
}
ForeignKeys holds the SQL foreign-keys that are owned by the "locations" table and are not defined as standalone fields in the schema.
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 Description ¶
Description applies equality check predicate on the "description" field. It's identical to DescriptionEQ.
func DescriptionContains ¶
DescriptionContains applies the Contains predicate on the "description" field.
func DescriptionContainsFold ¶
DescriptionContainsFold applies the ContainsFold predicate on the "description" field.
func DescriptionEQ ¶
DescriptionEQ applies the EQ predicate on the "description" field.
func DescriptionEqualFold ¶
DescriptionEqualFold applies the EqualFold predicate on the "description" field.
func DescriptionGT ¶
DescriptionGT applies the GT predicate on the "description" field.
func DescriptionGTE ¶
DescriptionGTE applies the GTE predicate on the "description" field.
func DescriptionHasPrefix ¶
DescriptionHasPrefix applies the HasPrefix predicate on the "description" field.
func DescriptionHasSuffix ¶
DescriptionHasSuffix applies the HasSuffix predicate on the "description" field.
func DescriptionIn ¶
DescriptionIn applies the In predicate on the "description" field.
func DescriptionIsNil ¶
DescriptionIsNil applies the IsNil predicate on the "description" field.
func DescriptionLT ¶
DescriptionLT applies the LT predicate on the "description" field.
func DescriptionLTE ¶
DescriptionLTE applies the LTE predicate on the "description" field.
func DescriptionNEQ ¶
DescriptionNEQ applies the NEQ predicate on the "description" field.
func DescriptionNotIn ¶
DescriptionNotIn applies the NotIn predicate on the "description" field.
func DescriptionNotNil ¶
DescriptionNotNil applies the NotNil predicate on the "description" field.
func HasChildren ¶
HasChildren applies the HasEdge predicate on the "children" edge.
func HasChildrenWith ¶
HasChildrenWith applies the HasEdge predicate on the "children" edge with a given conditions (other predicates).
func HasGroupWith ¶
HasGroupWith applies the HasEdge predicate on the "group" edge with a given conditions (other predicates).
func HasItemsWith ¶
HasItemsWith applies the HasEdge predicate on the "items" edge with a given conditions (other predicates).
func HasParentWith ¶
HasParentWith applies the HasEdge predicate on the "parent" 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 Location queries.
func ByChildren ¶
func ByChildren(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByChildren orders the results by children terms.
func ByChildrenCount ¶
func ByChildrenCount(opts ...sql.OrderTermOption) OrderOption
ByChildrenCount orders the results by children count.
func ByCreatedAt ¶
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
ByCreatedAt orders the results by the created_at field.
func ByDescription ¶
func ByDescription(opts ...sql.OrderTermOption) OrderOption
ByDescription orders the results by the description field.
func ByGroupField ¶
func ByGroupField(field string, opts ...sql.OrderTermOption) OrderOption
ByGroupField orders the results by group field.
func ByID ¶
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func ByItems ¶
func ByItems(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByItems orders the results by items terms.
func ByItemsCount ¶
func ByItemsCount(opts ...sql.OrderTermOption) OrderOption
ByItemsCount orders the results by items count.
func ByName ¶
func ByName(opts ...sql.OrderTermOption) OrderOption
ByName orders the results by the name field.
func ByParentField ¶
func ByParentField(field string, opts ...sql.OrderTermOption) OrderOption
ByParentField orders the results by parent field.
func ByUpdatedAt ¶
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
ByUpdatedAt orders the results by the updated_at field.