like

package
v0.0.0-...-a3ae2fd Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the like type in the database.
	Label = "like"
	// FieldCreateTime holds the string denoting the create_time field in the database.
	FieldCreateTime = "create_time"
	// FieldUpdateTime holds the string denoting the update_time field in the database.
	FieldUpdateTime = "update_time"
	// FieldLikedAt holds the string denoting the liked_at field in the database.
	FieldLikedAt = "liked_at"
	// FieldUserID holds the string denoting the user_id field in the database.
	FieldUserID = "user_id"
	// FieldTweetID holds the string denoting the tweet_id field in the database.
	FieldTweetID = "tweet_id"
	// EdgeUser holds the string denoting the user edge name in mutations.
	EdgeUser = "user"
	// EdgeTweet holds the string denoting the tweet edge name in mutations.
	EdgeTweet = "tweet"
	// UserFieldID holds the string denoting the ID field of the User.
	UserFieldID = "id"
	// TweetFieldID holds the string denoting the ID field of the Tweet.
	TweetFieldID = "id"
	// Table holds the table name of the like in the database.
	Table = "likes"
	// UserTable is the table that holds the user relation/edge.
	UserTable = "likes"
	// 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_id"
	// TweetTable is the table that holds the tweet relation/edge.
	TweetTable = "likes"
	// TweetInverseTable is the table name for the Tweet entity.
	// It exists in this package in order to avoid circular dependency with the "tweet" package.
	TweetInverseTable = "tweets"
	// TweetColumn is the table column denoting the tweet relation/edge.
	TweetColumn = "tweet_id"
)

Variables

View Source
var (
	Hooks  [1]ent.Hook
	Policy ent.Policy
	// DefaultCreateTime holds the default value on creation for the "create_time" field.
	DefaultCreateTime func() time.Time
	// DefaultUpdateTime holds the default value on creation for the "update_time" field.
	DefaultUpdateTime func() time.Time
	// UpdateDefaultUpdateTime holds the default value on update for the "update_time" field.
	UpdateDefaultUpdateTime func() time.Time
	// DefaultLikedAt holds the default value on creation for the "liked_at" field.
	DefaultLikedAt func() time.Time
)

Note that the variables below are initialized by the runtime package on the initialization of the application. Therefore, it should be imported in the main as follows:

import _ "github.com/lrstanley/ent-bug-edge-schema/internal/database/ent/runtime"

Columns holds all SQL columns for like fields.

Functions

func And

func And(predicates ...predicate.Like) predicate.Like

And groups predicates with the AND operator between them.

func CreateTime

func CreateTime(v time.Time) predicate.Like

CreateTime applies equality check predicate on the "create_time" field. It's identical to CreateTimeEQ.

func CreateTimeEQ

func CreateTimeEQ(v time.Time) predicate.Like

CreateTimeEQ applies the EQ predicate on the "create_time" field.

func CreateTimeGT

func CreateTimeGT(v time.Time) predicate.Like

CreateTimeGT applies the GT predicate on the "create_time" field.

func CreateTimeGTE

func CreateTimeGTE(v time.Time) predicate.Like

CreateTimeGTE applies the GTE predicate on the "create_time" field.

func CreateTimeIn

func CreateTimeIn(vs ...time.Time) predicate.Like

CreateTimeIn applies the In predicate on the "create_time" field.

func CreateTimeLT

func CreateTimeLT(v time.Time) predicate.Like

CreateTimeLT applies the LT predicate on the "create_time" field.

func CreateTimeLTE

func CreateTimeLTE(v time.Time) predicate.Like

CreateTimeLTE applies the LTE predicate on the "create_time" field.

func CreateTimeNEQ

func CreateTimeNEQ(v time.Time) predicate.Like

CreateTimeNEQ applies the NEQ predicate on the "create_time" field.

func CreateTimeNotIn

func CreateTimeNotIn(vs ...time.Time) predicate.Like

CreateTimeNotIn applies the NotIn predicate on the "create_time" field.

func HasTweet

func HasTweet() predicate.Like

HasTweet applies the HasEdge predicate on the "tweet" edge.

func HasTweetWith

func HasTweetWith(preds ...predicate.Tweet) predicate.Like

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

func HasUser

func HasUser() predicate.Like

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

func HasUserWith

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

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

func LikedAt

func LikedAt(v time.Time) predicate.Like

LikedAt applies equality check predicate on the "liked_at" field. It's identical to LikedAtEQ.

func LikedAtEQ

func LikedAtEQ(v time.Time) predicate.Like

LikedAtEQ applies the EQ predicate on the "liked_at" field.

func LikedAtGT

