shitpost

package
v0.0.0-...-9f24b57 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the shitpost type in the database.
	Label = "shitpost"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldChannelID holds the string denoting the channel_id field in the database.
	FieldChannelID = "channel_id"
	// FieldCount holds the string denoting the count field in the database.
	FieldCount = "count"
	// EdgeUser holds the string denoting the user edge name in mutations.
	EdgeUser = "user"
	// Table holds the table name of the shitpost in the database.
	Table = "shitposts"
	// UserTable is the table that holds the user relation/edge.
	UserTable = "shitposts"
	// UserInverseTable is the table name for the User entity.
	// It exists in this package in order to avoid circular dependency with the "user" package.
	UserInverseTable = "users"
	// UserColumn is the table column denoting the user relation/edge.
	UserColumn = "user_shitposts"
)

Variables

View Source
var (
	// ChannelIDValidator is a validator for the "channel_id" field. It is called by the builders before save.
	ChannelIDValidator func(string) error
	// IDValidator is a validator for the "id" field. It is called by the builders before save.
	IDValidator func(string) error
)

Columns holds all SQL columns for shitpost fields.

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

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

Functions

func And

func And(predicates ...predicate.Shitpost) predicate.Shitpost

And groups predicates with the AND operator between them.

func ChannelID

func ChannelID(v string) predicate.Shitpost

ChannelID applies equality check predicate on the "channel_id" field. It's identical to ChannelIDEQ.

func ChannelIDContains

func ChannelIDContains(v string) predicate.Shitpost

ChannelIDContains applies the Contains predicate on the "channel_id" field.

func ChannelIDContainsFold

func ChannelIDContainsFold(v string) predicate.Shitpost

ChannelIDContainsFold applies the ContainsFold predicate on the "channel_id" field.

func ChannelIDEQ

func ChannelIDEQ(v string) predicate.Shitpost

ChannelIDEQ applies the EQ predicate on the "channel_id" field.

func ChannelIDEqualFold

func ChannelIDEqualFold(v string) predicate.Shitpost

ChannelIDEqualFold applies the EqualFold predicate on the "channel_id" field.

func ChannelIDGT

func ChannelIDGT(v string) predicate.Shitpost

ChannelIDGT applies the GT predicate on the "channel_id" field.

func ChannelIDGTE

func ChannelIDGTE(v string) predicate.Shitpost

ChannelIDGTE applies the GTE predicate on the "channel_id" field.

func ChannelIDHasPrefix

func ChannelIDHasPrefix(v string) predicate.Shitpost

ChannelIDHasPrefix applies the HasPrefix predicate on the "channel_id" field.

func ChannelIDHasSuffix

func ChannelIDHasSuffix(v string) predicate.Shitpost

ChannelIDHasSuffix applies the HasSuffix predicate on the "channel_id" field.

func ChannelIDIn

func ChannelIDIn(vs ...string) predicate.Shitpost

ChannelIDIn applies the In predicate on the "channel_id" field.

func ChannelIDLT

func ChannelIDLT(v string) predicate.Shitpost

ChannelIDLT applies the LT predicate on the "channel_id" field.

func ChannelIDLTE

func ChannelIDLTE(v string) predicate.Shitpost

ChannelIDLTE applies the LTE predicate on the "channel_id" field.

func ChannelIDNEQ

func ChannelIDNEQ(v string) predicate.Shitpost

ChannelIDNEQ applies the NEQ predicate on the "channel_id" field.

func ChannelIDNotIn

func ChannelIDNotIn(vs ...string) predicate.Shitpost

ChannelIDNotIn applies the NotIn predicate on the "channel_id" field.

func Count

func Count(v int) predicate.Shitpost

Count applies equality check predicate on the "count" field. It's identical to CountEQ.

func CountEQ

func CountEQ(v int) predicate.Shitpost

CountEQ applies the EQ predicate on the "count" field.

func CountGT

func CountGT(v int) predicate.Shitpost

CountGT applies the GT predicate on the "count" field.

func CountGTE

func CountGTE(v int) predicate.Shitpost

CountGTE applies the GTE predicate on the "count" field.

func CountIn

func CountIn(vs ...int) predicate.Shitpost

CountIn applies the In predicate on the "count" field.

func CountLT

func CountLT(v int) predicate.Shitpost

CountLT applies the LT predicate on the "count" field.

func CountLTE

func CountLTE(v int) predicate.Shitpost

CountLTE applies the LTE predicate on the "count" field.

func CountNEQ

func CountNEQ(v int) predicate.Shitpost

CountNEQ applies the NEQ predicate on the "count" field.

func CountNotIn

func CountNotIn(vs ...int) predicate.Shitpost

CountNotIn applies the NotIn predicate on the "count" field.

func HasUser

func HasUser() predicate.Shitpost

HasUser applies the HasEdge predicate on the "user" edge.

func HasUserWith

func HasUserWith(preds ...predicate.User) predicate.Shitpost

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

func ID

func ID(id string) predicate.Shitpost

ID filters vertices based on their ID field.

func IDContainsFold

func IDContainsFold(id string) predicate.Shitpost

IDContainsFold applies the ContainsFold predicate on the ID field.

func IDEQ

func IDEQ(id string) predicate.Shitpost

IDEQ applies the EQ predicate on the ID field.

func IDEqualFold

func IDEqualFold(id string) predicate.Shitpost

IDEqualFold applies the EqualFold predicate on the ID field.

func IDGT

func IDGT(id string) predicate.Shitpost

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id string) predicate.Shitpost

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...string) predicate.Shitpost

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id string) predicate.Shitpost

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id string) predicate.Shitpost

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id string) predicate.Shitpost

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...string) predicate.Shitpost

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.Shitpost) predicate.Shitpost

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 Shitpost queries.

func ByChannelID

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

ByChannelID orders the results by the channel_id field.

func ByCount

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

ByCount orders the results by the count field.

func ByID

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

ByID orders the results by the id field.

func ByUserField

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

ByUserField orders the results by user field.

Jump to

Keyboard shortcuts

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