forked from ALHP/ALHP.GO
added separate hash for srcinfo cache
This commit is contained in:
@@ -53,6 +53,8 @@ const (
|
||||
FieldIoOut = "io_out"
|
||||
// FieldSrcinfo holds the string denoting the srcinfo field in the database.
|
||||
FieldSrcinfo = "srcinfo"
|
||||
// FieldSrcinfoHash holds the string denoting the srcinfo_hash field in the database.
|
||||
FieldSrcinfoHash = "srcinfo_hash"
|
||||
// Table holds the table name of the dbpackage in the database.
|
||||
Table = "db_packages"
|
||||
)
|
||||
@@ -81,6 +83,7 @@ var Columns = []string{
|
||||
FieldIoIn,
|
||||
FieldIoOut,
|
||||
FieldSrcinfo,
|
||||
FieldSrcinfoHash,
|
||||
}
|
||||
|
||||
// ValidColumn reports if the column name is valid (part of the table columns).
|
||||
|
@@ -192,6 +192,13 @@ func Srcinfo(v string) predicate.DbPackage {
|
||||
})
|
||||
}
|
||||
|
||||
// SrcinfoHash applies equality check predicate on the "srcinfo_hash" field. It's identical to SrcinfoHashEQ.
|
||||
func SrcinfoHash(v string) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.EQ(s.C(FieldSrcinfoHash), v))
|
||||
})
|
||||
}
|
||||
|
||||
// PkgbaseEQ applies the EQ predicate on the "pkgbase" field.
|
||||
func PkgbaseEQ(v string) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
@@ -1892,6 +1899,119 @@ func SrcinfoContainsFold(v string) predicate.DbPackage {
|
||||
})
|
||||
}
|
||||
|
||||
// SrcinfoHashEQ applies the EQ predicate on the "srcinfo_hash" field.
|
||||
func SrcinfoHashEQ(v string) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.EQ(s.C(FieldSrcinfoHash), v))
|
||||
})
|
||||
}
|
||||
|
||||
// SrcinfoHashNEQ applies the NEQ predicate on the "srcinfo_hash" field.
|
||||
func SrcinfoHashNEQ(v string) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.NEQ(s.C(FieldSrcinfoHash), v))
|
||||
})
|
||||
}
|
||||
|
||||
// SrcinfoHashIn applies the In predicate on the "srcinfo_hash" field.
|
||||
func SrcinfoHashIn(vs ...string) predicate.DbPackage {
|
||||
v := make([]interface{}, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.In(s.C(FieldSrcinfoHash), v...))
|
||||
})
|
||||
}
|
||||
|
||||
// SrcinfoHashNotIn applies the NotIn predicate on the "srcinfo_hash" field.
|
||||
func SrcinfoHashNotIn(vs ...string) predicate.DbPackage {
|
||||
v := make([]interface{}, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.NotIn(s.C(FieldSrcinfoHash), v...))
|
||||
})
|
||||
}
|
||||
|
||||
// SrcinfoHashGT applies the GT predicate on the "srcinfo_hash" field.
|
||||
func SrcinfoHashGT(v string) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.GT(s.C(FieldSrcinfoHash), v))
|
||||
})
|
||||
}
|
||||
|
||||
// SrcinfoHashGTE applies the GTE predicate on the "srcinfo_hash" field.
|
||||
func SrcinfoHashGTE(v string) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.GTE(s.C(FieldSrcinfoHash), v))
|
||||
})
|
||||
}
|
||||
|
||||
// SrcinfoHashLT applies the LT predicate on the "srcinfo_hash" field.
|
||||
func SrcinfoHashLT(v string) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.LT(s.C(FieldSrcinfoHash), v))
|
||||
})
|
||||
}
|
||||
|
||||
// SrcinfoHashLTE applies the LTE predicate on the "srcinfo_hash" field.
|
||||
func SrcinfoHashLTE(v string) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.LTE(s.C(FieldSrcinfoHash), v))
|
||||
})
|
||||
}
|
||||
|
||||
// SrcinfoHashContains applies the Contains predicate on the "srcinfo_hash" field.
|
||||
func SrcinfoHashContains(v string) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.Contains(s.C(FieldSrcinfoHash), v))
|
||||
})
|
||||
}
|
||||
|
||||
// SrcinfoHashHasPrefix applies the HasPrefix predicate on the "srcinfo_hash" field.
|
||||
func SrcinfoHashHasPrefix(v string) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.HasPrefix(s.C(FieldSrcinfoHash), v))
|
||||
})
|
||||
}
|
||||
|
||||
// SrcinfoHashHasSuffix applies the HasSuffix predicate on the "srcinfo_hash" field.
|
||||
func SrcinfoHashHasSuffix(v string) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.HasSuffix(s.C(FieldSrcinfoHash), v))
|
||||
})
|
||||
}
|
||||
|
||||
// SrcinfoHashIsNil applies the IsNil predicate on the "srcinfo_hash" field.
|
||||
func SrcinfoHashIsNil() predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.IsNull(s.C(FieldSrcinfoHash)))
|
||||
})
|
||||
}
|
||||
|
||||
// SrcinfoHashNotNil applies the NotNil predicate on the "srcinfo_hash" field.
|
||||
func SrcinfoHashNotNil() predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.NotNull(s.C(FieldSrcinfoHash)))
|
||||
})
|
||||
}
|
||||
|
||||
// SrcinfoHashEqualFold applies the EqualFold predicate on the "srcinfo_hash" field.
|
||||
func SrcinfoHashEqualFold(v string) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.EqualFold(s.C(FieldSrcinfoHash), v))
|
||||
})
|
||||
}
|
||||
|
||||
// SrcinfoHashContainsFold applies the ContainsFold predicate on the "srcinfo_hash" field.
|
||||
func SrcinfoHashContainsFold(v string) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.ContainsFold(s.C(FieldSrcinfoHash), v))
|
||||
})
|
||||
}
|
||||
|
||||
// And groups predicates with the AND operator between them.
|
||||
func And(predicates ...predicate.DbPackage) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
|
Reference in New Issue
Block a user