item

package
v0.0.0-...-ab1f78f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 25, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
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

View Source
var Columns = []string{
	FieldID,
	FieldIdentifier,
}

Columns holds all SQL columns for item fields.

View Source
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 And

func And(predicates ...predicate.Item) predicate.Item

And groups predicates with the AND operator between them.

func HasRecords

func HasRecords() predicate.Item

HasRecords applies the HasEdge predicate on the "records" edge.

func HasRecordsWith

func HasRecordsWith(preds ...predicate.Record) predicate.Item

HasRecordsWith applies the HasEdge predicate on the "records" edge with a given conditions (other predicates).

func HasSets

func HasSets() predicate.Item

HasSets applies the HasEdge predicate on the "sets" edge.

func HasSetsWith

func HasSetsWith(preds ...predicate.Set) predicate.Item

HasSetsWith applies the HasEdge predicate on the "sets" edge with a given conditions (other predicates).

func ID

func ID(id int64) predicate.Item

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int64) predicate.Item

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int64) predicate.Item

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int64) predicate.Item

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...int64) predicate.Item

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int64) predicate.Item

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int64) predicate.Item

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int64) predicate.Item

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...int64) predicate.Item

IDNotIn applies the NotIn predicate on the ID field.

func Identifier

func Identifier(v string) predicate.Item

Identifier applies equality check predicate on the "identifier" field. It's identical to IdentifierEQ.

func IdentifierContains

func IdentifierContains(v string) predicate.Item

IdentifierContains applies the Contains predicate on the "identifier" field.

func IdentifierContainsFold

func IdentifierContainsFold(v string) predicate.Item

IdentifierContainsFold applies the ContainsFold predicate on the "identifier" field.

func IdentifierEQ

func IdentifierEQ(v string) predicate.Item

IdentifierEQ applies the EQ predicate on the "identifier" field.

func IdentifierEqualFold

func IdentifierEqualFold(v string) predicate.Item

IdentifierEqualFold applies the EqualFold predicate on the "identifier" field.

func IdentifierGT

func IdentifierGT(v string) predicate.Item

IdentifierGT applies the GT predicate on the "identifier" field.

func IdentifierGTE

func IdentifierGTE(v string) predicate.Item

IdentifierGTE applies the GTE predicate on the "identifier" field.

func IdentifierHasPrefix

func IdentifierHasPrefix(v string) predicate.Item

IdentifierHasPrefix applies the HasPrefix predicate on the "identifier" field.

func IdentifierHasSuffix

func IdentifierHasSuffix(v string) predicate.Item

IdentifierHasSuffix applies the HasSuffix predicate on the "identifier" field.

func IdentifierIn

func IdentifierIn(vs ...string) predicate.Item

IdentifierIn applies the In predicate on the "identifier" field.

func IdentifierLT

func IdentifierLT(v string) predicate.Item

IdentifierLT applies the LT predicate on the "identifier" field.

func IdentifierLTE

func IdentifierLTE(v string) predicate.Item

IdentifierLTE applies the LTE predicate on the "identifier" field.

func IdentifierNEQ

func IdentifierNEQ(v string) predicate.Item

IdentifierNEQ applies the NEQ predicate on the "identifier" field.

func IdentifierNotIn

func IdentifierNotIn(vs ...string) predicate.Item

IdentifierNotIn applies the NotIn predicate on the "identifier" field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Item) predicate.Item

Or groups predicates with the OR operator between them.

func ValidColumn

func ValidColumn(column string) bool

ValidColumn reports if the column name is valid (part of the table columns).

Types

type OrderOption

type OrderOption func(*sql.Selector)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL