Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Friendship) predicate.Friendship
- func CreatedAt(v time.Time) predicate.Friendship
- func CreatedAtEQ(v time.Time) predicate.Friendship
- func CreatedAtGT(v time.Time) predicate.Friendship
- func CreatedAtGTE(v time.Time) predicate.Friendship
- func CreatedAtIn(vs ...time.Time) predicate.Friendship
- func CreatedAtLT(v time.Time) predicate.Friendship
- func CreatedAtLTE(v time.Time) predicate.Friendship
- func CreatedAtNEQ(v time.Time) predicate.Friendship
- func CreatedAtNotIn(vs ...time.Time) predicate.Friendship
- func FriendID(v pulid.ID) predicate.Friendship
- func FriendIDContains(v pulid.ID) predicate.Friendship
- func FriendIDContainsFold(v pulid.ID) predicate.Friendship
- func FriendIDEQ(v pulid.ID) predicate.Friendship
- func FriendIDEqualFold(v pulid.ID) predicate.Friendship
- func FriendIDGT(v pulid.ID) predicate.Friendship
- func FriendIDGTE(v pulid.ID) predicate.Friendship
- func FriendIDHasPrefix(v pulid.ID) predicate.Friendship
- func FriendIDHasSuffix(v pulid.ID) predicate.Friendship
- func FriendIDIn(vs ...pulid.ID) predicate.Friendship
- func FriendIDLT(v pulid.ID) predicate.Friendship
- func FriendIDLTE(v pulid.ID) predicate.Friendship
- func FriendIDNEQ(v pulid.ID) predicate.Friendship
- func FriendIDNotIn(vs ...pulid.ID) predicate.Friendship
- func HasFriend() predicate.Friendship
- func HasFriendWith(preds ...predicate.User) predicate.Friendship
- func HasUser() predicate.Friendship
- func HasUserWith(preds ...predicate.User) predicate.Friendship
- func ID(id pulid.ID) predicate.Friendship
- func IDEQ(id pulid.ID) predicate.Friendship
- func IDGT(id pulid.ID) predicate.Friendship
- func IDGTE(id pulid.ID) predicate.Friendship
- func IDIn(ids ...pulid.ID) predicate.Friendship
- func IDLT(id pulid.ID) predicate.Friendship
- func IDLTE(id pulid.ID) predicate.Friendship
- func IDNEQ(id pulid.ID) predicate.Friendship
- func IDNotIn(ids ...pulid.ID) predicate.Friendship
- func Not(p predicate.Friendship) predicate.Friendship
- func Or(predicates ...predicate.Friendship) predicate.Friendship
- func UserID(v pulid.ID) predicate.Friendship
- func UserIDContains(v pulid.ID) predicate.Friendship
- func UserIDContainsFold(v pulid.ID) predicate.Friendship
- func UserIDEQ(v pulid.ID) predicate.Friendship
- func UserIDEqualFold(v pulid.ID) predicate.Friendship
- func UserIDGT(v pulid.ID) predicate.Friendship
- func UserIDGTE(v pulid.ID) predicate.Friendship
- func UserIDHasPrefix(v pulid.ID) predicate.Friendship
- func UserIDHasSuffix(v pulid.ID) predicate.Friendship
- func UserIDIn(vs ...pulid.ID) predicate.Friendship
- func UserIDLT(v pulid.ID) predicate.Friendship
- func UserIDLTE(v pulid.ID) predicate.Friendship
- func UserIDNEQ(v pulid.ID) predicate.Friendship
- func UserIDNotIn(vs ...pulid.ID) predicate.Friendship
- func ValidColumn(column string) bool
- type OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByFriendField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByFriendID(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByUserField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByUserID(opts ...sql.OrderTermOption) OrderOption
Constants ¶
const ( // Label holds the string label denoting the friendship type in the database. Label = "friendship" // FieldID holds the string denoting the id field in the database. FieldID = "id" // FieldCreatedAt holds the string denoting the created_at field in the database. FieldCreatedAt = "created_at" // FieldUserID holds the string denoting the user_id field in the database. FieldUserID = "user_id" // FieldFriendID holds the string denoting the friend_id field in the database. FieldFriendID = "friend_id" // EdgeUser holds the string denoting the user edge name in mutations. EdgeUser = "user" // EdgeFriend holds the string denoting the friend edge name in mutations. EdgeFriend = "friend" // Table holds the table name of the friendship in the database. Table = "friendships" // UserTable is the table that holds the user relation/edge. UserTable = "friendships" // 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" // FriendTable is the table that holds the friend relation/edge. FriendTable = "friendships" // FriendInverseTable is the table name for the User entity. // It exists in this package in order to avoid circular dependency with the "user" package. FriendInverseTable = "users" // FriendColumn is the table column denoting the friend relation/edge. FriendColumn = "friend_id" )
Variables ¶
var ( // DefaultCreatedAt holds the default value on creation for the "created_at" field. DefaultCreatedAt func() time.Time // DefaultID holds the default value on creation for the "id" field. DefaultID func() pulid.ID )
var Columns = []string{ FieldID, FieldCreatedAt, FieldUserID, FieldFriendID, }
Columns holds all SQL columns for friendship fields.
Functions ¶
func And ¶
func And(predicates ...predicate.Friendship) predicate.Friendship
And groups predicates with the AND operator between them.
func CreatedAt ¶
func CreatedAt(v time.Time) predicate.Friendship
CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
func CreatedAtEQ ¶
func CreatedAtEQ(v time.Time) predicate.Friendship
CreatedAtEQ applies the EQ predicate on the "created_at" field.
func CreatedAtGT ¶
func CreatedAtGT(v time.Time) predicate.Friendship
CreatedAtGT applies the GT predicate on the "created_at" field.
func CreatedAtGTE ¶
func CreatedAtGTE(v time.Time) predicate.Friendship
CreatedAtGTE applies the GTE predicate on the "created_at" field.
func CreatedAtIn ¶
func CreatedAtIn(vs ...time.Time) predicate.Friendship
CreatedAtIn applies the In predicate on the "created_at" field.
func CreatedAtLT ¶
func CreatedAtLT(v time.Time) predicate.Friendship
CreatedAtLT applies the LT predicate on the "created_at" field.
func CreatedAtLTE ¶
func CreatedAtLTE(v time.Time) predicate.Friendship
CreatedAtLTE applies the LTE predicate on the "created_at" field.
func CreatedAtNEQ ¶
func CreatedAtNEQ(v time.Time) predicate.Friendship
CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
func CreatedAtNotIn ¶
func CreatedAtNotIn(vs ...time.Time) predicate.Friendship
CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
func FriendID ¶
func FriendID(v pulid.ID) predicate.Friendship
FriendID applies equality check predicate on the "friend_id" field. It's identical to FriendIDEQ.
func FriendIDContains ¶
func FriendIDContains(v pulid.ID) predicate.Friendship
FriendIDContains applies the Contains predicate on the "friend_id" field.
func FriendIDContainsFold ¶
func FriendIDContainsFold(v pulid.ID) predicate.Friendship
FriendIDContainsFold applies the ContainsFold predicate on the "friend_id" field.
func FriendIDEQ ¶
func FriendIDEQ(v pulid.ID) predicate.Friendship
FriendIDEQ applies the EQ predicate on the "friend_id" field.
func FriendIDEqualFold ¶
func FriendIDEqualFold(v pulid.ID) predicate.Friendship
FriendIDEqualFold applies the EqualFold predicate on the "friend_id" field.
func FriendIDGT ¶
func FriendIDGT(v pulid.ID) predicate.Friendship
FriendIDGT applies the GT predicate on the "friend_id" field.
func FriendIDGTE ¶
func FriendIDGTE(v pulid.ID) predicate.Friendship
FriendIDGTE applies the GTE predicate on the "friend_id" field.
func FriendIDHasPrefix ¶
func FriendIDHasPrefix(v pulid.ID) predicate.Friendship
FriendIDHasPrefix applies the HasPrefix predicate on the "friend_id" field.
func FriendIDHasSuffix ¶
func FriendIDHasSuffix(v pulid.ID) predicate.Friendship
FriendIDHasSuffix applies the HasSuffix predicate on the "friend_id" field.
func FriendIDIn ¶
func FriendIDIn(vs ...pulid.ID) predicate.Friendship
FriendIDIn applies the In predicate on the "friend_id" field.
func FriendIDLT ¶
func FriendIDLT(v pulid.ID) predicate.Friendship
FriendIDLT applies the LT predicate on the "friend_id" field.
func FriendIDLTE ¶
func FriendIDLTE(v pulid.ID) predicate.Friendship
FriendIDLTE applies the LTE predicate on the "friend_id" field.
func FriendIDNEQ ¶
func FriendIDNEQ(v pulid.ID) predicate.Friendship
FriendIDNEQ applies the NEQ predicate on the "friend_id" field.
func FriendIDNotIn ¶
func FriendIDNotIn(vs ...pulid.ID) predicate.Friendship
FriendIDNotIn applies the NotIn predicate on the "friend_id" field.
func HasFriend ¶
func HasFriend() predicate.Friendship
HasFriend applies the HasEdge predicate on the "friend" edge.
func HasFriendWith ¶
func HasFriendWith(preds ...predicate.User) predicate.Friendship
HasFriendWith applies the HasEdge predicate on the "friend" edge with a given conditions (other predicates).
func HasUser ¶
func HasUser() predicate.Friendship
HasUser applies the HasEdge predicate on the "user" edge.
func HasUserWith ¶
func HasUserWith(preds ...predicate.User) predicate.Friendship
HasUserWith applies the HasEdge predicate on the "user" edge with a given conditions (other predicates).
func IDEQ ¶
func IDEQ(id pulid.ID) predicate.Friendship
IDEQ applies the EQ predicate on the ID field.
func IDGT ¶
func IDGT(id pulid.ID) predicate.Friendship
IDGT applies the GT predicate on the ID field.
func IDGTE ¶
func IDGTE(id pulid.ID) predicate.Friendship
IDGTE applies the GTE predicate on the ID field.
func IDIn ¶
func IDIn(ids ...pulid.ID) predicate.Friendship
IDIn applies the In predicate on the ID field.
func IDLT ¶
func IDLT(id pulid.ID) predicate.Friendship
IDLT applies the LT predicate on the ID field.
func IDLTE ¶
func IDLTE(id pulid.ID) predicate.Friendship
IDLTE applies the LTE predicate on the ID field.
func IDNEQ ¶
func IDNEQ(id pulid.ID) predicate.Friendship
IDNEQ applies the NEQ predicate on the ID field.
func IDNotIn ¶
func IDNotIn(ids ...pulid.ID) predicate.Friendship
IDNotIn applies the NotIn predicate on the ID field.
func Not ¶
func Not(p predicate.Friendship) predicate.Friendship
Not applies the not operator on the given predicate.
func Or ¶
func Or(predicates ...predicate.Friendship) predicate.Friendship
Or groups predicates with the OR operator between them.
func UserID ¶
func UserID(v pulid.ID) predicate.Friendship
UserID applies equality check predicate on the "user_id" field. It's identical to UserIDEQ.
func UserIDContains ¶
func UserIDContains(v pulid.ID) predicate.Friendship
UserIDContains applies the Contains predicate on the "user_id" field.
func UserIDContainsFold ¶
func UserIDContainsFold(v pulid.ID) predicate.Friendship
UserIDContainsFold applies the ContainsFold predicate on the "user_id" field.
func UserIDEQ ¶
func UserIDEQ(v pulid.ID) predicate.Friendship
UserIDEQ applies the EQ predicate on the "user_id" field.
func UserIDEqualFold ¶
func UserIDEqualFold(v pulid.ID) predicate.Friendship
UserIDEqualFold applies the EqualFold predicate on the "user_id" field.
func UserIDGT ¶
func UserIDGT(v pulid.ID) predicate.Friendship
UserIDGT applies the GT predicate on the "user_id" field.
func UserIDGTE ¶
func UserIDGTE(v pulid.ID) predicate.Friendship
UserIDGTE applies the GTE predicate on the "user_id" field.
func UserIDHasPrefix ¶
func UserIDHasPrefix(v pulid.ID) predicate.Friendship
UserIDHasPrefix applies the HasPrefix predicate on the "user_id" field.
func UserIDHasSuffix ¶
func UserIDHasSuffix(v pulid.ID) predicate.Friendship
UserIDHasSuffix applies the HasSuffix predicate on the "user_id" field.
func UserIDIn ¶
func UserIDIn(vs ...pulid.ID) predicate.Friendship
UserIDIn applies the In predicate on the "user_id" field.
func UserIDLT ¶
func UserIDLT(v pulid.ID) predicate.Friendship
UserIDLT applies the LT predicate on the "user_id" field.
func UserIDLTE ¶
func UserIDLTE(v pulid.ID) predicate.Friendship
UserIDLTE applies the LTE predicate on the "user_id" field.
func UserIDNEQ ¶
func UserIDNEQ(v pulid.ID) predicate.Friendship
UserIDNEQ applies the NEQ predicate on the "user_id" field.
func UserIDNotIn ¶
func UserIDNotIn(vs ...pulid.ID) predicate.Friendship
UserIDNotIn applies the NotIn predicate on the "user_id" field.
func ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).
Types ¶
type OrderOption ¶ added in v0.4.1
OrderOption defines the ordering options for the Friendship queries.
func ByCreatedAt ¶ added in v0.4.0
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
ByCreatedAt orders the results by the created_at field.
func ByFriendField ¶ added in v0.4.0
func ByFriendField(field string, opts ...sql.OrderTermOption) OrderOption
ByFriendField orders the results by friend field.
func ByFriendID ¶ added in v0.4.0
func ByFriendID(opts ...sql.OrderTermOption) OrderOption
ByFriendID orders the results by the friend_id field.
func ByID ¶ added in v0.4.0
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func ByUserField ¶ added in v0.4.0
func ByUserField(field string, opts ...sql.OrderTermOption) OrderOption
ByUserField orders the results by user field.
func ByUserID ¶ added in v0.4.0
func ByUserID(opts ...sql.OrderTermOption) OrderOption
ByUserID orders the results by the user_id field.