pet

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the pet type in the database.
	Label = "pet"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// EdgeOwner holds the string denoting the owner edge name in mutations.
	EdgeOwner = "owner"
	// EdgeAttachment holds the string denoting the attachment edge name in mutations.
	EdgeAttachment = "attachment"
	// UserFieldID holds the string denoting the ID field of the User.
	UserFieldID = "user_id"
	// Table holds the table name of the pet in the database.
	Table = "pets"
	// OwnerTable is the table that holds the owner relation/edge.
	OwnerTable = "pets"
	// OwnerInverseTable is the table name for the User entity.
	// It exists in this package in order to avoid circular dependency with the "user" package.
	OwnerInverseTable = "users"
	// OwnerColumn is the table column denoting the owner relation/edge.
	OwnerColumn = "user_pet"
	// AttachmentTable is the table that holds the attachment relation/edge.
	AttachmentTable = "attachments"
	// AttachmentInverseTable is the table name for the Attachment entity.
	// It exists in this package in order to avoid circular dependency with the "attachment" package.
	AttachmentInverseTable = "attachments"
	// AttachmentColumn is the table column denoting the attachment relation/edge.
	AttachmentColumn = "pet_attachment"
)

Variables

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

Columns holds all SQL columns for pet fields.

View Source
var ForeignKeys = []string{
	"user_pet",
}

ForeignKeys holds the SQL foreign-keys that are owned by the "pets" table and are not defined as standalone fields in the schema.

Functions

func And

func And(predicates ...predicate.Pet) predicate.Pet

And groups predicates with the AND operator between them.

func HasAttachment

func HasAttachment() predicate.Pet

HasAttachment applies the HasEdge predicate on the "attachment" edge.

func HasAttachmentWith

func HasAttachmentWith(preds ...predicate.Attachment) predicate.Pet

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

func HasOwner

func HasOwner() predicate.Pet

HasOwner applies the HasEdge predicate on the "owner" edge.

func HasOwnerWith

func HasOwnerWith(preds ...predicate.User) predicate.Pet

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

func ID

func ID(id int) predicate.Pet

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Pet

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Pet

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Pet

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...int) predicate.Pet

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Pet

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Pet

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Pet

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...int) predicate.Pet

IDNotIn applies the NotIn predicate on the ID field.

func Not

func Not(p predicate.Pet) predicate.Pet

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Pet) predicate.Pet

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 added in v0.4.1

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the Pet queries.

func ByAttachment added in v0.4.0

func ByAttachment(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption

ByAttachment orders the results by attachment terms.

func ByAttachmentCount added in v0.4.0

func ByAttachmentCount(opts ...sql.OrderTermOption) OrderOption

ByAttachmentCount orders the results by attachment count.

func ByID added in v0.4.0

func ByID(opts ...sql.OrderTermOption) OrderOption

ByID orders the results by the id field.

func ByOwnerField added in v0.4.0

func ByOwnerField(field string, opts ...sql.OrderTermOption) OrderOption

ByOwnerField orders the results by owner field.

Jump to

Keyboard shortcuts

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