Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Tag) predicate.Tag
- func HasAgents() predicate.Tag
- func HasAgentsWith(preds ...predicate.Agent) predicate.Tag
- func ID(id int) predicate.Tag
- func IDEQ(id int) predicate.Tag
- func IDGT(id int) predicate.Tag
- func IDGTE(id int) predicate.Tag
- func IDIn(ids ...int) predicate.Tag
- func IDLT(id int) predicate.Tag
- func IDLTE(id int) predicate.Tag
- func IDNEQ(id int) predicate.Tag
- func IDNotIn(ids ...int) predicate.Tag
- func Name(v string) predicate.Tag
- func NameContains(v string) predicate.Tag
- func NameContainsFold(v string) predicate.Tag
- func NameEQ(v string) predicate.Tag
- func NameEqualFold(v string) predicate.Tag
- func NameGT(v string) predicate.Tag
- func NameGTE(v string) predicate.Tag
- func NameHasPrefix(v string) predicate.Tag
- func NameHasSuffix(v string) predicate.Tag
- func NameIn(vs ...string) predicate.Tag
- func NameLT(v string) predicate.Tag
- func NameLTE(v string) predicate.Tag
- func NameNEQ(v string) predicate.Tag
- func NameNotIn(vs ...string) predicate.Tag
- func Not(p predicate.Tag) predicate.Tag
- func Or(predicates ...predicate.Tag) predicate.Tag
- func ValidColumn(column string) bool
- func Value(v string) predicate.Tag
- func ValueContains(v string) predicate.Tag
- func ValueContainsFold(v string) predicate.Tag
- func ValueEQ(v string) predicate.Tag
- func ValueEqualFold(v string) predicate.Tag
- func ValueGT(v string) predicate.Tag
- func ValueGTE(v string) predicate.Tag
- func ValueHasPrefix(v string) predicate.Tag
- func ValueHasSuffix(v string) predicate.Tag
- func ValueIn(vs ...string) predicate.Tag
- func ValueLT(v string) predicate.Tag
- func ValueLTE(v string) predicate.Tag
- func ValueNEQ(v string) predicate.Tag
- func ValueNotIn(vs ...string) predicate.Tag
- type OrderOption
Constants ¶
const ( // Label holds the string label denoting the tag type in the database. Label = "tag" // 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" // FieldValue holds the string denoting the value field in the database. FieldValue = "value" // EdgeAgents holds the string denoting the agents edge name in mutations. EdgeAgents = "agents" // Table holds the table name of the tag in the database. Table = "tags" // AgentsTable is the table that holds the agents relation/edge. The primary key declared below. AgentsTable = "agent_tags" // AgentsInverseTable is the table name for the Agent entity. // It exists in this package in order to avoid circular dependency with the "agent" package. AgentsInverseTable = "agents" )
Variables ¶
var ( // NameValidator is a validator for the "name" field. It is called by the builders before save. NameValidator func(string) error // ValueValidator is a validator for the "value" field. It is called by the builders before save. ValueValidator func(string) error )
var ( // AgentsPrimaryKey and AgentsColumn2 are the table columns denoting the // primary key for the agents relation (M2M). AgentsPrimaryKey = []string{"agent_id", "tag_id"} )
var Columns = []string{ FieldID, FieldName, FieldValue, }
Columns holds all SQL columns for tag fields.
Functions ¶
func HasAgentsWith ¶
HasAgentsWith applies the HasEdge predicate on the "agents" 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 ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).
func Value ¶
Value applies equality check predicate on the "value" field. It's identical to ValueEQ.
func ValueContains ¶
ValueContains applies the Contains predicate on the "value" field.
func ValueContainsFold ¶
ValueContainsFold applies the ContainsFold predicate on the "value" field.
func ValueEqualFold ¶
ValueEqualFold applies the EqualFold predicate on the "value" field.
func ValueHasPrefix ¶
ValueHasPrefix applies the HasPrefix predicate on the "value" field.
func ValueHasSuffix ¶
ValueHasSuffix applies the HasSuffix predicate on the "value" field.
func ValueNotIn ¶
ValueNotIn applies the NotIn predicate on the "value" field.
Types ¶
type OrderOption ¶
OrderOption defines the ordering options for the Tag queries.
func ByAgents ¶
func ByAgents(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByAgents orders the results by agents terms.
func ByAgentsCount ¶
func ByAgentsCount(opts ...sql.OrderTermOption) OrderOption
ByAgentsCount orders the results by agents count.
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 ByValue ¶
func ByValue(opts ...sql.OrderTermOption) OrderOption
ByValue orders the results by the value field.