postcategory

package
v0.0.0-...-4efd307 Latest Latest
Warning

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

Go to latest
Published: May 2, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the postcategory type in the database.
	Label = "post_category"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldUpdatedAt holds the string denoting the updated_at field in the database.
	FieldUpdatedAt = "updated_at"
	// FieldCreatedAt holds the string denoting the created_at field in the database.
	FieldCreatedAt = "created_at"
	// FieldCategory holds the string denoting the category field in the database.
	FieldCategory = "category"
	// EdgePost holds the string denoting the post edge name in mutations.
	EdgePost = "post"
	// Table holds the table name of the postcategory in the database.
	Table = "post_categories"
	// PostTable is the table that holds the post relation/edge.
	PostTable = "post_categories"
	// PostInverseTable is the table name for the Post entity.
	// It exists in this package in order to avoid circular dependency with the "post" package.
	PostInverseTable = "posts"
	// PostColumn is the table column denoting the post relation/edge.
	PostColumn = "post_categories"
)

Variables

View Source
var (
	// DefaultUpdatedAt holds the default value on creation for the "updated_at" field.
	DefaultUpdatedAt func() time.Time
	// UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field.
	UpdateDefaultUpdatedAt func() time.Time
	// DefaultCreatedAt holds the default value on creation for the "created_at" field.
	DefaultCreatedAt func() time.Time
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() uuid.UUID
)

Columns holds all SQL columns for postcategory fields.

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

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

Functions

func And

func And(predicates ...predicate.PostCategory) predicate.PostCategory

And groups predicates with the AND operator between them.

func CategoryEQ

func CategoryEQ(v Category) predicate.PostCategory

CategoryEQ applies the EQ predicate on the "category" field.

func CategoryIn

func CategoryIn(vs ...Category) predicate.PostCategory

CategoryIn applies the In predicate on the "category" field.

func CategoryNEQ

func CategoryNEQ(v Category) predicate.PostCategory

CategoryNEQ applies the NEQ predicate on the "category" field.

func CategoryNotIn

func CategoryNotIn(vs ...Category) predicate.PostCategory

CategoryNotIn applies the NotIn predicate on the "category" field.

func CategoryValidator

func CategoryValidator(c Category) error

CategoryValidator is a validator for the "category" field enum values. It is called by the builders before save.

func CreatedAt

func CreatedAt(v time.Time) predicate.PostCategory

CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.PostCategory

CreatedAtEQ applies the EQ predicate on the "created_at" field.

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.PostCategory

CreatedAtGT applies the GT predicate on the "created_at" field.

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.PostCategory

CreatedAtGTE applies the GTE predicate on the "created_at" field.

func CreatedAtIn

func CreatedAtIn(vs ...time.Time) predicate.PostCategory

CreatedAtIn applies the In predicate on the "created_at" field.

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.PostCategory

CreatedAtLT applies the LT predicate on the "created_at" field.

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.PostCategory

CreatedAtLTE applies the LTE predicate on the "created_at" field.

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.PostCategory

CreatedAtNEQ applies the NEQ predicate on the "created_at" field.

func CreatedAtNotIn

func CreatedAtNotIn(vs ...time.Time) predicate.PostCategory

CreatedAtNotIn applies the NotIn predicate on the "created_at" field.

func HasPost

func HasPost() predicate.PostCategory

HasPost applies the HasEdge predicate on the "post" edge.

func HasPostWith

func HasPostWith(preds ...predicate.Post) predicate.PostCategory

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

func ID

ID filters vertices based on their ID field.

func IDEQ

IDEQ applies the EQ predicate on the ID field.

func IDGT

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id uuid.UUID) predicate.PostCategory

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...uuid.UUID) predicate.PostCategory

IDIn applies the In predicate on the ID field.

func IDLT

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id uuid.UUID) predicate.PostCategory

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id uuid.UUID) predicate.PostCategory

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...uuid.UUID) predicate.PostCategory

IDNotIn applies the NotIn predicate on the ID field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.PostCategory) predicate.PostCategory

Or groups predicates with the OR operator between them.

func UpdatedAt

func UpdatedAt(v time.Time) predicate.PostCategory

UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.PostCategory

UpdatedAtEQ applies the EQ predicate on the "updated_at" field.

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.PostCategory

UpdatedAtGT applies the GT predicate on the "updated_at" field.

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.PostCategory

UpdatedAtGTE applies the GTE predicate on the "updated_at" field.

func UpdatedAtIn

func UpdatedAtIn(vs ...time.Time) predicate.PostCategory

UpdatedAtIn applies the In predicate on the "updated_at" field.

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.PostCategory

UpdatedAtLT applies the LT predicate on the "updated_at" field.

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.PostCategory

UpdatedAtLTE applies the LTE predicate on the "updated_at" field.

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.PostCategory

UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.

func UpdatedAtNotIn

func UpdatedAtNotIn(vs ...time.Time) predicate.PostCategory

UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.

func ValidColumn

func ValidColumn(column string) bool

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

Types

type Category

type Category string

Category defines the type for the "category" enum field.

const (
	CategoryRANA              Category = "RANA"
	CategorySIN_SONIDO        Category = "SIN_SONIDO"
	CategoryMEME_ARTESANAL    Category = "MEME_ARTESANAL"
	CategoryNO_SE_YO          Category = "NO_SE_YO"
	CategoryORO               Category = "ORO"
	CategoryDIAMANTE          Category = "DIAMANTE"
	CategoryMEH               Category = "MEH"
	CategoryALERTA_GLONETILLO Category = "ALERTA_GLONETILLO"
	CategoryGRR               Category = "GRR"
	CategoryENSORDECEDOR      Category = "ENSORDECEDOR"
	CategoryRAGUUUL           Category = "RAGUUUL"
)

Category values.

func AllCategories

func AllCategories() []Category

AllCategories returns all Category values.

func (Category) MarshalGQL

func (e Category) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (Category) String

func (c Category) String() string

func (*Category) UnmarshalGQL

func (e *Category) UnmarshalGQL(val interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the PostCategory queries.

func ByCategory

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

ByCategory orders the results by the category field.

func ByCreatedAt

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

ByCreatedAt orders the results by the created_at field.

func ByID

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

ByID orders the results by the id field.

func ByPostField

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

ByPostField orders the results by post field.

func ByUpdatedAt

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

ByUpdatedAt orders the results by the updated_at field.

Jump to

Keyboard shortcuts

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