Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Redemption) predicate.Redemption
- func HasAccessory() predicate.Redemption
- func HasAccessoryWith(preds ...predicate.Accessory) predicate.Redemption
- func HasUser() predicate.Redemption
- func HasUserWith(preds ...predicate.User) predicate.Redemption
- func HasVoucher() predicate.Redemption
- func HasVoucherWith(preds ...predicate.Voucher) predicate.Redemption
- func ID(id int) predicate.Redemption
- func IDEQ(id int) predicate.Redemption
- func IDGT(id int) predicate.Redemption
- func IDGTE(id int) predicate.Redemption
- func IDIn(ids ...int) predicate.Redemption
- func IDLT(id int) predicate.Redemption
- func IDLTE(id int) predicate.Redemption
- func IDNEQ(id int) predicate.Redemption
- func IDNotIn(ids ...int) predicate.Redemption
- func Not(p predicate.Redemption) predicate.Redemption
- func Or(predicates ...predicate.Redemption) predicate.Redemption
- func RedeemedAt(v time.Time) predicate.Redemption
- func RedeemedAtEQ(v time.Time) predicate.Redemption
- func RedeemedAtGT(v time.Time) predicate.Redemption
- func RedeemedAtGTE(v time.Time) predicate.Redemption
- func RedeemedAtIn(vs ...time.Time) predicate.Redemption
- func RedeemedAtLT(v time.Time) predicate.Redemption
- func RedeemedAtLTE(v time.Time) predicate.Redemption
- func RedeemedAtNEQ(v time.Time) predicate.Redemption
- func RedeemedAtNotIn(vs ...time.Time) predicate.Redemption
- func ValidColumn(column string) bool
- type OrderOption
- func ByAccessoryField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByRedeemedAt(opts ...sql.OrderTermOption) OrderOption
- func ByUserField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByVoucherField(field string, opts ...sql.OrderTermOption) OrderOption
Constants ¶
const ( // Label holds the string label denoting the redemption type in the database. Label = "redemption" // FieldID holds the string denoting the id field in the database. FieldID = "id" // FieldRedeemedAt holds the string denoting the redeemed_at field in the database. FieldRedeemedAt = "redeemed_at" // EdgeVoucher holds the string denoting the voucher edge name in mutations. EdgeVoucher = "voucher" // EdgeAccessory holds the string denoting the accessory edge name in mutations. EdgeAccessory = "accessory" // EdgeUser holds the string denoting the user edge name in mutations. EdgeUser = "user" // Table holds the table name of the redemption in the database. Table = "redemptions" // VoucherTable is the table that holds the voucher relation/edge. VoucherTable = "redemptions" // VoucherInverseTable is the table name for the Voucher entity. // It exists in this package in order to avoid circular dependency with the "voucher" package. VoucherInverseTable = "vouchers" // VoucherColumn is the table column denoting the voucher relation/edge. VoucherColumn = "voucher_redemptions" // AccessoryTable is the table that holds the accessory relation/edge. AccessoryTable = "redemptions" // AccessoryInverseTable is the table name for the Accessory entity. // It exists in this package in order to avoid circular dependency with the "accessory" package. AccessoryInverseTable = "accessories" // AccessoryColumn is the table column denoting the accessory relation/edge. AccessoryColumn = "accessory_redemptions" // UserTable is the table that holds the user relation/edge. UserTable = "redemptions" // 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 = "redemption_user" )
Variables ¶
var Columns = []string{ FieldID, FieldRedeemedAt, }
Columns holds all SQL columns for redemption fields.
var ForeignKeys = []string{
"accessory_redemptions",
"redemption_user",
"voucher_redemptions",
}
ForeignKeys holds the SQL foreign-keys that are owned by the "redemptions" table and are not defined as standalone fields in the schema.
Functions ¶
func And ¶
func And(predicates ...predicate.Redemption) predicate.Redemption
And groups predicates with the AND operator between them.
func HasAccessory ¶
func HasAccessory() predicate.Redemption
HasAccessory applies the HasEdge predicate on the "accessory" edge.
func HasAccessoryWith ¶
func HasAccessoryWith(preds ...predicate.Accessory) predicate.Redemption
HasAccessoryWith applies the HasEdge predicate on the "accessory" edge with a given conditions (other predicates).
func HasUser ¶
func HasUser() predicate.Redemption
HasUser applies the HasEdge predicate on the "user" edge.
func HasUserWith ¶
func HasUserWith(preds ...predicate.User) predicate.Redemption
HasUserWith applies the HasEdge predicate on the "user" edge with a given conditions (other predicates).
func HasVoucher ¶
func HasVoucher() predicate.Redemption
HasVoucher applies the HasEdge predicate on the "voucher" edge.
func HasVoucherWith ¶
func HasVoucherWith(preds ...predicate.Voucher) predicate.Redemption
HasVoucherWith applies the HasEdge predicate on the "voucher" edge with a given conditions (other predicates).
func IDGTE ¶
func IDGTE(id int) predicate.Redemption
IDGTE applies the GTE predicate on the ID field.
func IDIn ¶
func IDIn(ids ...int) predicate.Redemption
IDIn applies the In predicate on the ID field.
func IDLTE ¶
func IDLTE(id int) predicate.Redemption
IDLTE applies the LTE predicate on the ID field.
func IDNEQ ¶
func IDNEQ(id int) predicate.Redemption
IDNEQ applies the NEQ predicate on the ID field.
func IDNotIn ¶
func IDNotIn(ids ...int) predicate.Redemption
IDNotIn applies the NotIn predicate on the ID field.
func Not ¶
func Not(p predicate.Redemption) predicate.Redemption
Not applies the not operator on the given predicate.
func Or ¶
func Or(predicates ...predicate.Redemption) predicate.Redemption
Or groups predicates with the OR operator between them.
func RedeemedAt ¶
func RedeemedAt(v time.Time) predicate.Redemption
RedeemedAt applies equality check predicate on the "redeemed_at" field. It's identical to RedeemedAtEQ.
func RedeemedAtEQ ¶
func RedeemedAtEQ(v time.Time) predicate.Redemption
RedeemedAtEQ applies the EQ predicate on the "redeemed_at" field.
func RedeemedAtGT ¶
func RedeemedAtGT(v time.Time) predicate.Redemption
RedeemedAtGT applies the GT predicate on the "redeemed_at" field.
func RedeemedAtGTE ¶
func RedeemedAtGTE(v time.Time) predicate.Redemption
RedeemedAtGTE applies the GTE predicate on the "redeemed_at" field.
func RedeemedAtIn ¶
func RedeemedAtIn(vs ...time.Time) predicate.Redemption
RedeemedAtIn applies the In predicate on the "redeemed_at" field.
func RedeemedAtLT ¶
func RedeemedAtLT(v time.Time) predicate.Redemption
RedeemedAtLT applies the LT predicate on the "redeemed_at" field.
func RedeemedAtLTE ¶
func RedeemedAtLTE(v time.Time) predicate.Redemption
RedeemedAtLTE applies the LTE predicate on the "redeemed_at" field.
func RedeemedAtNEQ ¶
func RedeemedAtNEQ(v time.Time) predicate.Redemption
RedeemedAtNEQ applies the NEQ predicate on the "redeemed_at" field.
func RedeemedAtNotIn ¶
func RedeemedAtNotIn(vs ...time.Time) predicate.Redemption
RedeemedAtNotIn applies the NotIn predicate on the "redeemed_at" field.
func ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).
Types ¶
type OrderOption ¶
OrderOption defines the ordering options for the Redemption queries.
func ByAccessoryField ¶
func ByAccessoryField(field string, opts ...sql.OrderTermOption) OrderOption
ByAccessoryField orders the results by accessory field.
func ByID ¶
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func ByRedeemedAt ¶
func ByRedeemedAt(opts ...sql.OrderTermOption) OrderOption
ByRedeemedAt orders the results by the redeemed_at field.
func ByUserField ¶
func ByUserField(field string, opts ...sql.OrderTermOption) OrderOption
ByUserField orders the results by user field.
func ByVoucherField ¶
func ByVoucherField(field string, opts ...sql.OrderTermOption) OrderOption
ByVoucherField orders the results by voucher field.