1
0
This commit is contained in:
2024-04-11 07:31:56 +09:00
parent 0e4f081101
commit 9494408008
15 changed files with 589 additions and 77 deletions

View File

@@ -30,6 +30,8 @@ const (
FieldUID = "uid"
// FieldCid holds the string denoting the cid field in the database.
FieldCid = "cid"
// FieldCp holds the string denoting the cp field in the database.
FieldCp = "cp"
// FieldCard holds the string denoting the card field in the database.
FieldCard = "card"
// FieldUpdatedAt holds the string denoting the updated_at field in the database.
@@ -60,6 +62,7 @@ var Columns = []string{
FieldDid,
FieldUID,
FieldCid,
FieldCp,
FieldCard,
FieldUpdatedAt,
FieldCreatedAt,
@@ -143,6 +146,11 @@ func ByCid(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldCid, opts...).ToFunc()
}
// ByCp orders the results by the cp field.
func ByCp(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldCp, opts...).ToFunc()
}
// ByCard orders the results by the card field.
func ByCard(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldCard, opts...).ToFunc()

View File

@@ -95,6 +95,11 @@ func Cid(v int) predicate.Sev {
return predicate.Sev(sql.FieldEQ(FieldCid, v))
}
// Cp applies equality check predicate on the "cp" field. It's identical to CpEQ.
func Cp(v int) predicate.Sev {
return predicate.Sev(sql.FieldEQ(FieldCp, v))
}
// Card applies equality check predicate on the "card" field. It's identical to CardEQ.
func Card(v int) predicate.Sev {
return predicate.Sev(sql.FieldEQ(FieldCard, v))
@@ -570,6 +575,56 @@ func CidNotNil() predicate.Sev {
return predicate.Sev(sql.FieldNotNull(FieldCid))
}
// CpEQ applies the EQ predicate on the "cp" field.
func CpEQ(v int) predicate.Sev {
return predicate.Sev(sql.FieldEQ(FieldCp, v))
}
// CpNEQ applies the NEQ predicate on the "cp" field.
func CpNEQ(v int) predicate.Sev {
return predicate.Sev(sql.FieldNEQ(FieldCp, v))
}
// CpIn applies the In predicate on the "cp" field.
func CpIn(vs ...int) predicate.Sev {
return predicate.Sev(sql.FieldIn(FieldCp, vs...))
}
// CpNotIn applies the NotIn predicate on the "cp" field.
func CpNotIn(vs ...int) predicate.Sev {
return predicate.Sev(sql.FieldNotIn(FieldCp, vs...))
}
// CpGT applies the GT predicate on the "cp" field.
func CpGT(v int) predicate.Sev {
return predicate.Sev(sql.FieldGT(FieldCp, v))
}
// CpGTE applies the GTE predicate on the "cp" field.
func CpGTE(v int) predicate.Sev {
return predicate.Sev(sql.FieldGTE(FieldCp, v))
}
// CpLT applies the LT predicate on the "cp" field.
func CpLT(v int) predicate.Sev {
return predicate.Sev(sql.FieldLT(FieldCp, v))
}
// CpLTE applies the LTE predicate on the "cp" field.
func CpLTE(v int) predicate.Sev {
return predicate.Sev(sql.FieldLTE(FieldCp, v))
}
// CpIsNil applies the IsNil predicate on the "cp" field.
func CpIsNil() predicate.Sev {
return predicate.Sev(sql.FieldIsNull(FieldCp))
}
// CpNotNil applies the NotNil predicate on the "cp" field.
func CpNotNil() predicate.Sev {
return predicate.Sev(sql.FieldNotNull(FieldCp))
}
// CardEQ applies the EQ predicate on the "card" field.
func CardEQ(v int) predicate.Sev {
return predicate.Sev(sql.FieldEQ(FieldCard, v))