tweet

package
v0.11.10 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the tweet type in the database.
	Label = "tweet"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldText holds the string denoting the text field in the database.
	FieldText = "text"
	// EdgeLikedUsers holds the string denoting the liked_users edge name in mutations.
	EdgeLikedUsers = "liked_users"
	// EdgeUser holds the string denoting the user edge name in mutations.
	EdgeUser = "user"
	// EdgeTags holds the string denoting the tags edge name in mutations.
	EdgeTags = "tags"
	// EdgeLikes holds the string denoting the likes edge name in mutations.
	EdgeLikes = "likes"
	// EdgeTweetUser holds the string denoting the tweet_user edge name in mutations.
	EdgeTweetUser = "tweet_user"
	// EdgeTweetTags holds the string denoting the tweet_tags edge name in mutations.
	EdgeTweetTags = "tweet_tags"
	// Table holds the table name of the tweet in the database.
	Table = "tweets"
	// LikedUsersTable is the table that holds the liked_users relation/edge. The primary key declared below.
	LikedUsersTable = "tweet_likes"
	// LikedUsersInverseTable is the table name for the User entity.
	// It exists in this package in order to avoid circular dependency with the "user" package.
	LikedUsersInverseTable = "users"
	// UserTable is the table that holds the user relation/edge. The primary key declared below.
	UserTable = "user_tweets"
	// 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"
	// TagsTable is the table that holds the tags relation/edge. The primary key declared below.
	TagsTable = "tweet_tags"
	// TagsInverseTable is the table name for the Tag entity.
	// It exists in this package in order to avoid circular dependency with the "tag" package.
	TagsInverseTable = "tags"
	// LikesTable is the table that holds the likes relation/edge.
	LikesTable = "tweet_likes"
	// LikesInverseTable is the table name for the TweetLike entity.
	// It exists in this package in order to avoid circular dependency with the "tweetlike" package.
	LikesInverseTable = "tweet_likes"
	// LikesColumn is the table column denoting the likes relation/edge.
	LikesColumn = "tweet_id"
	// TweetUserTable is the table that holds the tweet_user relation/edge.
	TweetUserTable = "user_tweets"
	// TweetUserInverseTable is the table name for the UserTweet entity.
	// It exists in this package in order to avoid circular dependency with the "usertweet" package.
	TweetUserInverseTable = "user_tweets"
	// TweetUserColumn is the table column denoting the tweet_user relation/edge.
	TweetUserColumn = "tweet_id"
	// TweetTagsTable is the table that holds the tweet_tags relation/edge.
	TweetTagsTable = "tweet_tags"
	// TweetTagsInverseTable is the table name for the TweetTag entity.
	// It exists in this package in order to avoid circular dependency with the "tweettag" package.
	TweetTagsInverseTable = "tweet_tags"
	// TweetTagsColumn is the table column denoting the tweet_tags relation/edge.
	TweetTagsColumn = "tweet_id"
)

Variables

View Source
var (
	// LikedUsersPrimaryKey and LikedUsersColumn2 are the table columns denoting the
	// primary key for the liked_users relation (M2M).
	LikedUsersPrimaryKey = []string{"user_id", "tweet_id"}
	// UserPrimaryKey and UserColumn2 are the table columns denoting the
	// primary key for the user relation (M2M).
	UserPrimaryKey = []string{"user_id", "tweet_id"}
	// TagsPrimaryKey and TagsColumn2 are the table columns denoting the
	// primary key for the tags relation (M2M).
	TagsPrimaryKey = []string{"tag_id", "tweet_id"}
)
View Source
var Columns = []string{
	FieldID,
	FieldText,
}

Columns holds all SQL columns for tweet fields.

Functions

func And

func And(predicates ...predicate.Tweet) predicate.Tweet

And groups predicates with the AND operator between them.

func HasLikedUsers

func HasLikedUsers() predicate.Tweet

HasLikedUsers applies the HasEdge predicate on the "liked_users" edge.

func HasLikedUsersWith

func HasLikedUsersWith(preds ...predicate.User) predicate.Tweet

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

func HasLikes

func HasLikes() predicate.Tweet

HasLikes applies the HasEdge predicate on the "likes" edge.

func HasLikesWith

func HasLikesWith(preds ...predicate.TweetLike) predicate.Tweet

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

func HasTags

func HasTags() predicate.Tweet

HasTags applies the HasEdge predicate on the "tags" edge.

func HasTagsWith

func HasTagsWith(preds ...predicate.Tag) predicate.Tweet

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

func HasTweetTags

func HasTweetTags() predicate.Tweet

HasTweetTags applies the HasEdge predicate on the "tweet_tags" edge.

func HasTweetTagsWith

func HasTweetTagsWith(preds ...predicate.TweetTag) predicate.Tweet

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

func HasTweetUser

func HasTweetUser() predicate.Tweet

HasTweetUser applies the HasEdge predicate on the "tweet_user" edge.

func HasTweetUserWith

func HasTweetUserWith(preds ...predicate.UserTweet) predicate.Tweet

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

func HasUser

func HasUser() predicate.Tweet

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

func HasUserWith

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

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

func ID

func ID(id int) predicate.Tweet

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Tweet

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Tweet

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Tweet

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Tweet

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Tweet

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Tweet

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

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

Or groups predicates with the OR operator between them.

func Text

func Text(v string) predicate.Tweet

Text applies equality check predicate on the "text" field. It's identical to TextEQ.

func TextContains

func TextContains(v string) predicate.Tweet

TextContains applies the Contains predicate on the "text" field.

func TextContainsFold

func TextContainsFold(v string) predicate.Tweet

TextContainsFold applies the ContainsFold predicate on the "text" field.

func TextEQ

func TextEQ(v string) predicate.Tweet

TextEQ applies the EQ predicate on the "text" field.

func TextEqualFold

func TextEqualFold(v string) predicate.Tweet

TextEqualFold applies the EqualFold predicate on the "text" field.

func TextGT

func TextGT(v string) predicate.Tweet

TextGT applies the GT predicate on the "text" field.

func TextGTE

func TextGTE(v string) predicate.Tweet

TextGTE applies the GTE predicate on the "text" field.

func TextHasPrefix

func TextHasPrefix(v string) predicate.Tweet

TextHasPrefix applies the HasPrefix predicate on the "text" field.

func TextHasSuffix

func TextHasSuffix(v string) predicate.Tweet

TextHasSuffix applies the HasSuffix predicate on the "text" field.

func TextIn

func TextIn(vs ...string) predicate.Tweet

TextIn applies the In predicate on the "text" field.

func TextLT

func TextLT(v string) predicate.Tweet

TextLT applies the LT predicate on the "text" field.

func TextLTE

func TextLTE(v string) predicate.Tweet

TextLTE applies the LTE predicate on the "text" field.

func TextNEQ

func TextNEQ(v string) predicate.Tweet

TextNEQ applies the NEQ predicate on the "text" field.

func TextNotIn

func TextNotIn(vs ...string) predicate.Tweet

TextNotIn applies the NotIn predicate on the "text" field.

func ValidColumn

func ValidColumn(column string) bool

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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