Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Feature) predicate.Feature
- func DescIsNil() predicate.Feature
- func DescNotNil() predicate.Feature
- func HasPrerequisites() predicate.Feature
- func HasPrerequisitesWith(preds ...predicate.Prerequisite) predicate.Feature
- func ID(id int) predicate.Feature
- func IDEQ(id int) predicate.Feature
- func IDGT(id int) predicate.Feature
- func IDGTE(id int) predicate.Feature
- func IDIn(ids ...int) predicate.Feature
- func IDLT(id int) predicate.Feature
- func IDLTE(id int) predicate.Feature
- func IDNEQ(id int) predicate.Feature
- func IDNotIn(ids ...int) predicate.Feature
- func Indx(v string) predicate.Feature
- func IndxContains(v string) predicate.Feature
- func IndxContainsFold(v string) predicate.Feature
- func IndxEQ(v string) predicate.Feature
- func IndxEqualFold(v string) predicate.Feature
- func IndxGT(v string) predicate.Feature
- func IndxGTE(v string) predicate.Feature
- func IndxHasPrefix(v string) predicate.Feature
- func IndxHasSuffix(v string) predicate.Feature
- func IndxIn(vs ...string) predicate.Feature
- func IndxLT(v string) predicate.Feature
- func IndxLTE(v string) predicate.Feature
- func IndxNEQ(v string) predicate.Feature
- func IndxNotIn(vs ...string) predicate.Feature
- func Level(v int) predicate.Feature
- func LevelEQ(v int) predicate.Feature
- func LevelGT(v int) predicate.Feature
- func LevelGTE(v int) predicate.Feature
- func LevelIn(vs ...int) predicate.Feature
- func LevelLT(v int) predicate.Feature
- func LevelLTE(v int) predicate.Feature
- func LevelNEQ(v int) predicate.Feature
- func LevelNotIn(vs ...int) predicate.Feature
- func Name(v string) predicate.Feature
- func NameContains(v string) predicate.Feature
- func NameContainsFold(v string) predicate.Feature
- func NameEQ(v string) predicate.Feature
- func NameEqualFold(v string) predicate.Feature
- func NameGT(v string) predicate.Feature
- func NameGTE(v string) predicate.Feature
- func NameHasPrefix(v string) predicate.Feature
- func NameHasSuffix(v string) predicate.Feature
- func NameIn(vs ...string) predicate.Feature
- func NameLT(v string) predicate.Feature
- func NameLTE(v string) predicate.Feature
- func NameNEQ(v string) predicate.Feature
- func NameNotIn(vs ...string) predicate.Feature
- func Not(p predicate.Feature) predicate.Feature
- func Or(predicates ...predicate.Feature) predicate.Feature
- func ValidColumn(column string) bool
- type OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByIndx(opts ...sql.OrderTermOption) OrderOption
- func ByLevel(opts ...sql.OrderTermOption) OrderOption
- func ByName(opts ...sql.OrderTermOption) OrderOption
- func ByPrerequisites(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByPrerequisitesCount(opts ...sql.OrderTermOption) OrderOption
Constants ¶
const ( // Label holds the string label denoting the feature type in the database. Label = "feature" // FieldID holds the string denoting the id field in the database. FieldID = "id" // FieldIndx holds the string denoting the indx field in the database. FieldIndx = "indx" // FieldName holds the string denoting the name field in the database. FieldName = "name" // FieldDesc holds the string denoting the desc field in the database. FieldDesc = "desc" // FieldLevel holds the string denoting the level field in the database. FieldLevel = "level" // EdgePrerequisites holds the string denoting the prerequisites edge name in mutations. EdgePrerequisites = "prerequisites" // Table holds the table name of the feature in the database. Table = "features" // PrerequisitesTable is the table that holds the prerequisites relation/edge. PrerequisitesTable = "prerequisites" // PrerequisitesInverseTable is the table name for the Prerequisite entity. // It exists in this package in order to avoid circular dependency with the "prerequisite" package. PrerequisitesInverseTable = "prerequisites" // PrerequisitesColumn is the table column denoting the prerequisites relation/edge. PrerequisitesColumn = "feature_prerequisites" )
Variables ¶
var ( // IndxValidator is a validator for the "indx" field. It is called by the builders before save. IndxValidator func(string) error // NameValidator is a validator for the "name" field. It is called by the builders before save. NameValidator func(string) error // LevelValidator is a validator for the "level" field. It is called by the builders before save. LevelValidator func(int) error )
var Columns = []string{ FieldID, FieldIndx, FieldName, FieldDesc, FieldLevel, }
Columns holds all SQL columns for feature fields.
Functions ¶
func DescNotNil ¶
DescNotNil applies the NotNil predicate on the "desc" field.
func HasPrerequisites ¶
HasPrerequisites applies the HasEdge predicate on the "prerequisites" edge.
func HasPrerequisitesWith ¶
func HasPrerequisitesWith(preds ...predicate.Prerequisite) predicate.Feature
HasPrerequisitesWith applies the HasEdge predicate on the "prerequisites" edge with a given conditions (other predicates).
func IndxContains ¶
IndxContains applies the Contains predicate on the "indx" field.
func IndxContainsFold ¶
IndxContainsFold applies the ContainsFold predicate on the "indx" field.
func IndxEqualFold ¶
IndxEqualFold applies the EqualFold predicate on the "indx" field.
func IndxHasPrefix ¶
IndxHasPrefix applies the HasPrefix predicate on the "indx" field.
func IndxHasSuffix ¶
IndxHasSuffix applies the HasSuffix predicate on the "indx" field.
func Level ¶
Level applies equality check predicate on the "level" field. It's identical to LevelEQ.
func LevelNotIn ¶
LevelNotIn applies the NotIn predicate on the "level" field.
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).
Types ¶
type OrderOption ¶
OrderOption defines the ordering options for the Feature queries.
func ByID ¶
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func ByIndx ¶
func ByIndx(opts ...sql.OrderTermOption) OrderOption
ByIndx orders the results by the indx field.
func ByLevel ¶
func ByLevel(opts ...sql.OrderTermOption) OrderOption
ByLevel orders the results by the level field.
func ByName ¶
func ByName(opts ...sql.OrderTermOption) OrderOption
ByName orders the results by the name field.
func ByPrerequisites ¶
func ByPrerequisites(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByPrerequisites orders the results by prerequisites terms.
func ByPrerequisitesCount ¶
func ByPrerequisitesCount(opts ...sql.OrderTermOption) OrderOption
ByPrerequisitesCount orders the results by prerequisites count.