Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Item) predicate.Item
- func HasRecords() predicate.Item
- func HasRecordsWith(preds ...predicate.Record) predicate.Item
- func HasSets() predicate.Item
- func HasSetsWith(preds ...predicate.Set) predicate.Item
- func ID(id int64) predicate.Item
- func IDEQ(id int64) predicate.Item
- func IDGT(id int64) predicate.Item
- func IDGTE(id int64) predicate.Item
- func IDIn(ids ...int64) predicate.Item
- func IDLT(id int64) predicate.Item
- func IDLTE(id int64) predicate.Item
- func IDNEQ(id int64) predicate.Item
- func IDNotIn(ids ...int64) predicate.Item
- func Identifier(v string) predicate.Item
- func IdentifierContains(v string) predicate.Item
- func IdentifierContainsFold(v string) predicate.Item
- func IdentifierEQ(v string) predicate.Item
- func IdentifierEqualFold(v string) predicate.Item
- func IdentifierGT(v string) predicate.Item
- func IdentifierGTE(v string) predicate.Item
- func IdentifierHasPrefix(v string) predicate.Item
- func IdentifierHasSuffix(v string) predicate.Item
- func IdentifierIn(vs ...string) predicate.Item
- func IdentifierLT(v string) predicate.Item
- func IdentifierLTE(v string) predicate.Item
- func IdentifierNEQ(v string) predicate.Item
- func IdentifierNotIn(vs ...string) predicate.Item
- func Not(p predicate.Item) predicate.Item
- func Or(predicates ...predicate.Item) predicate.Item
- func ValidColumn(column string) bool
- type OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByIdentifier(opts ...sql.OrderTermOption) OrderOption
- func ByRecords(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByRecordsCount(opts ...sql.OrderTermOption) OrderOption
- func BySets(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func BySetsCount(opts ...sql.OrderTermOption) OrderOption
Constants ¶
const ( // Label holds the string label denoting the item type in the database. Label = "item" // FieldID holds the string denoting the id field in the database. FieldID = "id" // FieldIdentifier holds the string denoting the identifier field in the database. FieldIdentifier = "identifier" // EdgeRecords holds the string denoting the records edge name in mutations. EdgeRecords = "records" // EdgeSets holds the string denoting the sets edge name in mutations. EdgeSets = "sets" // Table holds the table name of the item in the database. Table = "items" // RecordsTable is the table that holds the records relation/edge. RecordsTable = "records" // RecordsInverseTable is the table name for the Record entity. // It exists in this package in order to avoid circular dependency with the "record" package. RecordsInverseTable = "records" // RecordsColumn is the table column denoting the records relation/edge. RecordsColumn = "item_id" // SetsTable is the table that holds the sets relation/edge. The primary key declared below. SetsTable = "item_sets" // SetsInverseTable is the table name for the Set entity. // It exists in this package in order to avoid circular dependency with the "set" package. SetsInverseTable = "sets" )
Variables ¶
var Columns = []string{ FieldID, FieldIdentifier, }
Columns holds all SQL columns for item fields.
var ( // SetsPrimaryKey and SetsColumn2 are the table columns denoting the // primary key for the sets relation (M2M). SetsPrimaryKey = []string{"item_id", "set_id"} )
Functions ¶
func HasRecords ¶
HasRecords applies the HasEdge predicate on the "records" edge.
func HasRecordsWith ¶
HasRecordsWith applies the HasEdge predicate on the "records" edge with a given conditions (other predicates).
func HasSetsWith ¶
HasSetsWith applies the HasEdge predicate on the "sets" edge with a given conditions (other predicates).
func Identifier ¶
Identifier applies equality check predicate on the "identifier" field. It's identical to IdentifierEQ.
func IdentifierContains ¶
IdentifierContains applies the Contains predicate on the "identifier" field.
func IdentifierContainsFold ¶
IdentifierContainsFold applies the ContainsFold predicate on the "identifier" field.
func IdentifierEQ ¶
IdentifierEQ applies the EQ predicate on the "identifier" field.
func IdentifierEqualFold ¶
IdentifierEqualFold applies the EqualFold predicate on the "identifier" field.
func IdentifierGT ¶
IdentifierGT applies the GT predicate on the "identifier" field.
func IdentifierGTE ¶
IdentifierGTE applies the GTE predicate on the "identifier" field.
func IdentifierHasPrefix ¶
IdentifierHasPrefix applies the HasPrefix predicate on the "identifier" field.
func IdentifierHasSuffix ¶
IdentifierHasSuffix applies the HasSuffix predicate on the "identifier" field.
func IdentifierIn ¶
IdentifierIn applies the In predicate on the "identifier" field.
func IdentifierLT ¶
IdentifierLT applies the LT predicate on the "identifier" field.
func IdentifierLTE ¶
IdentifierLTE applies the LTE predicate on the "identifier" field.
func IdentifierNEQ ¶
IdentifierNEQ applies the NEQ predicate on the "identifier" field.
func IdentifierNotIn ¶
IdentifierNotIn applies the NotIn predicate on the "identifier" 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 Item queries.
func ByID ¶
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func ByIdentifier ¶
func ByIdentifier(opts ...sql.OrderTermOption) OrderOption
ByIdentifier orders the results by the identifier field.
func ByRecords ¶
func ByRecords(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
ByRecords orders the results by records terms.
func ByRecordsCount ¶
func ByRecordsCount(opts ...sql.OrderTermOption) OrderOption
ByRecordsCount orders the results by records count.
func BySets ¶
func BySets(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
BySets orders the results by sets terms.
func BySetsCount ¶
func BySetsCount(opts ...sql.OrderTermOption) OrderOption
BySetsCount orders the results by sets count.