vote

package
v0.0.0-...-cdb1537 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the vote type in the database.
	Label = "vote"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldSelection holds the string denoting the selection field in the database.
	FieldSelection = "selection"
	// FieldRank holds the string denoting the rank field in the database.
	FieldRank = "rank"
	// FieldVoteID holds the string denoting the vote_id field in the database.
	FieldVoteID = "vote_id"
	// EdgeUser holds the string denoting the user edge name in mutations.
	EdgeUser = "user"
	// Table holds the table name of the vote in the database.
	Table = "votes"
	// UserTable is the table that holds the user relation/edge.
	UserTable = "votes"
	// 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_votes"
)

Variables

View Source
var (
	// SelectionValidator is a validator for the "selection" field. It is called by the builders before save.
	SelectionValidator func(string) error
	// RankValidator is a validator for the "rank" field. It is called by the builders before save.
	RankValidator func(int) error
	// VoteIDValidator is a validator for the "vote_id" field. It is called by the builders before save.
	VoteIDValidator func(string) error
)

Columns holds all SQL columns for vote fields.

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

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

Functions

func And

func And(predicates ...predicate.Vote) predicate.Vote

And groups predicates with the AND operator between them.

func HasUser

func HasUser() predicate.Vote

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

func HasUserWith

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

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

func ID

func ID(id int) predicate.Vote

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Vote

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Vote

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Vote

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Vote

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Vote

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Vote

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

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

Or groups predicates with the OR operator between them.

func Rank

func Rank(v int) predicate.Vote

Rank applies equality check predicate on the "rank" field. It's identical to RankEQ.

func RankEQ

func RankEQ(v int) predicate.Vote

RankEQ applies the EQ predicate on the "rank" field.

func RankGT

func RankGT(v int) predicate.Vote

RankGT applies the GT predicate on the "rank" field.

func RankGTE

func RankGTE(v int) predicate.Vote

RankGTE applies the GTE predicate on the "rank" field.

func RankIn

func RankIn(vs ...int) predicate.Vote

RankIn applies the In predicate on the "rank" field.

func RankLT

func RankLT(v int) predicate.Vote

RankLT applies the LT predicate on the "rank" field.

func RankLTE

func RankLTE(v int) predicate.Vote

RankLTE applies the LTE predicate on the "rank" field.

func RankNEQ

func RankNEQ(v int) predicate.Vote

RankNEQ applies the NEQ predicate on the "rank" field.

func RankNotIn

func RankNotIn(vs ...int) predicate.Vote

RankNotIn applies the NotIn predicate on the "rank" field.

func Selection

func Selection(v string) predicate.Vote

Selection applies equality check predicate on the "selection" field. It's identical to SelectionEQ.

func SelectionContains

func SelectionContains(v string) predicate.Vote

SelectionContains applies the Contains predicate on the "selection" field.

func SelectionContainsFold

func SelectionContainsFold(v string) predicate.Vote

SelectionContainsFold applies the ContainsFold predicate on the "selection" field.

func SelectionEQ

func SelectionEQ(v string) predicate.Vote

SelectionEQ applies the EQ predicate on the "selection" field.

func SelectionEqualFold

func SelectionEqualFold(v string) predicate.Vote

SelectionEqualFold applies the EqualFold predicate on the "selection" field.

func SelectionGT

func SelectionGT(v string) predicate.Vote

SelectionGT applies the GT predicate on the "selection" field.

func SelectionGTE

func SelectionGTE(v string) predicate.Vote

SelectionGTE applies the GTE predicate on the "selection" field.

func SelectionHasPrefix

func SelectionHasPrefix(v string) predicate.Vote

SelectionHasPrefix applies the HasPrefix predicate on the "selection" field.

func SelectionHasSuffix

func SelectionHasSuffix(v string) predicate.Vote

SelectionHasSuffix applies the HasSuffix predicate on the "selection" field.

func SelectionIn

func SelectionIn(vs ...string) predicate.Vote

SelectionIn applies the In predicate on the "selection" field.

func SelectionLT

func SelectionLT(v string) predicate.Vote

SelectionLT applies the LT predicate on the "selection" field.

func SelectionLTE

func SelectionLTE(v string) predicate.Vote

SelectionLTE applies the LTE predicate on the "selection" field.

func SelectionNEQ

func SelectionNEQ(v string) predicate.Vote

SelectionNEQ applies the NEQ predicate on the "selection" field.

func SelectionNotIn

func SelectionNotIn(vs ...string) predicate.Vote

SelectionNotIn applies the NotIn predicate on the "selection" field.

func ValidColumn

func ValidColumn(column string) bool

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

func VoteID

func VoteID(v string) predicate.Vote

VoteID applies equality check predicate on the "vote_id" field. It's identical to VoteIDEQ.

func VoteIDContains

func VoteIDContains(v string) predicate.Vote

VoteIDContains applies the Contains predicate on the "vote_id" field.

func VoteIDContainsFold

func VoteIDContainsFold(v string) predicate.Vote

VoteIDContainsFold applies the ContainsFold predicate on the "vote_id" field.

func VoteIDEQ

func VoteIDEQ(v string) predicate.Vote

VoteIDEQ applies the EQ predicate on the "vote_id" field.

func VoteIDEqualFold

func VoteIDEqualFold(v string) predicate.Vote

VoteIDEqualFold applies the EqualFold predicate on the "vote_id" field.

func VoteIDGT

func VoteIDGT(v string) predicate.Vote

VoteIDGT applies the GT predicate on the "vote_id" field.

func VoteIDGTE

func VoteIDGTE(v string) predicate.Vote

VoteIDGTE applies the GTE predicate on the "vote_id" field.

func VoteIDHasPrefix

func VoteIDHasPrefix(v string) predicate.Vote

VoteIDHasPrefix applies the HasPrefix predicate on the "vote_id" field.

func VoteIDHasSuffix

func VoteIDHasSuffix(v string) predicate.Vote

VoteIDHasSuffix applies the HasSuffix predicate on the "vote_id" field.

func VoteIDIn

func VoteIDIn(vs ...string) predicate.Vote

VoteIDIn applies the In predicate on the "vote_id" field.

func VoteIDLT

func VoteIDLT(v string) predicate.Vote

VoteIDLT applies the LT predicate on the "vote_id" field.

func VoteIDLTE

func VoteIDLTE(v string) predicate.Vote

VoteIDLTE applies the LTE predicate on the "vote_id" field.

func VoteIDNEQ

func VoteIDNEQ(v string) predicate.Vote

VoteIDNEQ applies the NEQ predicate on the "vote_id" field.

func VoteIDNotIn

func VoteIDNotIn(vs ...string) predicate.Vote

VoteIDNotIn applies the NotIn predicate on the "vote_id" field.

Types

type OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the Vote queries.

func ByID

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

ByID orders the results by the id field.

func ByRank

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

ByRank orders the results by the rank field.

func BySelection

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

BySelection orders the results by the selection field.

func ByUserField

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

ByUserField orders the results by user field.

func ByVoteID

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

ByVoteID orders the results by the vote_id field.

Jump to

Keyboard shortcuts

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