Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.User) predicate.User
- func HasFriends() predicate.User
- func HasFriendsWith(preds ...predicate.User) predicate.User
- func HasFriendships() predicate.User
- func HasFriendshipsWith(preds ...predicate.Friendship) predicate.User
- func HasGroups() predicate.User
- func HasGroupsWith(preds ...predicate.Group) predicate.User
- func HasJoinedGroups() predicate.User
- func HasJoinedGroupsWith(preds ...predicate.UserGroup) predicate.User
- func HasLikedTweets() predicate.User
- func HasLikedTweetsWith(preds ...predicate.Tweet) predicate.User
- func HasLikes() predicate.User
- func HasLikesWith(preds ...predicate.TweetLike) predicate.User
- func HasRelationship() predicate.User
- func HasRelationshipWith(preds ...predicate.Relationship) predicate.User
- func HasRelatives() predicate.User
- func HasRelativesWith(preds ...predicate.User) predicate.User
- func HasRoles() predicate.User
- func HasRolesUsers() predicate.User
- func HasRolesUsersWith(preds ...predicate.RoleUser) predicate.User
- func HasRolesWith(preds ...predicate.Role) predicate.User
- func HasTweets() predicate.User
- func HasTweetsWith(preds ...predicate.Tweet) predicate.User
- func HasUserTweets() predicate.User
- func HasUserTweetsWith(preds ...predicate.UserTweet) predicate.User
- func ID(id int) predicate.User
- func IDEQ(id int) predicate.User
- func IDGT(id int) predicate.User
- func IDGTE(id int) predicate.User
- func IDIn(ids ...int) predicate.User
- func IDLT(id int) predicate.User
- func IDLTE(id int) predicate.User
- func IDNEQ(id int) predicate.User
- func IDNotIn(ids ...int) predicate.User
- func Name(v string) predicate.User
- func NameContains(v string) predicate.User
- func NameContainsFold(v string) predicate.User
- func NameEQ(v string) predicate.User
- func NameEqualFold(v string) predicate.User
- func NameGT(v string) predicate.User
- func NameGTE(v string) predicate.User
- func NameHasPrefix(v string) predicate.User
- func NameHasSuffix(v string) predicate.User
- func NameIn(vs ...string) predicate.User
- func NameLT(v string) predicate.User
- func NameLTE(v string) predicate.User
- func NameNEQ(v string) predicate.User
- func NameNotIn(vs ...string) predicate.User
- func Not(p predicate.User) predicate.User
- func Or(predicates ...predicate.User) predicate.User
- func ValidColumn(column string) bool
Constants ¶
const ( // Label holds the string label denoting the user type in the database. Label = "user" // FieldID holds the string denoting the id field in the database. FieldID = "id" // FieldName holds the string denoting the name field in the database. FieldName = "name" // EdgeGroups holds the string denoting the groups edge name in mutations. EdgeGroups = "groups" // EdgeFriends holds the string denoting the friends edge name in mutations. EdgeFriends = "friends" // EdgeRelatives holds the string denoting the relatives edge name in mutations. EdgeRelatives = "relatives" // EdgeLikedTweets holds the string denoting the liked_tweets edge name in mutations. EdgeLikedTweets = "liked_tweets" // EdgeTweets holds the string denoting the tweets edge name in mutations. EdgeTweets = "tweets" // EdgeRoles holds the string denoting the roles edge name in mutations. EdgeRoles = "roles" // EdgeJoinedGroups holds the string denoting the joined_groups edge name in mutations. EdgeJoinedGroups = "joined_groups" // EdgeFriendships holds the string denoting the friendships edge name in mutations. EdgeFriendships = "friendships" // EdgeRelationship holds the string denoting the relationship edge name in mutations. EdgeRelationship = "relationship" // EdgeLikes holds the string denoting the likes edge name in mutations. EdgeLikes = "likes" // EdgeUserTweets holds the string denoting the user_tweets edge name in mutations. EdgeUserTweets = "user_tweets" // EdgeRolesUsers holds the string denoting the roles_users edge name in mutations. EdgeRolesUsers = "roles_users" // Table holds the table name of the user in the database. Table = "users" // GroupsTable is the table that holds the groups relation/edge. The primary key declared below. GroupsTable = "user_groups" // GroupsInverseTable is the table name for the Group entity. // It exists in this package in order to avoid circular dependency with the "group" package. GroupsInverseTable = "groups" // FriendsTable is the table that holds the friends relation/edge. The primary key declared below. FriendsTable = "friendships" // RelativesTable is the table that holds the relatives relation/edge. The primary key declared below. RelativesTable = "relationships" // LikedTweetsTable is the table that holds the liked_tweets relation/edge. The primary key declared below. LikedTweetsTable = "tweet_likes" // LikedTweetsInverseTable is the table name for the Tweet entity. // It exists in this package in order to avoid circular dependency with the "tweet" package. LikedTweetsInverseTable = "tweets" // TweetsTable is the table that holds the tweets relation/edge. The primary key declared below. TweetsTable = "user_tweets" // TweetsInverseTable is the table name for the Tweet entity. // It exists in this package in order to avoid circular dependency with the "tweet" package. TweetsInverseTable = "tweets" // RolesTable is the table that holds the roles relation/edge. The primary key declared below. RolesTable = "role_users" // RolesInverseTable is the table name for the Role entity. // It exists in this package in order to avoid circular dependency with the "role" package. RolesInverseTable = "roles" // JoinedGroupsTable is the table that holds the joined_groups relation/edge. JoinedGroupsTable = "user_groups" // JoinedGroupsInverseTable is the table name for the UserGroup entity. // It exists in this package in order to avoid circular dependency with the "usergroup" package. JoinedGroupsInverseTable = "user_groups" // JoinedGroupsColumn is the table column denoting the joined_groups relation/edge. JoinedGroupsColumn = "user_id" // FriendshipsTable is the table that holds the friendships relation/edge. FriendshipsTable = "friendships" // FriendshipsInverseTable is the table name for the Friendship entity. // It exists in this package in order to avoid circular dependency with the "friendship" package. FriendshipsInverseTable = "friendships" // FriendshipsColumn is the table column denoting the friendships relation/edge. FriendshipsColumn = "user_id" // RelationshipTable is the table that holds the relationship relation/edge. RelationshipTable = "relationships" // RelationshipInverseTable is the table name for the Relationship entity. // It exists in this package in order to avoid circular dependency with the "relationship" package. RelationshipInverseTable = "relationships" // RelationshipColumn is the table column denoting the relationship relation/edge. RelationshipColumn = "user_id" // 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 = "user_id" // UserTweetsTable is the table that holds the user_tweets relation/edge. UserTweetsTable = "user_tweets" // UserTweetsInverseTable is the table name for the UserTweet entity. // It exists in this package in order to avoid circular dependency with the "usertweet" package. UserTweetsInverseTable = "user_tweets" // UserTweetsColumn is the table column denoting the user_tweets relation/edge. UserTweetsColumn = "user_id" // RolesUsersTable is the table that holds the roles_users relation/edge. RolesUsersTable = "role_users" // RolesUsersInverseTable is the table name for the RoleUser entity. // It exists in this package in order to avoid circular dependency with the "roleuser" package. RolesUsersInverseTable = "role_users" // RolesUsersColumn is the table column denoting the roles_users relation/edge. RolesUsersColumn = "user_id" )
Variables ¶
var ( // GroupsPrimaryKey and GroupsColumn2 are the table columns denoting the // primary key for the groups relation (M2M). GroupsPrimaryKey = []string{"user_id", "group_id"} // FriendsPrimaryKey and FriendsColumn2 are the table columns denoting the // primary key for the friends relation (M2M). FriendsPrimaryKey = []string{"user_id", "friend_id"} // RelativesPrimaryKey and RelativesColumn2 are the table columns denoting the // primary key for the relatives relation (M2M). RelativesPrimaryKey = []string{"user_id", "relative_id"} // LikedTweetsPrimaryKey and LikedTweetsColumn2 are the table columns denoting the // primary key for the liked_tweets relation (M2M). LikedTweetsPrimaryKey = []string{"user_id", "tweet_id"} // TweetsPrimaryKey and TweetsColumn2 are the table columns denoting the // primary key for the tweets relation (M2M). TweetsPrimaryKey = []string{"user_id", "tweet_id"} // RolesPrimaryKey and RolesColumn2 are the table columns denoting the // primary key for the roles relation (M2M). RolesPrimaryKey = []string{"user_id", "role_id"} )
var ( Hooks [1]ent.Hook Policy ent.Policy // DefaultName holds the default value on creation for the "name" field. DefaultName string )
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 _ "entgo.io/ent/entc/integration/edgeschema/ent/runtime"
var Columns = []string{ FieldID, FieldName, }
Columns holds all SQL columns for user fields.
Functions ¶
func HasFriends ¶
HasFriends applies the HasEdge predicate on the "friends" edge.
func HasFriendsWith ¶
HasFriendsWith applies the HasEdge predicate on the "friends" edge with a given conditions (other predicates).
func HasFriendships ¶
HasFriendships applies the HasEdge predicate on the "friendships" edge.
func HasFriendshipsWith ¶
func HasFriendshipsWith(preds ...predicate.Friendship) predicate.User
HasFriendshipsWith applies the HasEdge predicate on the "friendships" edge with a given conditions (other predicates).
func HasGroupsWith ¶
HasGroupsWith applies the HasEdge predicate on the "groups" edge with a given conditions (other predicates).
func HasJoinedGroups ¶
HasJoinedGroups applies the HasEdge predicate on the "joined_groups" edge.
func HasJoinedGroupsWith ¶
HasJoinedGroupsWith applies the HasEdge predicate on the "joined_groups" edge with a given conditions (other predicates).
func HasLikedTweets ¶
HasLikedTweets applies the HasEdge predicate on the "liked_tweets" edge.
func HasLikedTweetsWith ¶
HasLikedTweetsWith applies the HasEdge predicate on the "liked_tweets" edge with a given conditions (other predicates).
func HasLikesWith ¶
HasLikesWith applies the HasEdge predicate on the "likes" edge with a given conditions (other predicates).
func HasRelationship ¶
HasRelationship applies the HasEdge predicate on the "relationship" edge.
func HasRelationshipWith ¶
func HasRelationshipWith(preds ...predicate.Relationship) predicate.User
HasRelationshipWith applies the HasEdge predicate on the "relationship" edge with a given conditions (other predicates).
func HasRelatives ¶
HasRelatives applies the HasEdge predicate on the "relatives" edge.
func HasRelativesWith ¶
HasRelativesWith applies the HasEdge predicate on the "relatives" edge with a given conditions (other predicates).
func HasRolesUsers ¶ added in v0.11.1
HasRolesUsers applies the HasEdge predicate on the "roles_users" edge.
func HasRolesUsersWith ¶ added in v0.11.1
HasRolesUsersWith applies the HasEdge predicate on the "roles_users" edge with a given conditions (other predicates).
func HasRolesWith ¶ added in v0.11.1
HasRolesWith applies the HasEdge predicate on the "roles" edge with a given conditions (other predicates).
func HasTweetsWith ¶
HasTweetsWith applies the HasEdge predicate on the "tweets" edge with a given conditions (other predicates).
func HasUserTweets ¶
HasUserTweets applies the HasEdge predicate on the "user_tweets" edge.
func HasUserTweetsWith ¶
HasUserTweetsWith applies the HasEdge predicate on the "user_tweets" edge with a given conditions (other predicates).
func NameContains ¶
NameContains applies the Contains predicate on the "name" field.
func NameContainsFold ¶
NameContainsFold applies the ContainsFold predicate on the "name" field.
func NameEqualFold ¶
NameEqualFold applies the EqualFold predicate on the "name" field.
func NameHasPrefix ¶
NameHasPrefix applies the HasPrefix predicate on the "name" field.
func NameHasSuffix ¶
NameHasSuffix applies the HasSuffix predicate on the "name" field.
func ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).
Types ¶
This section is empty.