forked from ALHP/ALHP.GO
changes to db schema; more housekeeping work
This commit is contained in:
@@ -2,6 +2,10 @@
|
||||
|
||||
package dbpackage
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
const (
|
||||
// Label holds the string label denoting the dbpackage type in the database.
|
||||
Label = "db_package"
|
||||
@@ -23,10 +27,10 @@ const (
|
||||
FieldVersion = "version"
|
||||
// FieldRepoVersion holds the string denoting the repo_version field in the database.
|
||||
FieldRepoVersion = "repo_version"
|
||||
// FieldBuildTime holds the string denoting the build_time field in the database.
|
||||
FieldBuildTime = "build_time"
|
||||
// FieldBuildDuration holds the string denoting the build_duration field in the database.
|
||||
FieldBuildDuration = "build_duration"
|
||||
// FieldBuildTimeStart holds the string denoting the build_time_start field in the database.
|
||||
FieldBuildTimeStart = "build_time_start"
|
||||
// FieldBuildTimeEnd holds the string denoting the build_time_end field in the database.
|
||||
FieldBuildTimeEnd = "build_time_end"
|
||||
// FieldUpdated holds the string denoting the updated field in the database.
|
||||
FieldUpdated = "updated"
|
||||
// FieldHash holds the string denoting the hash field in the database.
|
||||
@@ -46,8 +50,8 @@ var Columns = []string{
|
||||
FieldMarch,
|
||||
FieldVersion,
|
||||
FieldRepoVersion,
|
||||
FieldBuildTime,
|
||||
FieldBuildDuration,
|
||||
FieldBuildTimeStart,
|
||||
FieldBuildTimeEnd,
|
||||
FieldUpdated,
|
||||
FieldHash,
|
||||
}
|
||||
@@ -65,14 +69,62 @@ func ValidColumn(column string) bool {
|
||||
var (
|
||||
// PkgbaseValidator is a validator for the "pkgbase" field. It is called by the builders before save.
|
||||
PkgbaseValidator func(string) error
|
||||
// DefaultStatus holds the default value on creation for the "status" field.
|
||||
DefaultStatus int
|
||||
// StatusValidator is a validator for the "status" field. It is called by the builders before save.
|
||||
StatusValidator func(int) error
|
||||
// RepositoryValidator is a validator for the "repository" field. It is called by the builders before save.
|
||||
RepositoryValidator func(string) error
|
||||
// MarchValidator is a validator for the "march" field. It is called by the builders before save.
|
||||
MarchValidator func(string) error
|
||||
// BuildDurationValidator is a validator for the "build_duration" field. It is called by the builders before save.
|
||||
BuildDurationValidator func(uint64) error
|
||||
)
|
||||
|
||||
// Status defines the type for the "status" enum field.
|
||||
type Status string
|
||||
|
||||
// StatusUnknown is the default value of the Status enum.
|
||||
const DefaultStatus = StatusUnknown
|
||||
|
||||
// Status values.
|
||||
const (
|
||||
StatusSkipped Status = "skipped"
|
||||
StatusFailed Status = "failed"
|
||||
StatusBuild Status = "build"
|
||||
StatusQueued Status = "queued"
|
||||
StatusBuilding Status = "building"
|
||||
StatusLatest Status = "latest"
|
||||
StatusSigning Status = "signing"
|
||||
StatusUnknown Status = "unknown"
|
||||
)
|
||||
|
||||
func (s Status) String() string {
|
||||
return string(s)
|
||||
}
|
||||
|
||||
// StatusValidator is a validator for the "status" field enum values. It is called by the builders before save.
|
||||
func StatusValidator(s Status) error {
|
||||
switch s {
|
||||
case StatusSkipped, StatusFailed, StatusBuild, StatusQueued, StatusBuilding, StatusLatest, StatusSigning, StatusUnknown:
|
||||
return nil
|
||||
default:
|
||||
return fmt.Errorf("dbpackage: invalid enum value for status field: %q", s)
|
||||
}
|
||||
}
|
||||
|
||||
// Repository defines the type for the "repository" enum field.
|
||||
type Repository string
|
||||
|
||||
// Repository values.
|
||||
const (
|
||||
RepositoryExtra Repository = "extra"
|
||||
RepositoryCore Repository = "core"
|
||||
RepositoryCommunity Repository = "community"
|
||||
)
|
||||
|
||||
func (r Repository) String() string {
|
||||
return string(r)
|
||||
}
|
||||
|
||||
// RepositoryValidator is a validator for the "repository" field enum values. It is called by the builders before save.
|
||||
func RepositoryValidator(r Repository) error {
|
||||
switch r {
|
||||
case RepositoryExtra, RepositoryCore, RepositoryCommunity:
|
||||
return nil
|
||||
default:
|
||||
return fmt.Errorf("dbpackage: invalid enum value for repository field: %q", r)
|
||||
}
|
||||
}
|
||||
|
@@ -99,13 +99,6 @@ func Pkgbase(v string) predicate.DbPackage {
|
||||
})
|
||||
}
|
||||
|
||||
// Status applies equality check predicate on the "status" field. It's identical to StatusEQ.
|
||||
func Status(v int) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.EQ(s.C(FieldStatus), v))
|
||||
})
|
||||
}
|
||||
|
||||
// SkipReason applies equality check predicate on the "skip_reason" field. It's identical to SkipReasonEQ.
|
||||
func SkipReason(v string) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
@@ -113,13 +106,6 @@ func SkipReason(v string) predicate.DbPackage {
|
||||
})
|
||||
}
|
||||
|
||||
// Repository applies equality check predicate on the "repository" field. It's identical to RepositoryEQ.
|
||||
func Repository(v string) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.EQ(s.C(FieldRepository), v))
|
||||
})
|
||||
}
|
||||
|
||||
// March applies equality check predicate on the "march" field. It's identical to MarchEQ.
|
||||
func March(v string) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
@@ -141,17 +127,17 @@ func RepoVersion(v string) predicate.DbPackage {
|
||||
})
|
||||
}
|
||||
|
||||
// BuildTime applies equality check predicate on the "build_time" field. It's identical to BuildTimeEQ.
|
||||
func BuildTime(v time.Time) predicate.DbPackage {
|
||||
// BuildTimeStart applies equality check predicate on the "build_time_start" field. It's identical to BuildTimeStartEQ.
|
||||
func BuildTimeStart(v time.Time) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.EQ(s.C(FieldBuildTime), v))
|
||||
s.Where(sql.EQ(s.C(FieldBuildTimeStart), v))
|
||||
})
|
||||
}
|
||||
|
||||
// BuildDuration applies equality check predicate on the "build_duration" field. It's identical to BuildDurationEQ.
|
||||
func BuildDuration(v uint64) predicate.DbPackage {
|
||||
// BuildTimeEnd applies equality check predicate on the "build_time_end" field. It's identical to BuildTimeEndEQ.
|
||||
func BuildTimeEnd(v time.Time) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.EQ(s.C(FieldBuildDuration), v))
|
||||
s.Where(sql.EQ(s.C(FieldBuildTimeEnd), v))
|
||||
})
|
||||
}
|
||||
|
||||
@@ -295,21 +281,21 @@ func PackagesNotNil() predicate.DbPackage {
|
||||
}
|
||||
|
||||
// StatusEQ applies the EQ predicate on the "status" field.
|
||||
func StatusEQ(v int) predicate.DbPackage {
|
||||
func StatusEQ(v Status) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.EQ(s.C(FieldStatus), v))
|
||||
})
|
||||
}
|
||||
|
||||
// StatusNEQ applies the NEQ predicate on the "status" field.
|
||||
func StatusNEQ(v int) predicate.DbPackage {
|
||||
func StatusNEQ(v Status) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.NEQ(s.C(FieldStatus), v))
|
||||
})
|
||||
}
|
||||
|
||||
// StatusIn applies the In predicate on the "status" field.
|
||||
func StatusIn(vs ...int) predicate.DbPackage {
|
||||
func StatusIn(vs ...Status) predicate.DbPackage {
|
||||
v := make([]interface{}, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
@@ -326,7 +312,7 @@ func StatusIn(vs ...int) predicate.DbPackage {
|
||||
}
|
||||
|
||||
// StatusNotIn applies the NotIn predicate on the "status" field.
|
||||
func StatusNotIn(vs ...int) predicate.DbPackage {
|
||||
func StatusNotIn(vs ...Status) predicate.DbPackage {
|
||||
v := make([]interface{}, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
@@ -342,31 +328,17 @@ func StatusNotIn(vs ...int) predicate.DbPackage {
|
||||
})
|
||||
}
|
||||
|
||||
// StatusGT applies the GT predicate on the "status" field.
|
||||
func StatusGT(v int) predicate.DbPackage {
|
||||
// StatusIsNil applies the IsNil predicate on the "status" field.
|
||||
func StatusIsNil() predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.GT(s.C(FieldStatus), v))
|
||||
s.Where(sql.IsNull(s.C(FieldStatus)))
|
||||
})
|
||||
}
|
||||
|
||||
// StatusGTE applies the GTE predicate on the "status" field.
|
||||
func StatusGTE(v int) predicate.DbPackage {
|
||||
// StatusNotNil applies the NotNil predicate on the "status" field.
|
||||
func StatusNotNil() predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.GTE(s.C(FieldStatus), v))
|
||||
})
|
||||
}
|
||||
|
||||
// StatusLT applies the LT predicate on the "status" field.
|
||||
func StatusLT(v int) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.LT(s.C(FieldStatus), v))
|
||||
})
|
||||
}
|
||||
|
||||
// StatusLTE applies the LTE predicate on the "status" field.
|
||||
func StatusLTE(v int) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.LTE(s.C(FieldStatus), v))
|
||||
s.Where(sql.NotNull(s.C(FieldStatus)))
|
||||
})
|
||||
}
|
||||
|
||||
@@ -496,21 +468,21 @@ func SkipReasonContainsFold(v string) predicate.DbPackage {
|
||||
}
|
||||
|
||||
// RepositoryEQ applies the EQ predicate on the "repository" field.
|
||||
func RepositoryEQ(v string) predicate.DbPackage {
|
||||
func RepositoryEQ(v Repository) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.EQ(s.C(FieldRepository), v))
|
||||
})
|
||||
}
|
||||
|
||||
// RepositoryNEQ applies the NEQ predicate on the "repository" field.
|
||||
func RepositoryNEQ(v string) predicate.DbPackage {
|
||||
func RepositoryNEQ(v Repository) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.NEQ(s.C(FieldRepository), v))
|
||||
})
|
||||
}
|
||||
|
||||
// RepositoryIn applies the In predicate on the "repository" field.
|
||||
func RepositoryIn(vs ...string) predicate.DbPackage {
|
||||
func RepositoryIn(vs ...Repository) predicate.DbPackage {
|
||||
v := make([]interface{}, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
@@ -527,7 +499,7 @@ func RepositoryIn(vs ...string) predicate.DbPackage {
|
||||
}
|
||||
|
||||
// RepositoryNotIn applies the NotIn predicate on the "repository" field.
|
||||
func RepositoryNotIn(vs ...string) predicate.DbPackage {
|
||||
func RepositoryNotIn(vs ...Repository) predicate.DbPackage {
|
||||
v := make([]interface{}, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
@@ -543,69 +515,6 @@ func RepositoryNotIn(vs ...string) predicate.DbPackage {
|
||||
})
|
||||
}
|
||||
|
||||
// RepositoryGT applies the GT predicate on the "repository" field.
|
||||
func RepositoryGT(v string) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.GT(s.C(FieldRepository), v))
|
||||
})
|
||||
}
|
||||
|
||||
// RepositoryGTE applies the GTE predicate on the "repository" field.
|
||||
func RepositoryGTE(v string) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.GTE(s.C(FieldRepository), v))
|
||||
})
|
||||
}
|
||||
|
||||
// RepositoryLT applies the LT predicate on the "repository" field.
|
||||
func RepositoryLT(v string) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.LT(s.C(FieldRepository), v))
|
||||
})
|
||||
}
|
||||
|
||||
// RepositoryLTE applies the LTE predicate on the "repository" field.
|
||||
func RepositoryLTE(v string) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.LTE(s.C(FieldRepository), v))
|
||||
})
|
||||
}
|
||||
|
||||
// RepositoryContains applies the Contains predicate on the "repository" field.
|
||||
func RepositoryContains(v string) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.Contains(s.C(FieldRepository), v))
|
||||
})
|
||||
}
|
||||
|
||||
// RepositoryHasPrefix applies the HasPrefix predicate on the "repository" field.
|
||||
func RepositoryHasPrefix(v string) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.HasPrefix(s.C(FieldRepository), v))
|
||||
})
|
||||
}
|
||||
|
||||
// RepositoryHasSuffix applies the HasSuffix predicate on the "repository" field.
|
||||
func RepositoryHasSuffix(v string) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.HasSuffix(s.C(FieldRepository), v))
|
||||
})
|
||||
}
|
||||
|
||||
// RepositoryEqualFold applies the EqualFold predicate on the "repository" field.
|
||||
func RepositoryEqualFold(v string) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.EqualFold(s.C(FieldRepository), v))
|
||||
})
|
||||
}
|
||||
|
||||
// RepositoryContainsFold applies the ContainsFold predicate on the "repository" field.
|
||||
func RepositoryContainsFold(v string) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.ContainsFold(s.C(FieldRepository), v))
|
||||
})
|
||||
}
|
||||
|
||||
// MarchEQ applies the EQ predicate on the "march" field.
|
||||
func MarchEQ(v string) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
@@ -967,22 +876,22 @@ func RepoVersionContainsFold(v string) predicate.DbPackage {
|
||||
})
|
||||
}
|
||||
|
||||
// BuildTimeEQ applies the EQ predicate on the "build_time" field.
|
||||
func BuildTimeEQ(v time.Time) predicate.DbPackage {
|
||||
// BuildTimeStartEQ applies the EQ predicate on the "build_time_start" field.
|
||||
func BuildTimeStartEQ(v time.Time) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.EQ(s.C(FieldBuildTime), v))
|
||||
s.Where(sql.EQ(s.C(FieldBuildTimeStart), v))
|
||||
})
|
||||
}
|
||||
|
||||
// BuildTimeNEQ applies the NEQ predicate on the "build_time" field.
|
||||
func BuildTimeNEQ(v time.Time) predicate.DbPackage {
|
||||
// BuildTimeStartNEQ applies the NEQ predicate on the "build_time_start" field.
|
||||
func BuildTimeStartNEQ(v time.Time) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.NEQ(s.C(FieldBuildTime), v))
|
||||
s.Where(sql.NEQ(s.C(FieldBuildTimeStart), v))
|
||||
})
|
||||
}
|
||||
|
||||
// BuildTimeIn applies the In predicate on the "build_time" field.
|
||||
func BuildTimeIn(vs ...time.Time) predicate.DbPackage {
|
||||
// BuildTimeStartIn applies the In predicate on the "build_time_start" field.
|
||||
func BuildTimeStartIn(vs ...time.Time) predicate.DbPackage {
|
||||
v := make([]interface{}, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
@@ -994,12 +903,12 @@ func BuildTimeIn(vs ...time.Time) predicate.DbPackage {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
s.Where(sql.In(s.C(FieldBuildTime), v...))
|
||||
s.Where(sql.In(s.C(FieldBuildTimeStart), v...))
|
||||
})
|
||||
}
|
||||
|
||||
// BuildTimeNotIn applies the NotIn predicate on the "build_time" field.
|
||||
func BuildTimeNotIn(vs ...time.Time) predicate.DbPackage {
|
||||
// BuildTimeStartNotIn applies the NotIn predicate on the "build_time_start" field.
|
||||
func BuildTimeStartNotIn(vs ...time.Time) predicate.DbPackage {
|
||||
v := make([]interface{}, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
@@ -1011,68 +920,68 @@ func BuildTimeNotIn(vs ...time.Time) predicate.DbPackage {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
s.Where(sql.NotIn(s.C(FieldBuildTime), v...))
|
||||
s.Where(sql.NotIn(s.C(FieldBuildTimeStart), v...))
|
||||
})
|
||||
}
|
||||
|
||||
// BuildTimeGT applies the GT predicate on the "build_time" field.
|
||||
func BuildTimeGT(v time.Time) predicate.DbPackage {
|
||||
// BuildTimeStartGT applies the GT predicate on the "build_time_start" field.
|
||||
func BuildTimeStartGT(v time.Time) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.GT(s.C(FieldBuildTime), v))
|
||||
s.Where(sql.GT(s.C(FieldBuildTimeStart), v))
|
||||
})
|
||||
}
|
||||
|
||||
// BuildTimeGTE applies the GTE predicate on the "build_time" field.
|
||||
func BuildTimeGTE(v time.Time) predicate.DbPackage {
|
||||
// BuildTimeStartGTE applies the GTE predicate on the "build_time_start" field.
|
||||
func BuildTimeStartGTE(v time.Time) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.GTE(s.C(FieldBuildTime), v))
|
||||
s.Where(sql.GTE(s.C(FieldBuildTimeStart), v))
|
||||
})
|
||||
}
|
||||
|
||||
// BuildTimeLT applies the LT predicate on the "build_time" field.
|
||||
func BuildTimeLT(v time.Time) predicate.DbPackage {
|
||||
// BuildTimeStartLT applies the LT predicate on the "build_time_start" field.
|
||||
func BuildTimeStartLT(v time.Time) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.LT(s.C(FieldBuildTime), v))
|
||||
s.Where(sql.LT(s.C(FieldBuildTimeStart), v))
|
||||
})
|
||||
}
|
||||
|
||||
// BuildTimeLTE applies the LTE predicate on the "build_time" field.
|
||||
func BuildTimeLTE(v time.Time) predicate.DbPackage {
|
||||
// BuildTimeStartLTE applies the LTE predicate on the "build_time_start" field.
|
||||
func BuildTimeStartLTE(v time.Time) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.LTE(s.C(FieldBuildTime), v))
|
||||
s.Where(sql.LTE(s.C(FieldBuildTimeStart), v))
|
||||
})
|
||||
}
|
||||
|
||||
// BuildTimeIsNil applies the IsNil predicate on the "build_time" field.
|
||||
func BuildTimeIsNil() predicate.DbPackage {
|
||||
// BuildTimeStartIsNil applies the IsNil predicate on the "build_time_start" field.
|
||||
func BuildTimeStartIsNil() predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.IsNull(s.C(FieldBuildTime)))
|
||||
s.Where(sql.IsNull(s.C(FieldBuildTimeStart)))
|
||||
})
|
||||
}
|
||||
|
||||
// BuildTimeNotNil applies the NotNil predicate on the "build_time" field.
|
||||
func BuildTimeNotNil() predicate.DbPackage {
|
||||
// BuildTimeStartNotNil applies the NotNil predicate on the "build_time_start" field.
|
||||
func BuildTimeStartNotNil() predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.NotNull(s.C(FieldBuildTime)))
|
||||
s.Where(sql.NotNull(s.C(FieldBuildTimeStart)))
|
||||
})
|
||||
}
|
||||
|
||||
// BuildDurationEQ applies the EQ predicate on the "build_duration" field.
|
||||
func BuildDurationEQ(v uint64) predicate.DbPackage {
|
||||
// BuildTimeEndEQ applies the EQ predicate on the "build_time_end" field.
|
||||
func BuildTimeEndEQ(v time.Time) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.EQ(s.C(FieldBuildDuration), v))
|
||||
s.Where(sql.EQ(s.C(FieldBuildTimeEnd), v))
|
||||
})
|
||||
}
|
||||
|
||||
// BuildDurationNEQ applies the NEQ predicate on the "build_duration" field.
|
||||
func BuildDurationNEQ(v uint64) predicate.DbPackage {
|
||||
// BuildTimeEndNEQ applies the NEQ predicate on the "build_time_end" field.
|
||||
func BuildTimeEndNEQ(v time.Time) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.NEQ(s.C(FieldBuildDuration), v))
|
||||
s.Where(sql.NEQ(s.C(FieldBuildTimeEnd), v))
|
||||
})
|
||||
}
|
||||
|
||||
// BuildDurationIn applies the In predicate on the "build_duration" field.
|
||||
func BuildDurationIn(vs ...uint64) predicate.DbPackage {
|
||||
// BuildTimeEndIn applies the In predicate on the "build_time_end" field.
|
||||
func BuildTimeEndIn(vs ...time.Time) predicate.DbPackage {
|
||||
v := make([]interface{}, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
@@ -1084,12 +993,12 @@ func BuildDurationIn(vs ...uint64) predicate.DbPackage {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
s.Where(sql.In(s.C(FieldBuildDuration), v...))
|
||||
s.Where(sql.In(s.C(FieldBuildTimeEnd), v...))
|
||||
})
|
||||
}
|
||||
|
||||
// BuildDurationNotIn applies the NotIn predicate on the "build_duration" field.
|
||||
func BuildDurationNotIn(vs ...uint64) predicate.DbPackage {
|
||||
// BuildTimeEndNotIn applies the NotIn predicate on the "build_time_end" field.
|
||||
func BuildTimeEndNotIn(vs ...time.Time) predicate.DbPackage {
|
||||
v := make([]interface{}, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
@@ -1101,49 +1010,49 @@ func BuildDurationNotIn(vs ...uint64) predicate.DbPackage {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
s.Where(sql.NotIn(s.C(FieldBuildDuration), v...))
|
||||
s.Where(sql.NotIn(s.C(FieldBuildTimeEnd), v...))
|
||||
})
|
||||
}
|
||||
|
||||
// BuildDurationGT applies the GT predicate on the "build_duration" field.
|
||||
func BuildDurationGT(v uint64) predicate.DbPackage {
|
||||
// BuildTimeEndGT applies the GT predicate on the "build_time_end" field.
|
||||
func BuildTimeEndGT(v time.Time) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.GT(s.C(FieldBuildDuration), v))
|
||||
s.Where(sql.GT(s.C(FieldBuildTimeEnd), v))
|
||||
})
|
||||
}
|
||||
|
||||
// BuildDurationGTE applies the GTE predicate on the "build_duration" field.
|
||||
func BuildDurationGTE(v uint64) predicate.DbPackage {
|
||||
// BuildTimeEndGTE applies the GTE predicate on the "build_time_end" field.
|
||||
func BuildTimeEndGTE(v time.Time) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.GTE(s.C(FieldBuildDuration), v))
|
||||
s.Where(sql.GTE(s.C(FieldBuildTimeEnd), v))
|
||||
})
|
||||
}
|
||||
|
||||
// BuildDurationLT applies the LT predicate on the "build_duration" field.
|
||||
func BuildDurationLT(v uint64) predicate.DbPackage {
|
||||
// BuildTimeEndLT applies the LT predicate on the "build_time_end" field.
|
||||
func BuildTimeEndLT(v time.Time) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.LT(s.C(FieldBuildDuration), v))
|
||||
s.Where(sql.LT(s.C(FieldBuildTimeEnd), v))
|
||||
})
|
||||
}
|
||||
|
||||
// BuildDurationLTE applies the LTE predicate on the "build_duration" field.
|
||||
func BuildDurationLTE(v uint64) predicate.DbPackage {
|
||||
// BuildTimeEndLTE applies the LTE predicate on the "build_time_end" field.
|
||||
func BuildTimeEndLTE(v time.Time) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.LTE(s.C(FieldBuildDuration), v))
|
||||
s.Where(sql.LTE(s.C(FieldBuildTimeEnd), v))
|
||||
})
|
||||
}
|
||||
|
||||
// BuildDurationIsNil applies the IsNil predicate on the "build_duration" field.
|
||||
func BuildDurationIsNil() predicate.DbPackage {
|
||||
// BuildTimeEndIsNil applies the IsNil predicate on the "build_time_end" field.
|
||||
func BuildTimeEndIsNil() predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.IsNull(s.C(FieldBuildDuration)))
|
||||
s.Where(sql.IsNull(s.C(FieldBuildTimeEnd)))
|
||||
})
|
||||
}
|
||||
|
||||
// BuildDurationNotNil applies the NotNil predicate on the "build_duration" field.
|
||||
func BuildDurationNotNil() predicate.DbPackage {
|
||||
// BuildTimeEndNotNil applies the NotNil predicate on the "build_time_end" field.
|
||||
func BuildTimeEndNotNil() predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.NotNull(s.C(FieldBuildDuration)))
|
||||
s.Where(sql.NotNull(s.C(FieldBuildTimeEnd)))
|
||||
})
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user