func LikedAtGT(v time.Time) predicate.Like

LikedAtGT applies the GT predicate on the "liked_at" field.

func LikedAtGTE

func LikedAtGTE(v time.Time) predicate.Like

LikedAtGTE applies the GTE predicate on the "liked_at" field.

func LikedAtIn

func LikedAtIn(vs ...time.Time) predicate.Like

LikedAtIn applies the In predicate on the "liked_at" field.

func LikedAtLT

func LikedAtLT(v time.Time) predicate.Like

LikedAtLT applies the LT predicate on the "liked_at" field.

func LikedAtLTE

func LikedAtLTE(v time.Time) predicate.Like

LikedAtLTE applies the LTE predicate on the "liked_at" field.

func LikedAtNEQ

func LikedAtNEQ(v time.Time) predicate.Like

LikedAtNEQ applies the NEQ predicate on the "liked_at" field.

func LikedAtNotIn

func LikedAtNotIn(vs ...time.Time) predicate.Like

LikedAtNotIn applies the NotIn predicate on the "liked_at" field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Like) predicate.Like

Or groups predicates with the OR operator between them.

func TweetID

func TweetID(v int) predicate.Like

TweetID applies equality check predicate on the "tweet_id" field. It's identical to TweetIDEQ.

func TweetIDEQ

func TweetIDEQ(v int) predicate.Like

TweetIDEQ applies the EQ predicate on the "tweet_id" field.

func TweetIDIn

func TweetIDIn(vs ...int) predicate.Like

TweetIDIn applies the In predicate on the "tweet_id" field.

func TweetIDNEQ

func TweetIDNEQ(v int) predicate.Like

TweetIDNEQ applies the NEQ predicate on the "tweet_id" field.

func TweetIDNotIn

func TweetIDNotIn(vs ...int) predicate.Like

TweetIDNotIn applies the NotIn predicate on the "tweet_id" field.

func UpdateTime

func UpdateTime(v time.Time) predicate.Like

UpdateTime applies equality check predicate on the "update_time" field. It's identical to UpdateTimeEQ.

func UpdateTimeEQ

func UpdateTimeEQ(v time.Time) predicate.Like

UpdateTimeEQ applies the EQ predicate on the "update_time" field.

func UpdateTimeGT

func UpdateTimeGT(v time.Time) predicate.Like

UpdateTimeGT applies the GT predicate on the "update_time" field.

func UpdateTimeGTE

func UpdateTimeGTE(v time.Time) predicate.Like

UpdateTimeGTE applies the GTE predicate on the "update_time" field.

func UpdateTimeIn

func UpdateTimeIn(vs ...time.Time) predicate.Like

UpdateTimeIn applies the In predicate on the "update_time" field.

func UpdateTimeLT

func UpdateTimeLT(v time.Time) predicate.Like

UpdateTimeLT applies the LT predicate on the "update_time" field.

func UpdateTimeLTE

func UpdateTimeLTE(v time.Time) predicate.Like

UpdateTimeLTE applies the LTE predicate on the "update_time" field.

func UpdateTimeNEQ

func UpdateTimeNEQ(v time.Time) predicate.Like

UpdateTimeNEQ applies the NEQ predicate on the "update_time" field.

func UpdateTimeNotIn

func UpdateTimeNotIn(vs ...time.Time) predicate.Like

UpdateTimeNotIn applies the NotIn predicate on the "update_time" field.

func UserID

func UserID(v int) predicate.Like

UserID applies equality check predicate on the "user_id" field. It's identical to UserIDEQ.

func UserIDEQ

func UserIDEQ(v int) predicate.Like

UserIDEQ applies the EQ predicate on the "user_id" field.

func UserIDIn

func UserIDIn(vs ...int) predicate.Like

UserIDIn applies the In predicate on the "user_id" field.

func UserIDNEQ

func UserIDNEQ(v int) predicate.Like

UserIDNEQ applies the NEQ predicate on the "user_id" field.

func UserIDNotIn

func UserIDNotIn(vs ...int) predicate.Like

UserIDNotIn applies the NotIn predicate on the "user_id" field.

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

func ByCreateTime

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

ByCreateTime orders the results by the create_time field.

func ByLikedAt

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

ByLikedAt orders the results by the liked_at field.

func ByTweetField

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

ByTweetField orders the results by tweet field.

func ByTweetID

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

ByTweetID orders the results by the tweet_id field.

func ByUpdateTime

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

ByUpdateTime orders the results by the update_time field.

func ByUserField

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

ByUserField orders the results by user field.

func ByUserID

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

ByUserID orders the results by the user_id field.

Jump to

Keyboard shortcuts

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