forked from ALHP/ALHP.GO
more follow-up fixes for new build-queue
This commit is contained in:
@@ -35,8 +35,6 @@ type DbPackage struct {
|
||||
RepoVersion string `json:"repo_version,omitempty"`
|
||||
// BuildTimeStart holds the value of the "build_time_start" field.
|
||||
BuildTimeStart time.Time `json:"build_time_start,omitempty"`
|
||||
// BuildTimeEnd holds the value of the "build_time_end" field.
|
||||
BuildTimeEnd time.Time `json:"build_time_end,omitempty"`
|
||||
// Updated holds the value of the "updated" field.
|
||||
Updated time.Time `json:"updated,omitempty"`
|
||||
// Hash holds the value of the "hash" field.
|
||||
@@ -49,6 +47,16 @@ type DbPackage struct {
|
||||
LastVerified time.Time `json:"last_verified,omitempty"`
|
||||
// DebugSymbols holds the value of the "debug_symbols" field.
|
||||
DebugSymbols dbpackage.DebugSymbols `json:"debug_symbols,omitempty"`
|
||||
// MaxRss holds the value of the "max_rss" field.
|
||||
MaxRss *int64 `json:"max_rss,omitempty"`
|
||||
// UTime holds the value of the "u_time" field.
|
||||
UTime *int64 `json:"u_time,omitempty"`
|
||||
// STime holds the value of the "s_time" field.
|
||||
STime *int64 `json:"s_time,omitempty"`
|
||||
// IoIn holds the value of the "io_in" field.
|
||||
IoIn *int64 `json:"io_in,omitempty"`
|
||||
// IoOut holds the value of the "io_out" field.
|
||||
IoOut *int64 `json:"io_out,omitempty"`
|
||||
}
|
||||
|
||||
// scanValues returns the types for scanning values from sql.Rows.
|
||||
@@ -58,11 +66,11 @@ func (*DbPackage) scanValues(columns []string) ([]interface{}, error) {
|
||||
switch columns[i] {
|
||||
case dbpackage.FieldPackages:
|
||||
values[i] = new([]byte)
|
||||
case dbpackage.FieldID:
|
||||
case dbpackage.FieldID, dbpackage.FieldMaxRss, dbpackage.FieldUTime, dbpackage.FieldSTime, dbpackage.FieldIoIn, dbpackage.FieldIoOut:
|
||||
values[i] = new(sql.NullInt64)
|
||||
case dbpackage.FieldPkgbase, dbpackage.FieldStatus, dbpackage.FieldSkipReason, dbpackage.FieldRepository, dbpackage.FieldMarch, dbpackage.FieldVersion, dbpackage.FieldRepoVersion, dbpackage.FieldHash, dbpackage.FieldLto, dbpackage.FieldLastVersionBuild, dbpackage.FieldDebugSymbols:
|
||||
values[i] = new(sql.NullString)
|
||||
case dbpackage.FieldBuildTimeStart, dbpackage.FieldBuildTimeEnd, dbpackage.FieldUpdated, dbpackage.FieldLastVerified:
|
||||
case dbpackage.FieldBuildTimeStart, dbpackage.FieldUpdated, dbpackage.FieldLastVerified:
|
||||
values[i] = new(sql.NullTime)
|
||||
default:
|
||||
return nil, fmt.Errorf("unexpected column %q for type DbPackage", columns[i])
|
||||
@@ -141,12 +149,6 @@ func (dp *DbPackage) assignValues(columns []string, values []interface{}) error
|
||||
} else if value.Valid {
|
||||
dp.BuildTimeStart = value.Time
|
||||
}
|
||||
case dbpackage.FieldBuildTimeEnd:
|
||||
if value, ok := values[i].(*sql.NullTime); !ok {
|
||||
return fmt.Errorf("unexpected type %T for field build_time_end", values[i])
|
||||
} else if value.Valid {
|
||||
dp.BuildTimeEnd = value.Time
|
||||
}
|
||||
case dbpackage.FieldUpdated:
|
||||
if value, ok := values[i].(*sql.NullTime); !ok {
|
||||
return fmt.Errorf("unexpected type %T for field updated", values[i])
|
||||
@@ -183,6 +185,41 @@ func (dp *DbPackage) assignValues(columns []string, values []interface{}) error
|
||||
} else if value.Valid {
|
||||
dp.DebugSymbols = dbpackage.DebugSymbols(value.String)
|
||||
}
|
||||
case dbpackage.FieldMaxRss:
|
||||
if value, ok := values[i].(*sql.NullInt64); !ok {
|
||||
return fmt.Errorf("unexpected type %T for field max_rss", values[i])
|
||||
} else if value.Valid {
|
||||
dp.MaxRss = new(int64)
|
||||
*dp.MaxRss = value.Int64
|
||||
}
|
||||
case dbpackage.FieldUTime:
|
||||
if value, ok := values[i].(*sql.NullInt64); !ok {
|
||||
return fmt.Errorf("unexpected type %T for field u_time", values[i])
|
||||
} else if value.Valid {
|
||||
dp.UTime = new(int64)
|
||||
*dp.UTime = value.Int64
|
||||
}
|
||||
case dbpackage.FieldSTime:
|
||||
if value, ok := values[i].(*sql.NullInt64); !ok {
|
||||
return fmt.Errorf("unexpected type %T for field s_time", values[i])
|
||||
} else if value.Valid {
|
||||
dp.STime = new(int64)
|
||||
*dp.STime = value.Int64
|
||||
}
|
||||
case dbpackage.FieldIoIn:
|
||||
if value, ok := values[i].(*sql.NullInt64); !ok {
|
||||
return fmt.Errorf("unexpected type %T for field io_in", values[i])
|
||||
} else if value.Valid {
|
||||
dp.IoIn = new(int64)
|
||||
*dp.IoIn = value.Int64
|
||||
}
|
||||
case dbpackage.FieldIoOut:
|
||||
if value, ok := values[i].(*sql.NullInt64); !ok {
|
||||
return fmt.Errorf("unexpected type %T for field io_out", values[i])
|
||||
} else if value.Valid {
|
||||
dp.IoOut = new(int64)
|
||||
*dp.IoOut = value.Int64
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
@@ -229,8 +266,6 @@ func (dp *DbPackage) String() string {
|
||||
builder.WriteString(dp.RepoVersion)
|
||||
builder.WriteString(", build_time_start=")
|
||||
builder.WriteString(dp.BuildTimeStart.Format(time.ANSIC))
|
||||
builder.WriteString(", build_time_end=")
|
||||
builder.WriteString(dp.BuildTimeEnd.Format(time.ANSIC))
|
||||
builder.WriteString(", updated=")
|
||||
builder.WriteString(dp.Updated.Format(time.ANSIC))
|
||||
builder.WriteString(", hash=")
|
||||
@@ -243,6 +278,26 @@ func (dp *DbPackage) String() string {
|
||||
builder.WriteString(dp.LastVerified.Format(time.ANSIC))
|
||||
builder.WriteString(", debug_symbols=")
|
||||
builder.WriteString(fmt.Sprintf("%v", dp.DebugSymbols))
|
||||
if v := dp.MaxRss; v != nil {
|
||||
builder.WriteString(", max_rss=")
|
||||
builder.WriteString(fmt.Sprintf("%v", *v))
|
||||
}
|
||||
if v := dp.UTime; v != nil {
|
||||
builder.WriteString(", u_time=")
|
||||
builder.WriteString(fmt.Sprintf("%v", *v))
|
||||
}
|
||||
if v := dp.STime; v != nil {
|
||||
builder.WriteString(", s_time=")
|
||||
builder.WriteString(fmt.Sprintf("%v", *v))
|
||||
}
|
||||
if v := dp.IoIn; v != nil {
|
||||
builder.WriteString(", io_in=")
|
||||
builder.WriteString(fmt.Sprintf("%v", *v))
|
||||
}
|
||||
if v := dp.IoOut; v != nil {
|
||||
builder.WriteString(", io_out=")
|
||||
builder.WriteString(fmt.Sprintf("%v", *v))
|
||||
}
|
||||
builder.WriteByte(')')
|
||||
return builder.String()
|
||||
}
|
||||
|
@@ -29,8 +29,6 @@ const (
|
||||
FieldRepoVersion = "repo_version"
|
||||
// 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.
|
||||
@@ -43,6 +41,16 @@ const (
|
||||
FieldLastVerified = "last_verified"
|
||||
// FieldDebugSymbols holds the string denoting the debug_symbols field in the database.
|
||||
FieldDebugSymbols = "debug_symbols"
|
||||
// FieldMaxRss holds the string denoting the max_rss field in the database.
|
||||
FieldMaxRss = "max_rss"
|
||||
// FieldUTime holds the string denoting the u_time field in the database.
|
||||
FieldUTime = "u_time"
|
||||
// FieldSTime holds the string denoting the s_time field in the database.
|
||||
FieldSTime = "s_time"
|
||||
// FieldIoIn holds the string denoting the io_in field in the database.
|
||||
FieldIoIn = "io_in"
|
||||
// FieldIoOut holds the string denoting the io_out field in the database.
|
||||
FieldIoOut = "io_out"
|
||||
// Table holds the table name of the dbpackage in the database.
|
||||
Table = "db_packages"
|
||||
)
|
||||
@@ -59,13 +67,17 @@ var Columns = []string{
|
||||
FieldVersion,
|
||||
FieldRepoVersion,
|
||||
FieldBuildTimeStart,
|
||||
FieldBuildTimeEnd,
|
||||
FieldUpdated,
|
||||
FieldHash,
|
||||
FieldLto,
|
||||
FieldLastVersionBuild,
|
||||
FieldLastVerified,
|
||||
FieldDebugSymbols,
|
||||
FieldMaxRss,
|
||||
FieldUTime,
|
||||
FieldSTime,
|
||||
FieldIoIn,
|
||||
FieldIoOut,
|
||||
}
|
||||
|
||||
// ValidColumn reports if the column name is valid (part of the table columns).
|
||||
|
@@ -134,13 +134,6 @@ func BuildTimeStart(v time.Time) 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(FieldBuildTimeEnd), v))
|
||||
})
|
||||
}
|
||||
|
||||
// Updated applies equality check predicate on the "updated" field. It's identical to UpdatedEQ.
|
||||
func Updated(v time.Time) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
@@ -169,6 +162,41 @@ func LastVerified(v time.Time) predicate.DbPackage {
|
||||
})
|
||||
}
|
||||
|
||||
// MaxRss applies equality check predicate on the "max_rss" field. It's identical to MaxRssEQ.
|
||||
func MaxRss(v int64) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.EQ(s.C(FieldMaxRss), v))
|
||||
})
|
||||
}
|
||||
|
||||
// UTime applies equality check predicate on the "u_time" field. It's identical to UTimeEQ.
|
||||
func UTime(v int64) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.EQ(s.C(FieldUTime), v))
|
||||
})
|
||||
}
|
||||
|
||||
// STime applies equality check predicate on the "s_time" field. It's identical to STimeEQ.
|
||||
func STime(v int64) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.EQ(s.C(FieldSTime), v))
|
||||
})
|
||||
}
|
||||
|
||||
// IoIn applies equality check predicate on the "io_in" field. It's identical to IoInEQ.
|
||||
func IoIn(v int64) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.EQ(s.C(FieldIoIn), v))
|
||||
})
|
||||
}
|
||||
|
||||
// IoOut applies equality check predicate on the "io_out" field. It's identical to IoOutEQ.
|
||||
func IoOut(v int64) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.EQ(s.C(FieldIoOut), v))
|
||||
})
|
||||
}
|
||||
|
||||
// PkgbaseEQ applies the EQ predicate on the "pkgbase" field.
|
||||
func PkgbaseEQ(v string) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
@@ -980,96 +1008,6 @@ func BuildTimeStartNotNil() 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(FieldBuildTimeEnd), v))
|
||||
})
|
||||
}
|
||||
|
||||
// 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(FieldBuildTimeEnd), v))
|
||||
})
|
||||
}
|
||||
|
||||
// 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]
|
||||
}
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
// if not arguments were provided, append the FALSE constants,
|
||||
// since we can't apply "IN ()". This will make this predicate falsy.
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
s.Where(sql.In(s.C(FieldBuildTimeEnd), v...))
|
||||
})
|
||||
}
|
||||
|
||||
// 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]
|
||||
}
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
// if not arguments were provided, append the FALSE constants,
|
||||
// since we can't apply "IN ()". This will make this predicate falsy.
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
s.Where(sql.NotIn(s.C(FieldBuildTimeEnd), v...))
|
||||
})
|
||||
}
|
||||
|
||||
// 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(FieldBuildTimeEnd), v))
|
||||
})
|
||||
}
|
||||
|
||||
// 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(FieldBuildTimeEnd), v))
|
||||
})
|
||||
}
|
||||
|
||||
// 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(FieldBuildTimeEnd), v))
|
||||
})
|
||||
}
|
||||
|
||||
// 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(FieldBuildTimeEnd), v))
|
||||
})
|
||||
}
|
||||
|
||||
// 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(FieldBuildTimeEnd)))
|
||||
})
|
||||
}
|
||||
|
||||
// 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(FieldBuildTimeEnd)))
|
||||
})
|
||||
}
|
||||
|
||||
// UpdatedEQ applies the EQ predicate on the "updated" field.
|
||||
func UpdatedEQ(v time.Time) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
@@ -1624,6 +1562,456 @@ func DebugSymbolsNotNil() predicate.DbPackage {
|
||||
})
|
||||
}
|
||||
|
||||
// MaxRssEQ applies the EQ predicate on the "max_rss" field.
|
||||
func MaxRssEQ(v int64) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.EQ(s.C(FieldMaxRss), v))
|
||||
})
|
||||
}
|
||||
|
||||
// MaxRssNEQ applies the NEQ predicate on the "max_rss" field.
|
||||
func MaxRssNEQ(v int64) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.NEQ(s.C(FieldMaxRss), v))
|
||||
})
|
||||
}
|
||||
|
||||
// MaxRssIn applies the In predicate on the "max_rss" field.
|
||||
func MaxRssIn(vs ...int64) predicate.DbPackage {
|
||||
v := make([]interface{}, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
// if not arguments were provided, append the FALSE constants,
|
||||
// since we can't apply "IN ()". This will make this predicate falsy.
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
s.Where(sql.In(s.C(FieldMaxRss), v...))
|
||||
})
|
||||
}
|
||||
|
||||
// MaxRssNotIn applies the NotIn predicate on the "max_rss" field.
|
||||
func MaxRssNotIn(vs ...int64) predicate.DbPackage {
|
||||
v := make([]interface{}, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
// if not arguments were provided, append the FALSE constants,
|
||||
// since we can't apply "IN ()". This will make this predicate falsy.
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
s.Where(sql.NotIn(s.C(FieldMaxRss), v...))
|
||||
})
|
||||
}
|
||||
|
||||
// MaxRssGT applies the GT predicate on the "max_rss" field.
|
||||
func MaxRssGT(v int64) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.GT(s.C(FieldMaxRss), v))
|
||||
})
|
||||
}
|
||||
|
||||
// MaxRssGTE applies the GTE predicate on the "max_rss" field.
|
||||
func MaxRssGTE(v int64) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.GTE(s.C(FieldMaxRss), v))
|
||||
})
|
||||
}
|
||||
|
||||
// MaxRssLT applies the LT predicate on the "max_rss" field.
|
||||
func MaxRssLT(v int64) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.LT(s.C(FieldMaxRss), v))
|
||||
})
|
||||
}
|
||||
|
||||
// MaxRssLTE applies the LTE predicate on the "max_rss" field.
|
||||
func MaxRssLTE(v int64) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.LTE(s.C(FieldMaxRss), v))
|
||||
})
|
||||
}
|
||||
|
||||
// MaxRssIsNil applies the IsNil predicate on the "max_rss" field.
|
||||
func MaxRssIsNil() predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.IsNull(s.C(FieldMaxRss)))
|
||||
})
|
||||
}
|
||||
|
||||
// MaxRssNotNil applies the NotNil predicate on the "max_rss" field.
|
||||
func MaxRssNotNil() predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.NotNull(s.C(FieldMaxRss)))
|
||||
})
|
||||
}
|
||||
|
||||
// UTimeEQ applies the EQ predicate on the "u_time" field.
|
||||
func UTimeEQ(v int64) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.EQ(s.C(FieldUTime), v))
|
||||
})
|
||||
}
|
||||
|
||||
// UTimeNEQ applies the NEQ predicate on the "u_time" field.
|
||||
func UTimeNEQ(v int64) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.NEQ(s.C(FieldUTime), v))
|
||||
})
|
||||
}
|
||||
|
||||
// UTimeIn applies the In predicate on the "u_time" field.
|
||||
func UTimeIn(vs ...int64) predicate.DbPackage {
|
||||
v := make([]interface{}, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
// if not arguments were provided, append the FALSE constants,
|
||||
// since we can't apply "IN ()". This will make this predicate falsy.
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
s.Where(sql.In(s.C(FieldUTime), v...))
|
||||
})
|
||||
}
|
||||
|
||||
// UTimeNotIn applies the NotIn predicate on the "u_time" field.
|
||||
func UTimeNotIn(vs ...int64) predicate.DbPackage {
|
||||
v := make([]interface{}, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
// if not arguments were provided, append the FALSE constants,
|
||||
// since we can't apply "IN ()". This will make this predicate falsy.
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
s.Where(sql.NotIn(s.C(FieldUTime), v...))
|
||||
})
|
||||
}
|
||||
|
||||
// UTimeGT applies the GT predicate on the "u_time" field.
|
||||
func UTimeGT(v int64) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.GT(s.C(FieldUTime), v))
|
||||
})
|
||||
}
|
||||
|
||||
// UTimeGTE applies the GTE predicate on the "u_time" field.
|
||||
func UTimeGTE(v int64) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.GTE(s.C(FieldUTime), v))
|
||||
})
|
||||
}
|
||||
|
||||
// UTimeLT applies the LT predicate on the "u_time" field.
|
||||
func UTimeLT(v int64) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.LT(s.C(FieldUTime), v))
|
||||
})
|
||||
}
|
||||
|
||||
// UTimeLTE applies the LTE predicate on the "u_time" field.
|
||||
func UTimeLTE(v int64) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.LTE(s.C(FieldUTime), v))
|
||||
})
|
||||
}
|
||||
|
||||
// UTimeIsNil applies the IsNil predicate on the "u_time" field.
|
||||
func UTimeIsNil() predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.IsNull(s.C(FieldUTime)))
|
||||
})
|
||||
}
|
||||
|
||||
// UTimeNotNil applies the NotNil predicate on the "u_time" field.
|
||||
func UTimeNotNil() predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.NotNull(s.C(FieldUTime)))
|
||||
})
|
||||
}
|
||||
|
||||
// STimeEQ applies the EQ predicate on the "s_time" field.
|
||||
func STimeEQ(v int64) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.EQ(s.C(FieldSTime), v))
|
||||
})
|
||||
}
|
||||
|
||||
// STimeNEQ applies the NEQ predicate on the "s_time" field.
|
||||
func STimeNEQ(v int64) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.NEQ(s.C(FieldSTime), v))
|
||||
})
|
||||
}
|
||||
|
||||
// STimeIn applies the In predicate on the "s_time" field.
|
||||
func STimeIn(vs ...int64) predicate.DbPackage {
|
||||
v := make([]interface{}, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
// if not arguments were provided, append the FALSE constants,
|
||||
// since we can't apply "IN ()". This will make this predicate falsy.
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
s.Where(sql.In(s.C(FieldSTime), v...))
|
||||
})
|
||||
}
|
||||
|
||||
// STimeNotIn applies the NotIn predicate on the "s_time" field.
|
||||
func STimeNotIn(vs ...int64) predicate.DbPackage {
|
||||
v := make([]interface{}, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
// if not arguments were provided, append the FALSE constants,
|
||||
// since we can't apply "IN ()". This will make this predicate falsy.
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
s.Where(sql.NotIn(s.C(FieldSTime), v...))
|
||||
})
|
||||
}
|
||||
|
||||
// STimeGT applies the GT predicate on the "s_time" field.
|
||||
func STimeGT(v int64) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.GT(s.C(FieldSTime), v))
|
||||
})
|
||||
}
|
||||
|
||||
// STimeGTE applies the GTE predicate on the "s_time" field.
|
||||
func STimeGTE(v int64) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.GTE(s.C(FieldSTime), v))
|
||||
})
|
||||
}
|
||||
|
||||
// STimeLT applies the LT predicate on the "s_time" field.
|
||||
func STimeLT(v int64) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.LT(s.C(FieldSTime), v))
|
||||
})
|
||||
}
|
||||
|
||||
// STimeLTE applies the LTE predicate on the "s_time" field.
|
||||
func STimeLTE(v int64) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.LTE(s.C(FieldSTime), v))
|
||||
})
|
||||
}
|
||||
|
||||
// STimeIsNil applies the IsNil predicate on the "s_time" field.
|
||||
func STimeIsNil() predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.IsNull(s.C(FieldSTime)))
|
||||
})
|
||||
}
|
||||
|
||||
// STimeNotNil applies the NotNil predicate on the "s_time" field.
|
||||
func STimeNotNil() predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.NotNull(s.C(FieldSTime)))
|
||||
})
|
||||
}
|
||||
|
||||
// IoInEQ applies the EQ predicate on the "io_in" field.
|
||||
func IoInEQ(v int64) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.EQ(s.C(FieldIoIn), v))
|
||||
})
|
||||
}
|
||||
|
||||
// IoInNEQ applies the NEQ predicate on the "io_in" field.
|
||||
func IoInNEQ(v int64) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.NEQ(s.C(FieldIoIn), v))
|
||||
})
|
||||
}
|
||||
|
||||
// IoInIn applies the In predicate on the "io_in" field.
|
||||
func IoInIn(vs ...int64) predicate.DbPackage {
|
||||
v := make([]interface{}, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
// if not arguments were provided, append the FALSE constants,
|
||||
// since we can't apply "IN ()". This will make this predicate falsy.
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
s.Where(sql.In(s.C(FieldIoIn), v...))
|
||||
})
|
||||
}
|
||||
|
||||
// IoInNotIn applies the NotIn predicate on the "io_in" field.
|
||||
func IoInNotIn(vs ...int64) predicate.DbPackage {
|
||||
v := make([]interface{}, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
// if not arguments were provided, append the FALSE constants,
|
||||
// since we can't apply "IN ()". This will make this predicate falsy.
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
s.Where(sql.NotIn(s.C(FieldIoIn), v...))
|
||||
})
|
||||
}
|
||||
|
||||
// IoInGT applies the GT predicate on the "io_in" field.
|
||||
func IoInGT(v int64) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.GT(s.C(FieldIoIn), v))
|
||||
})
|
||||
}
|
||||
|
||||
// IoInGTE applies the GTE predicate on the "io_in" field.
|
||||
func IoInGTE(v int64) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.GTE(s.C(FieldIoIn), v))
|
||||
})
|
||||
}
|
||||
|
||||
// IoInLT applies the LT predicate on the "io_in" field.
|
||||
func IoInLT(v int64) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.LT(s.C(FieldIoIn), v))
|
||||
})
|
||||
}
|
||||
|
||||
// IoInLTE applies the LTE predicate on the "io_in" field.
|
||||
func IoInLTE(v int64) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.LTE(s.C(FieldIoIn), v))
|
||||
})
|
||||
}
|
||||
|
||||
// IoInIsNil applies the IsNil predicate on the "io_in" field.
|
||||
func IoInIsNil() predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.IsNull(s.C(FieldIoIn)))
|
||||
})
|
||||
}
|
||||
|
||||
// IoInNotNil applies the NotNil predicate on the "io_in" field.
|
||||
func IoInNotNil() predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.NotNull(s.C(FieldIoIn)))
|
||||
})
|
||||
}
|
||||
|
||||
// IoOutEQ applies the EQ predicate on the "io_out" field.
|
||||
func IoOutEQ(v int64) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.EQ(s.C(FieldIoOut), v))
|
||||
})
|
||||
}
|
||||
|
||||
// IoOutNEQ applies the NEQ predicate on the "io_out" field.
|
||||
func IoOutNEQ(v int64) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.NEQ(s.C(FieldIoOut), v))
|
||||
})
|
||||
}
|
||||
|
||||
// IoOutIn applies the In predicate on the "io_out" field.
|
||||
func IoOutIn(vs ...int64) predicate.DbPackage {
|
||||
v := make([]interface{}, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
// if not arguments were provided, append the FALSE constants,
|
||||
// since we can't apply "IN ()". This will make this predicate falsy.
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
s.Where(sql.In(s.C(FieldIoOut), v...))
|
||||
})
|
||||
}
|
||||
|
||||
// IoOutNotIn applies the NotIn predicate on the "io_out" field.
|
||||
func IoOutNotIn(vs ...int64) predicate.DbPackage {
|
||||
v := make([]interface{}, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
// if not arguments were provided, append the FALSE constants,
|
||||
// since we can't apply "IN ()". This will make this predicate falsy.
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
s.Where(sql.NotIn(s.C(FieldIoOut), v...))
|
||||
})
|
||||
}
|
||||
|
||||
// IoOutGT applies the GT predicate on the "io_out" field.
|
||||
func IoOutGT(v int64) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.GT(s.C(FieldIoOut), v))
|
||||
})
|
||||
}
|
||||
|
||||
// IoOutGTE applies the GTE predicate on the "io_out" field.
|
||||
func IoOutGTE(v int64) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.GTE(s.C(FieldIoOut), v))
|
||||
})
|
||||
}
|
||||
|
||||
// IoOutLT applies the LT predicate on the "io_out" field.
|
||||
func IoOutLT(v int64) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.LT(s.C(FieldIoOut), v))
|
||||
})
|
||||
}
|
||||
|
||||
// IoOutLTE applies the LTE predicate on the "io_out" field.
|
||||
func IoOutLTE(v int64) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.LTE(s.C(FieldIoOut), v))
|
||||
})
|
||||
}
|
||||
|
||||
// IoOutIsNil applies the IsNil predicate on the "io_out" field.
|
||||
func IoOutIsNil() predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.IsNull(s.C(FieldIoOut)))
|
||||
})
|
||||
}
|
||||
|
||||
// IoOutNotNil applies the NotNil predicate on the "io_out" field.
|
||||
func IoOutNotNil() predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
s.Where(sql.NotNull(s.C(FieldIoOut)))
|
||||
})
|
||||
}
|
||||
|
||||
// And groups predicates with the AND operator between them.
|
||||
func And(predicates ...predicate.DbPackage) predicate.DbPackage {
|
||||
return predicate.DbPackage(func(s *sql.Selector) {
|
||||
|
@@ -114,20 +114,6 @@ func (dpc *DbPackageCreate) SetNillableBuildTimeStart(t *time.Time) *DbPackageCr
|
||||
return dpc
|
||||
}
|
||||
|
||||
// SetBuildTimeEnd sets the "build_time_end" field.
|
||||
func (dpc *DbPackageCreate) SetBuildTimeEnd(t time.Time) *DbPackageCreate {
|
||||
dpc.mutation.SetBuildTimeEnd(t)
|
||||
return dpc
|
||||
}
|
||||
|
||||
// SetNillableBuildTimeEnd sets the "build_time_end" field if the given value is not nil.
|
||||
func (dpc *DbPackageCreate) SetNillableBuildTimeEnd(t *time.Time) *DbPackageCreate {
|
||||
if t != nil {
|
||||
dpc.SetBuildTimeEnd(*t)
|
||||
}
|
||||
return dpc
|
||||
}
|
||||
|
||||
// SetUpdated sets the "updated" field.
|
||||
func (dpc *DbPackageCreate) SetUpdated(t time.Time) *DbPackageCreate {
|
||||
dpc.mutation.SetUpdated(t)
|
||||
@@ -212,6 +198,76 @@ func (dpc *DbPackageCreate) SetNillableDebugSymbols(ds *dbpackage.DebugSymbols)
|
||||
return dpc
|
||||
}
|
||||
|
||||
// SetMaxRss sets the "max_rss" field.
|
||||
func (dpc *DbPackageCreate) SetMaxRss(i int64) *DbPackageCreate {
|
||||
dpc.mutation.SetMaxRss(i)
|
||||
return dpc
|
||||
}
|
||||
|
||||
// SetNillableMaxRss sets the "max_rss" field if the given value is not nil.
|
||||
func (dpc *DbPackageCreate) SetNillableMaxRss(i *int64) *DbPackageCreate {
|
||||
if i != nil {
|
||||
dpc.SetMaxRss(*i)
|
||||
}
|
||||
return dpc
|
||||
}
|
||||
|
||||
// SetUTime sets the "u_time" field.
|
||||
func (dpc *DbPackageCreate) SetUTime(i int64) *DbPackageCreate {
|
||||
dpc.mutation.SetUTime(i)
|
||||
return dpc
|
||||
}
|
||||
|
||||
// SetNillableUTime sets the "u_time" field if the given value is not nil.
|
||||
func (dpc *DbPackageCreate) SetNillableUTime(i *int64) *DbPackageCreate {
|
||||
if i != nil {
|
||||
dpc.SetUTime(*i)
|
||||
}
|
||||
return dpc
|
||||
}
|
||||
|
||||
// SetSTime sets the "s_time" field.
|
||||
func (dpc *DbPackageCreate) SetSTime(i int64) *DbPackageCreate {
|
||||
dpc.mutation.SetSTime(i)
|
||||
return dpc
|
||||
}
|
||||
|
||||
// SetNillableSTime sets the "s_time" field if the given value is not nil.
|
||||
func (dpc *DbPackageCreate) SetNillableSTime(i *int64) *DbPackageCreate {
|
||||
if i != nil {
|
||||
dpc.SetSTime(*i)
|
||||
}
|
||||
return dpc
|
||||
}
|
||||
|
||||
// SetIoIn sets the "io_in" field.
|
||||
func (dpc *DbPackageCreate) SetIoIn(i int64) *DbPackageCreate {
|
||||
dpc.mutation.SetIoIn(i)
|
||||
return dpc
|
||||
}
|
||||
|
||||
// SetNillableIoIn sets the "io_in" field if the given value is not nil.
|
||||
func (dpc *DbPackageCreate) SetNillableIoIn(i *int64) *DbPackageCreate {
|
||||
if i != nil {
|
||||
dpc.SetIoIn(*i)
|
||||
}
|
||||
return dpc
|
||||
}
|
||||
|
||||
// SetIoOut sets the "io_out" field.
|
||||
func (dpc *DbPackageCreate) SetIoOut(i int64) *DbPackageCreate {
|
||||
dpc.mutation.SetIoOut(i)
|
||||
return dpc
|
||||
}
|
||||
|
||||
// SetNillableIoOut sets the "io_out" field if the given value is not nil.
|
||||
func (dpc *DbPackageCreate) SetNillableIoOut(i *int64) *DbPackageCreate {
|
||||
if i != nil {
|
||||
dpc.SetIoOut(*i)
|
||||
}
|
||||
return dpc
|
||||
}
|
||||
|
||||
// Mutation returns the DbPackageMutation object of the builder.
|
||||
func (dpc *DbPackageCreate) Mutation() *DbPackageMutation {
|
||||
return dpc.mutation
|
||||
@@ -437,14 +493,6 @@ func (dpc *DbPackageCreate) createSpec() (*DbPackage, *sqlgraph.CreateSpec) {
|
||||
})
|
||||
_node.BuildTimeStart = value
|
||||
}
|
||||
if value, ok := dpc.mutation.BuildTimeEnd(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeTime,
|
||||
Value: value,
|
||||
Column: dbpackage.FieldBuildTimeEnd,
|
||||
})
|
||||
_node.BuildTimeEnd = value
|
||||
}
|
||||
if value, ok := dpc.mutation.Updated(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeTime,
|
||||
@@ -493,6 +541,46 @@ func (dpc *DbPackageCreate) createSpec() (*DbPackage, *sqlgraph.CreateSpec) {
|
||||
})
|
||||
_node.DebugSymbols = value
|
||||
}
|
||||
if value, ok := dpc.mutation.MaxRss(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt64,
|
||||
Value: value,
|
||||
Column: dbpackage.FieldMaxRss,
|
||||
})
|
||||
_node.MaxRss = &value
|
||||
}
|
||||
if value, ok := dpc.mutation.UTime(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt64,
|
||||
Value: value,
|
||||
Column: dbpackage.FieldUTime,
|
||||
})
|
||||
_node.UTime = &value
|
||||
}
|
||||
if value, ok := dpc.mutation.STime(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt64,
|
||||
Value: value,
|
||||
Column: dbpackage.FieldSTime,
|
||||
})
|
||||
_node.STime = &value
|
||||
}
|
||||
if value, ok := dpc.mutation.IoIn(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt64,
|
||||
Value: value,
|
||||
Column: dbpackage.FieldIoIn,
|
||||
})
|
||||
_node.IoIn = &value
|
||||
}
|
||||
if value, ok := dpc.mutation.IoOut(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt64,
|
||||
Value: value,
|
||||
Column: dbpackage.FieldIoOut,
|
||||
})
|
||||
_node.IoOut = &value
|
||||
}
|
||||
return _node, _spec
|
||||
}
|
||||
|
||||
|
@@ -146,26 +146,6 @@ func (dpu *DbPackageUpdate) ClearBuildTimeStart() *DbPackageUpdate {
|
||||
return dpu
|
||||
}
|
||||
|
||||
// SetBuildTimeEnd sets the "build_time_end" field.
|
||||
func (dpu *DbPackageUpdate) SetBuildTimeEnd(t time.Time) *DbPackageUpdate {
|
||||
dpu.mutation.SetBuildTimeEnd(t)
|
||||
return dpu
|
||||
}
|
||||
|
||||
// SetNillableBuildTimeEnd sets the "build_time_end" field if the given value is not nil.
|
||||
func (dpu *DbPackageUpdate) SetNillableBuildTimeEnd(t *time.Time) *DbPackageUpdate {
|
||||
if t != nil {
|
||||
dpu.SetBuildTimeEnd(*t)
|
||||
}
|
||||
return dpu
|
||||
}
|
||||
|
||||
// ClearBuildTimeEnd clears the value of the "build_time_end" field.
|
||||
func (dpu *DbPackageUpdate) ClearBuildTimeEnd() *DbPackageUpdate {
|
||||
dpu.mutation.ClearBuildTimeEnd()
|
||||
return dpu
|
||||
}
|
||||
|
||||
// SetUpdated sets the "updated" field.
|
||||
func (dpu *DbPackageUpdate) SetUpdated(t time.Time) *DbPackageUpdate {
|
||||
dpu.mutation.SetUpdated(t)
|
||||
@@ -286,6 +266,141 @@ func (dpu *DbPackageUpdate) ClearDebugSymbols() *DbPackageUpdate {
|
||||
return dpu
|
||||
}
|
||||
|
||||
// SetMaxRss sets the "max_rss" field.
|
||||
func (dpu *DbPackageUpdate) SetMaxRss(i int64) *DbPackageUpdate {
|
||||
dpu.mutation.ResetMaxRss()
|
||||
dpu.mutation.SetMaxRss(i)
|
||||
return dpu
|
||||
}
|
||||
|
||||
// SetNillableMaxRss sets the "max_rss" field if the given value is not nil.
|
||||
func (dpu *DbPackageUpdate) SetNillableMaxRss(i *int64) *DbPackageUpdate {
|
||||
if i != nil {
|
||||
dpu.SetMaxRss(*i)
|
||||
}
|
||||
return dpu
|
||||
}
|
||||
|
||||
// AddMaxRss adds i to the "max_rss" field.
|
||||
func (dpu *DbPackageUpdate) AddMaxRss(i int64) *DbPackageUpdate {
|
||||
dpu.mutation.AddMaxRss(i)
|
||||
return dpu
|
||||
}
|
||||
|
||||
// ClearMaxRss clears the value of the "max_rss" field.
|
||||
func (dpu *DbPackageUpdate) ClearMaxRss() *DbPackageUpdate {
|
||||
dpu.mutation.ClearMaxRss()
|
||||
return dpu
|
||||
}
|
||||
|
||||
// SetUTime sets the "u_time" field.
|
||||
func (dpu *DbPackageUpdate) SetUTime(i int64) *DbPackageUpdate {
|
||||
dpu.mutation.ResetUTime()
|
||||
dpu.mutation.SetUTime(i)
|
||||
return dpu
|
||||
}
|
||||
|
||||
// SetNillableUTime sets the "u_time" field if the given value is not nil.
|
||||
func (dpu *DbPackageUpdate) SetNillableUTime(i *int64) *DbPackageUpdate {
|
||||
if i != nil {
|
||||
dpu.SetUTime(*i)
|
||||
}
|
||||
return dpu
|
||||
}
|
||||
|
||||
// AddUTime adds i to the "u_time" field.
|
||||
func (dpu *DbPackageUpdate) AddUTime(i int64) *DbPackageUpdate {
|
||||
dpu.mutation.AddUTime(i)
|
||||
return dpu
|
||||
}
|
||||
|
||||
// ClearUTime clears the value of the "u_time" field.
|
||||
func (dpu *DbPackageUpdate) ClearUTime() *DbPackageUpdate {
|
||||
dpu.mutation.ClearUTime()
|
||||
return dpu
|
||||
}
|
||||
|
||||
// SetSTime sets the "s_time" field.
|
||||
func (dpu *DbPackageUpdate) SetSTime(i int64) *DbPackageUpdate {
|
||||
dpu.mutation.ResetSTime()
|
||||
dpu.mutation.SetSTime(i)
|
||||
return dpu
|
||||
}
|
||||
|
||||
// SetNillableSTime sets the "s_time" field if the given value is not nil.
|
||||
func (dpu *DbPackageUpdate) SetNillableSTime(i *int64) *DbPackageUpdate {
|
||||
if i != nil {
|
||||
dpu.SetSTime(*i)
|
||||
}
|
||||
return dpu
|
||||
}
|
||||
|
||||
// AddSTime adds i to the "s_time" field.
|
||||
func (dpu *DbPackageUpdate) AddSTime(i int64) *DbPackageUpdate {
|
||||
dpu.mutation.AddSTime(i)
|
||||
return dpu
|
||||
}
|
||||
|
||||
// ClearSTime clears the value of the "s_time" field.
|
||||
func (dpu *DbPackageUpdate) ClearSTime() *DbPackageUpdate {
|
||||
dpu.mutation.ClearSTime()
|
||||
return dpu
|
||||
}
|
||||
|
||||
// SetIoIn sets the "io_in" field.
|
||||
func (dpu *DbPackageUpdate) SetIoIn(i int64) *DbPackageUpdate {
|
||||
dpu.mutation.ResetIoIn()
|
||||
dpu.mutation.SetIoIn(i)
|
||||
return dpu
|
||||
}
|
||||
|
||||
// SetNillableIoIn sets the "io_in" field if the given value is not nil.
|
||||
func (dpu *DbPackageUpdate) SetNillableIoIn(i *int64) *DbPackageUpdate {
|
||||
if i != nil {
|
||||
dpu.SetIoIn(*i)
|
||||
}
|
||||
return dpu
|
||||
}
|
||||
|
||||
// AddIoIn adds i to the "io_in" field.
|
||||
func (dpu *DbPackageUpdate) AddIoIn(i int64) *DbPackageUpdate {
|
||||
dpu.mutation.AddIoIn(i)
|
||||
return dpu
|
||||
}
|
||||
|
||||
// ClearIoIn clears the value of the "io_in" field.
|
||||
func (dpu *DbPackageUpdate) ClearIoIn() *DbPackageUpdate {
|
||||
dpu.mutation.ClearIoIn()
|
||||
return dpu
|
||||
}
|
||||
|
||||
// SetIoOut sets the "io_out" field.
|
||||
func (dpu *DbPackageUpdate) SetIoOut(i int64) *DbPackageUpdate {
|
||||
dpu.mutation.ResetIoOut()
|
||||
dpu.mutation.SetIoOut(i)
|
||||
return dpu
|
||||
}
|
||||
|
||||
// SetNillableIoOut sets the "io_out" field if the given value is not nil.
|
||||
func (dpu *DbPackageUpdate) SetNillableIoOut(i *int64) *DbPackageUpdate {
|
||||
if i != nil {
|
||||
dpu.SetIoOut(*i)
|
||||
}
|
||||
return dpu
|
||||
}
|
||||
|
||||
// AddIoOut adds i to the "io_out" field.
|
||||
func (dpu *DbPackageUpdate) AddIoOut(i int64) *DbPackageUpdate {
|
||||
dpu.mutation.AddIoOut(i)
|
||||
return dpu
|
||||
}
|
||||
|
||||
// ClearIoOut clears the value of the "io_out" field.
|
||||
func (dpu *DbPackageUpdate) ClearIoOut() *DbPackageUpdate {
|
||||
dpu.mutation.ClearIoOut()
|
||||
return dpu
|
||||
}
|
||||
|
||||
// Mutation returns the DbPackageMutation object of the builder.
|
||||
func (dpu *DbPackageUpdate) Mutation() *DbPackageMutation {
|
||||
return dpu.mutation
|
||||
@@ -479,19 +594,6 @@ func (dpu *DbPackageUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
||||
Column: dbpackage.FieldBuildTimeStart,
|
||||
})
|
||||
}
|
||||
if value, ok := dpu.mutation.BuildTimeEnd(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeTime,
|
||||
Value: value,
|
||||
Column: dbpackage.FieldBuildTimeEnd,
|
||||
})
|
||||
}
|
||||
if dpu.mutation.BuildTimeEndCleared() {
|
||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeTime,
|
||||
Column: dbpackage.FieldBuildTimeEnd,
|
||||
})
|
||||
}
|
||||
if value, ok := dpu.mutation.Updated(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeTime,
|
||||
@@ -570,6 +672,106 @@ func (dpu *DbPackageUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
||||
Column: dbpackage.FieldDebugSymbols,
|
||||
})
|
||||
}
|
||||
if value, ok := dpu.mutation.MaxRss(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt64,
|
||||
Value: value,
|
||||
Column: dbpackage.FieldMaxRss,
|
||||
})
|
||||
}
|
||||
if value, ok := dpu.mutation.AddedMaxRss(); ok {
|
||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt64,
|
||||
Value: value,
|
||||
Column: dbpackage.FieldMaxRss,
|
||||
})
|
||||
}
|
||||
if dpu.mutation.MaxRssCleared() {
|
||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt64,
|
||||
Column: dbpackage.FieldMaxRss,
|
||||
})
|
||||
}
|
||||
if value, ok := dpu.mutation.UTime(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt64,
|
||||
Value: value,
|
||||
Column: dbpackage.FieldUTime,
|
||||
})
|
||||
}
|
||||
if value, ok := dpu.mutation.AddedUTime(); ok {
|
||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt64,
|
||||
Value: value,
|
||||
Column: dbpackage.FieldUTime,
|
||||
})
|
||||
}
|
||||
if dpu.mutation.UTimeCleared() {
|
||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt64,
|
||||
Column: dbpackage.FieldUTime,
|
||||
})
|
||||
}
|
||||
if value, ok := dpu.mutation.STime(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt64,
|
||||
Value: value,
|
||||
Column: dbpackage.FieldSTime,
|
||||
})
|
||||
}
|
||||
if value, ok := dpu.mutation.AddedSTime(); ok {
|
||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt64,
|
||||
Value: value,
|
||||
Column: dbpackage.FieldSTime,
|
||||
})
|
||||
}
|
||||
if dpu.mutation.STimeCleared() {
|
||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt64,
|
||||
Column: dbpackage.FieldSTime,
|
||||
})
|
||||
}
|
||||
if value, ok := dpu.mutation.IoIn(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt64,
|
||||
Value: value,
|
||||
Column: dbpackage.FieldIoIn,
|
||||
})
|
||||
}
|
||||
if value, ok := dpu.mutation.AddedIoIn(); ok {
|
||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt64,
|
||||
Value: value,
|
||||
Column: dbpackage.FieldIoIn,
|
||||
})
|
||||
}
|
||||
if dpu.mutation.IoInCleared() {
|
||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt64,
|
||||
Column: dbpackage.FieldIoIn,
|
||||
})
|
||||
}
|
||||
if value, ok := dpu.mutation.IoOut(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt64,
|
||||
Value: value,
|
||||
Column: dbpackage.FieldIoOut,
|
||||
})
|
||||
}
|
||||
if value, ok := dpu.mutation.AddedIoOut(); ok {
|
||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt64,
|
||||
Value: value,
|
||||
Column: dbpackage.FieldIoOut,
|
||||
})
|
||||
}
|
||||
if dpu.mutation.IoOutCleared() {
|
||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt64,
|
||||
Column: dbpackage.FieldIoOut,
|
||||
})
|
||||
}
|
||||
if n, err = sqlgraph.UpdateNodes(ctx, dpu.driver, _spec); err != nil {
|
||||
if _, ok := err.(*sqlgraph.NotFoundError); ok {
|
||||
err = &NotFoundError{dbpackage.Label}
|
||||
@@ -707,26 +909,6 @@ func (dpuo *DbPackageUpdateOne) ClearBuildTimeStart() *DbPackageUpdateOne {
|
||||
return dpuo
|
||||
}
|
||||
|
||||
// SetBuildTimeEnd sets the "build_time_end" field.
|
||||
func (dpuo *DbPackageUpdateOne) SetBuildTimeEnd(t time.Time) *DbPackageUpdateOne {
|
||||
dpuo.mutation.SetBuildTimeEnd(t)
|
||||
return dpuo
|
||||
}
|
||||
|
||||
// SetNillableBuildTimeEnd sets the "build_time_end" field if the given value is not nil.
|
||||
func (dpuo *DbPackageUpdateOne) SetNillableBuildTimeEnd(t *time.Time) *DbPackageUpdateOne {
|
||||
if t != nil {
|
||||
dpuo.SetBuildTimeEnd(*t)
|
||||
}
|
||||
return dpuo
|
||||
}
|
||||
|
||||
// ClearBuildTimeEnd clears the value of the "build_time_end" field.
|
||||
func (dpuo *DbPackageUpdateOne) ClearBuildTimeEnd() *DbPackageUpdateOne {
|
||||
dpuo.mutation.ClearBuildTimeEnd()
|
||||
return dpuo
|
||||
}
|
||||
|
||||
// SetUpdated sets the "updated" field.
|
||||
func (dpuo *DbPackageUpdateOne) SetUpdated(t time.Time) *DbPackageUpdateOne {
|
||||
dpuo.mutation.SetUpdated(t)
|
||||
@@ -847,6 +1029,141 @@ func (dpuo *DbPackageUpdateOne) ClearDebugSymbols() *DbPackageUpdateOne {
|
||||
return dpuo
|
||||
}
|
||||
|
||||
// SetMaxRss sets the "max_rss" field.
|
||||
func (dpuo *DbPackageUpdateOne) SetMaxRss(i int64) *DbPackageUpdateOne {
|
||||
dpuo.mutation.ResetMaxRss()
|
||||
dpuo.mutation.SetMaxRss(i)
|
||||
return dpuo
|
||||
}
|
||||
|
||||
// SetNillableMaxRss sets the "max_rss" field if the given value is not nil.
|
||||
func (dpuo *DbPackageUpdateOne) SetNillableMaxRss(i *int64) *DbPackageUpdateOne {
|
||||
if i != nil {
|
||||
dpuo.SetMaxRss(*i)
|
||||
}
|
||||
return dpuo
|
||||
}
|
||||
|
||||
// AddMaxRss adds i to the "max_rss" field.
|
||||
func (dpuo *DbPackageUpdateOne) AddMaxRss(i int64) *DbPackageUpdateOne {
|
||||
dpuo.mutation.AddMaxRss(i)
|
||||
return dpuo
|
||||
}
|
||||
|
||||
// ClearMaxRss clears the value of the "max_rss" field.
|
||||
func (dpuo *DbPackageUpdateOne) ClearMaxRss() *DbPackageUpdateOne {
|
||||
dpuo.mutation.ClearMaxRss()
|
||||
return dpuo
|
||||
}
|
||||
|
||||
// SetUTime sets the "u_time" field.
|
||||
func (dpuo *DbPackageUpdateOne) SetUTime(i int64) *DbPackageUpdateOne {
|
||||
dpuo.mutation.ResetUTime()
|
||||
dpuo.mutation.SetUTime(i)
|
||||
return dpuo
|
||||
}
|
||||
|
||||
// SetNillableUTime sets the "u_time" field if the given value is not nil.
|
||||
func (dpuo *DbPackageUpdateOne) SetNillableUTime(i *int64) *DbPackageUpdateOne {
|
||||
if i != nil {
|
||||
dpuo.SetUTime(*i)
|
||||
}
|
||||
return dpuo
|
||||
}
|
||||
|
||||
// AddUTime adds i to the "u_time" field.
|
||||
func (dpuo *DbPackageUpdateOne) AddUTime(i int64) *DbPackageUpdateOne {
|
||||
dpuo.mutation.AddUTime(i)
|
||||
return dpuo
|
||||
}
|
||||
|
||||
// ClearUTime clears the value of the "u_time" field.
|
||||
func (dpuo *DbPackageUpdateOne) ClearUTime() *DbPackageUpdateOne {
|
||||
dpuo.mutation.ClearUTime()
|
||||
return dpuo
|
||||
}
|
||||
|
||||
// SetSTime sets the "s_time" field.
|
||||
func (dpuo *DbPackageUpdateOne) SetSTime(i int64) *DbPackageUpdateOne {
|
||||
dpuo.mutation.ResetSTime()
|
||||
dpuo.mutation.SetSTime(i)
|
||||
return dpuo
|
||||
}
|
||||
|
||||
// SetNillableSTime sets the "s_time" field if the given value is not nil.
|
||||
func (dpuo *DbPackageUpdateOne) SetNillableSTime(i *int64) *DbPackageUpdateOne {
|
||||
if i != nil {
|
||||
dpuo.SetSTime(*i)
|
||||
}
|
||||
return dpuo
|
||||
}
|
||||
|
||||
// AddSTime adds i to the "s_time" field.
|
||||
func (dpuo *DbPackageUpdateOne) AddSTime(i int64) *DbPackageUpdateOne {
|
||||
dpuo.mutation.AddSTime(i)
|
||||
return dpuo
|
||||
}
|
||||
|
||||
// ClearSTime clears the value of the "s_time" field.
|
||||
func (dpuo *DbPackageUpdateOne) ClearSTime() *DbPackageUpdateOne {
|
||||
dpuo.mutation.ClearSTime()
|
||||
return dpuo
|
||||
}
|
||||
|
||||
// SetIoIn sets the "io_in" field.
|
||||
func (dpuo *DbPackageUpdateOne) SetIoIn(i int64) *DbPackageUpdateOne {
|
||||
dpuo.mutation.ResetIoIn()
|
||||
dpuo.mutation.SetIoIn(i)
|
||||
return dpuo
|
||||
}
|
||||
|
||||
// SetNillableIoIn sets the "io_in" field if the given value is not nil.
|
||||
func (dpuo *DbPackageUpdateOne) SetNillableIoIn(i *int64) *DbPackageUpdateOne {
|
||||
if i != nil {
|
||||
dpuo.SetIoIn(*i)
|
||||
}
|
||||
return dpuo
|
||||
}
|
||||
|
||||
// AddIoIn adds i to the "io_in" field.
|
||||
func (dpuo *DbPackageUpdateOne) AddIoIn(i int64) *DbPackageUpdateOne {
|
||||
dpuo.mutation.AddIoIn(i)
|
||||
return dpuo
|
||||
}
|
||||
|
||||
// ClearIoIn clears the value of the "io_in" field.
|
||||
func (dpuo *DbPackageUpdateOne) ClearIoIn() *DbPackageUpdateOne {
|
||||
dpuo.mutation.ClearIoIn()
|
||||
return dpuo
|
||||
}
|
||||
|
||||
// SetIoOut sets the "io_out" field.
|
||||
func (dpuo *DbPackageUpdateOne) SetIoOut(i int64) *DbPackageUpdateOne {
|
||||
dpuo.mutation.ResetIoOut()
|
||||
dpuo.mutation.SetIoOut(i)
|
||||
return dpuo
|
||||
}
|
||||
|
||||
// SetNillableIoOut sets the "io_out" field if the given value is not nil.
|
||||
func (dpuo *DbPackageUpdateOne) SetNillableIoOut(i *int64) *DbPackageUpdateOne {
|
||||
if i != nil {
|
||||
dpuo.SetIoOut(*i)
|
||||
}
|
||||
return dpuo
|
||||
}
|
||||
|
||||
// AddIoOut adds i to the "io_out" field.
|
||||
func (dpuo *DbPackageUpdateOne) AddIoOut(i int64) *DbPackageUpdateOne {
|
||||
dpuo.mutation.AddIoOut(i)
|
||||
return dpuo
|
||||
}
|
||||
|
||||
// ClearIoOut clears the value of the "io_out" field.
|
||||
func (dpuo *DbPackageUpdateOne) ClearIoOut() *DbPackageUpdateOne {
|
||||
dpuo.mutation.ClearIoOut()
|
||||
return dpuo
|
||||
}
|
||||
|
||||
// Mutation returns the DbPackageMutation object of the builder.
|
||||
func (dpuo *DbPackageUpdateOne) Mutation() *DbPackageMutation {
|
||||
return dpuo.mutation
|
||||
@@ -1064,19 +1381,6 @@ func (dpuo *DbPackageUpdateOne) sqlSave(ctx context.Context) (_node *DbPackage,
|
||||
Column: dbpackage.FieldBuildTimeStart,
|
||||
})
|
||||
}
|
||||
if value, ok := dpuo.mutation.BuildTimeEnd(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeTime,
|
||||
Value: value,
|
||||
Column: dbpackage.FieldBuildTimeEnd,
|
||||
})
|
||||
}
|
||||
if dpuo.mutation.BuildTimeEndCleared() {
|
||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeTime,
|
||||
Column: dbpackage.FieldBuildTimeEnd,
|
||||
})
|
||||
}
|
||||
if value, ok := dpuo.mutation.Updated(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeTime,
|
||||
@@ -1155,6 +1459,106 @@ func (dpuo *DbPackageUpdateOne) sqlSave(ctx context.Context) (_node *DbPackage,
|
||||
Column: dbpackage.FieldDebugSymbols,
|
||||
})
|
||||
}
|
||||
if value, ok := dpuo.mutation.MaxRss(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt64,
|
||||
Value: value,
|
||||
Column: dbpackage.FieldMaxRss,
|
||||
})
|
||||
}
|
||||
if value, ok := dpuo.mutation.AddedMaxRss(); ok {
|
||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt64,
|
||||
Value: value,
|
||||
Column: dbpackage.FieldMaxRss,
|
||||
})
|
||||
}
|
||||
if dpuo.mutation.MaxRssCleared() {
|
||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt64,
|
||||
Column: dbpackage.FieldMaxRss,
|
||||
})
|
||||
}
|
||||
if value, ok := dpuo.mutation.UTime(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt64,
|
||||
Value: value,
|
||||
Column: dbpackage.FieldUTime,
|
||||
})
|
||||
}
|
||||
if value, ok := dpuo.mutation.AddedUTime(); ok {
|
||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt64,
|
||||
Value: value,
|
||||
Column: dbpackage.FieldUTime,
|
||||
})
|
||||
}
|
||||
if dpuo.mutation.UTimeCleared() {
|
||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt64,
|
||||
Column: dbpackage.FieldUTime,
|
||||
})
|
||||
}
|
||||
if value, ok := dpuo.mutation.STime(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt64,
|
||||
Value: value,
|
||||
Column: dbpackage.FieldSTime,
|
||||
})
|
||||
}
|
||||
if value, ok := dpuo.mutation.AddedSTime(); ok {
|
||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt64,
|
||||
Value: value,
|
||||
Column: dbpackage.FieldSTime,
|
||||
})
|
||||
}
|
||||
if dpuo.mutation.STimeCleared() {
|
||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt64,
|
||||
Column: dbpackage.FieldSTime,
|
||||
})
|
||||
}
|
||||
if value, ok := dpuo.mutation.IoIn(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt64,
|
||||
Value: value,
|
||||
Column: dbpackage.FieldIoIn,
|
||||
})
|
||||
}
|
||||
if value, ok := dpuo.mutation.AddedIoIn(); ok {
|
||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt64,
|
||||
Value: value,
|
||||
Column: dbpackage.FieldIoIn,
|
||||
})
|
||||
}
|
||||
if dpuo.mutation.IoInCleared() {
|
||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt64,
|
||||
Column: dbpackage.FieldIoIn,
|
||||
})
|
||||
}
|
||||
if value, ok := dpuo.mutation.IoOut(); ok {
|
||||
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt64,
|
||||
Value: value,
|
||||
Column: dbpackage.FieldIoOut,
|
||||
})
|
||||
}
|
||||
if value, ok := dpuo.mutation.AddedIoOut(); ok {
|
||||
_spec.Fields.Add = append(_spec.Fields.Add, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt64,
|
||||
Value: value,
|
||||
Column: dbpackage.FieldIoOut,
|
||||
})
|
||||
}
|
||||
if dpuo.mutation.IoOutCleared() {
|
||||
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt64,
|
||||
Column: dbpackage.FieldIoOut,
|
||||
})
|
||||
}
|
||||
_node = &DbPackage{config: dpuo.config}
|
||||
_spec.Assign = _node.assignValues
|
||||
_spec.ScanValues = _node.scanValues
|
||||
|
@@ -20,13 +20,17 @@ var (
|
||||
{Name: "version", Type: field.TypeString, Nullable: true},
|
||||
{Name: "repo_version", Type: field.TypeString, Nullable: true},
|
||||
{Name: "build_time_start", Type: field.TypeTime, Nullable: true},
|
||||
{Name: "build_time_end", Type: field.TypeTime, Nullable: true},
|
||||
{Name: "updated", Type: field.TypeTime, Nullable: true},
|
||||
{Name: "hash", Type: field.TypeString, Nullable: true},
|
||||
{Name: "lto", Type: field.TypeEnum, Nullable: true, Enums: []string{"enabled", "unknown", "disabled", "auto_disabled"}, Default: "unknown"},
|
||||
{Name: "last_version_build", Type: field.TypeString, Nullable: true},
|
||||
{Name: "last_verified", Type: field.TypeTime, Nullable: true},
|
||||
{Name: "debug_symbols", Type: field.TypeEnum, Nullable: true, Enums: []string{"available", "unknown", "not_available"}, Default: "unknown"},
|
||||
{Name: "max_rss", Type: field.TypeInt64, Nullable: true},
|
||||
{Name: "u_time", Type: field.TypeInt64, Nullable: true},
|
||||
{Name: "s_time", Type: field.TypeInt64, Nullable: true},
|
||||
{Name: "io_in", Type: field.TypeInt64, Nullable: true},
|
||||
{Name: "io_out", Type: field.TypeInt64, Nullable: true},
|
||||
}
|
||||
// DbPackagesTable holds the schema information for the "db_packages" table.
|
||||
DbPackagesTable = &schema.Table{
|
||||
|
615
ent/mutation.go
615
ent/mutation.go
@@ -42,13 +42,22 @@ type DbPackageMutation struct {
|
||||
version *string
|
||||
repo_version *string
|
||||
build_time_start *time.Time
|
||||
build_time_end *time.Time
|
||||
updated *time.Time
|
||||
hash *string
|
||||
lto *dbpackage.Lto
|
||||
last_version_build *string
|
||||
last_verified *time.Time
|
||||
debug_symbols *dbpackage.DebugSymbols
|
||||
max_rss *int64
|
||||
addmax_rss *int64
|
||||
u_time *int64
|
||||
addu_time *int64
|
||||
s_time *int64
|
||||
adds_time *int64
|
||||
io_in *int64
|
||||
addio_in *int64
|
||||
io_out *int64
|
||||
addio_out *int64
|
||||
clearedFields map[string]struct{}
|
||||
done bool
|
||||
oldValue func(context.Context) (*DbPackage, error)
|
||||
@@ -555,55 +564,6 @@ func (m *DbPackageMutation) ResetBuildTimeStart() {
|
||||
delete(m.clearedFields, dbpackage.FieldBuildTimeStart)
|
||||
}
|
||||
|
||||
// SetBuildTimeEnd sets the "build_time_end" field.
|
||||
func (m *DbPackageMutation) SetBuildTimeEnd(t time.Time) {
|
||||
m.build_time_end = &t
|
||||
}
|
||||
|
||||
// BuildTimeEnd returns the value of the "build_time_end" field in the mutation.
|
||||
func (m *DbPackageMutation) BuildTimeEnd() (r time.Time, exists bool) {
|
||||
v := m.build_time_end
|
||||
if v == nil {
|
||||
return
|
||||
}
|
||||
return *v, true
|
||||
}
|
||||
|
||||
// OldBuildTimeEnd returns the old "build_time_end" field's value of the DbPackage entity.
|
||||
// If the DbPackage object wasn't provided to the builder, the object is fetched from the database.
|
||||
// An error is returned if the mutation operation is not UpdateOne, or the database query fails.
|
||||
func (m *DbPackageMutation) OldBuildTimeEnd(ctx context.Context) (v time.Time, err error) {
|
||||
if !m.op.Is(OpUpdateOne) {
|
||||
return v, errors.New("OldBuildTimeEnd is only allowed on UpdateOne operations")
|
||||
}
|
||||
if m.id == nil || m.oldValue == nil {
|
||||
return v, errors.New("OldBuildTimeEnd requires an ID field in the mutation")
|
||||
}
|
||||
oldValue, err := m.oldValue(ctx)
|
||||
if err != nil {
|
||||
return v, fmt.Errorf("querying old value for OldBuildTimeEnd: %w", err)
|
||||
}
|
||||
return oldValue.BuildTimeEnd, nil
|
||||
}
|
||||
|
||||
// ClearBuildTimeEnd clears the value of the "build_time_end" field.
|
||||
func (m *DbPackageMutation) ClearBuildTimeEnd() {
|
||||
m.build_time_end = nil
|
||||
m.clearedFields[dbpackage.FieldBuildTimeEnd] = struct{}{}
|
||||
}
|
||||
|
||||
// BuildTimeEndCleared returns if the "build_time_end" field was cleared in this mutation.
|
||||
func (m *DbPackageMutation) BuildTimeEndCleared() bool {
|
||||
_, ok := m.clearedFields[dbpackage.FieldBuildTimeEnd]
|
||||
return ok
|
||||
}
|
||||
|
||||
// ResetBuildTimeEnd resets all changes to the "build_time_end" field.
|
||||
func (m *DbPackageMutation) ResetBuildTimeEnd() {
|
||||
m.build_time_end = nil
|
||||
delete(m.clearedFields, dbpackage.FieldBuildTimeEnd)
|
||||
}
|
||||
|
||||
// SetUpdated sets the "updated" field.
|
||||
func (m *DbPackageMutation) SetUpdated(t time.Time) {
|
||||
m.updated = &t
|
||||
@@ -898,6 +858,356 @@ func (m *DbPackageMutation) ResetDebugSymbols() {
|
||||
delete(m.clearedFields, dbpackage.FieldDebugSymbols)
|
||||
}
|
||||
|
||||
// SetMaxRss sets the "max_rss" field.
|
||||
func (m *DbPackageMutation) SetMaxRss(i int64) {
|
||||
m.max_rss = &i
|
||||
m.addmax_rss = nil
|
||||
}
|
||||
|
||||
// MaxRss returns the value of the "max_rss" field in the mutation.
|
||||
func (m *DbPackageMutation) MaxRss() (r int64, exists bool) {
|
||||
v := m.max_rss
|
||||
if v == nil {
|
||||
return
|
||||
}
|
||||
return *v, true
|
||||
}
|
||||
|
||||
// OldMaxRss returns the old "max_rss" field's value of the DbPackage entity.
|
||||
// If the DbPackage object wasn't provided to the builder, the object is fetched from the database.
|
||||
// An error is returned if the mutation operation is not UpdateOne, or the database query fails.
|
||||
func (m *DbPackageMutation) OldMaxRss(ctx context.Context) (v *int64, err error) {
|
||||
if !m.op.Is(OpUpdateOne) {
|
||||
return v, errors.New("OldMaxRss is only allowed on UpdateOne operations")
|
||||
}
|
||||
if m.id == nil || m.oldValue == nil {
|
||||
return v, errors.New("OldMaxRss requires an ID field in the mutation")
|
||||
}
|
||||
oldValue, err := m.oldValue(ctx)
|
||||
if err != nil {
|
||||
return v, fmt.Errorf("querying old value for OldMaxRss: %w", err)
|
||||
}
|
||||
return oldValue.MaxRss, nil
|
||||
}
|
||||
|
||||
// AddMaxRss adds i to the "max_rss" field.
|
||||
func (m *DbPackageMutation) AddMaxRss(i int64) {
|
||||
if m.addmax_rss != nil {
|
||||
*m.addmax_rss += i
|
||||
} else {
|
||||
m.addmax_rss = &i
|
||||
}
|
||||
}
|
||||
|
||||
// AddedMaxRss returns the value that was added to the "max_rss" field in this mutation.
|
||||
func (m *DbPackageMutation) AddedMaxRss() (r int64, exists bool) {
|
||||
v := m.addmax_rss
|
||||
if v == nil {
|
||||
return
|
||||
}
|
||||
return *v, true
|
||||
}
|
||||
|
||||
// ClearMaxRss clears the value of the "max_rss" field.
|
||||
func (m *DbPackageMutation) ClearMaxRss() {
|
||||
m.max_rss = nil
|
||||
m.addmax_rss = nil
|
||||
m.clearedFields[dbpackage.FieldMaxRss] = struct{}{}
|
||||
}
|
||||
|
||||
// MaxRssCleared returns if the "max_rss" field was cleared in this mutation.
|
||||
func (m *DbPackageMutation) MaxRssCleared() bool {
|
||||
_, ok := m.clearedFields[dbpackage.FieldMaxRss]
|
||||
return ok
|
||||
}
|
||||
|
||||
// ResetMaxRss resets all changes to the "max_rss" field.
|
||||
func (m *DbPackageMutation) ResetMaxRss() {
|
||||
m.max_rss = nil
|
||||
m.addmax_rss = nil
|
||||
delete(m.clearedFields, dbpackage.FieldMaxRss)
|
||||
}
|
||||
|
||||
// SetUTime sets the "u_time" field.
|
||||
func (m *DbPackageMutation) SetUTime(i int64) {
|
||||
m.u_time = &i
|
||||
m.addu_time = nil
|
||||
}
|
||||
|
||||
// UTime returns the value of the "u_time" field in the mutation.
|
||||
func (m *DbPackageMutation) UTime() (r int64, exists bool) {
|
||||
v := m.u_time
|
||||
if v == nil {
|
||||
return
|
||||
}
|
||||
return *v, true
|
||||
}
|
||||
|
||||
// OldUTime returns the old "u_time" field's value of the DbPackage entity.
|
||||
// If the DbPackage object wasn't provided to the builder, the object is fetched from the database.
|
||||
// An error is returned if the mutation operation is not UpdateOne, or the database query fails.
|
||||
func (m *DbPackageMutation) OldUTime(ctx context.Context) (v *int64, err error) {
|
||||
if !m.op.Is(OpUpdateOne) {
|
||||
return v, errors.New("OldUTime is only allowed on UpdateOne operations")
|
||||
}
|
||||
if m.id == nil || m.oldValue == nil {
|
||||
return v, errors.New("OldUTime requires an ID field in the mutation")
|
||||
}
|
||||
oldValue, err := m.oldValue(ctx)
|
||||
if err != nil {
|
||||
return v, fmt.Errorf("querying old value for OldUTime: %w", err)
|
||||
}
|
||||
return oldValue.UTime, nil
|
||||
}
|
||||
|
||||
// AddUTime adds i to the "u_time" field.
|
||||
func (m *DbPackageMutation) AddUTime(i int64) {
|
||||
if m.addu_time != nil {
|
||||
*m.addu_time += i
|
||||
} else {
|
||||
m.addu_time = &i
|
||||
}
|
||||
}
|
||||
|
||||
// AddedUTime returns the value that was added to the "u_time" field in this mutation.
|
||||
func (m *DbPackageMutation) AddedUTime() (r int64, exists bool) {
|
||||
v := m.addu_time
|
||||
if v == nil {
|
||||
return
|
||||
}
|
||||
return *v, true
|
||||
}
|
||||
|
||||
// ClearUTime clears the value of the "u_time" field.
|
||||
func (m *DbPackageMutation) ClearUTime() {
|
||||
m.u_time = nil
|
||||
m.addu_time = nil
|
||||
m.clearedFields[dbpackage.FieldUTime] = struct{}{}
|
||||
}
|
||||
|
||||
// UTimeCleared returns if the "u_time" field was cleared in this mutation.
|
||||
func (m *DbPackageMutation) UTimeCleared() bool {
|
||||
_, ok := m.clearedFields[dbpackage.FieldUTime]
|
||||
return ok
|
||||
}
|
||||
|
||||
// ResetUTime resets all changes to the "u_time" field.
|
||||
func (m *DbPackageMutation) ResetUTime() {
|
||||
m.u_time = nil
|
||||
m.addu_time = nil
|
||||
delete(m.clearedFields, dbpackage.FieldUTime)
|
||||
}
|
||||
|
||||
// SetSTime sets the "s_time" field.
|
||||
func (m *DbPackageMutation) SetSTime(i int64) {
|
||||
m.s_time = &i
|
||||
m.adds_time = nil
|
||||
}
|
||||
|
||||
// STime returns the value of the "s_time" field in the mutation.
|
||||
func (m *DbPackageMutation) STime() (r int64, exists bool) {
|
||||
v := m.s_time
|
||||
if v == nil {
|
||||
return
|
||||
}
|
||||
return *v, true
|
||||
}
|
||||
|
||||
// OldSTime returns the old "s_time" field's value of the DbPackage entity.
|
||||
// If the DbPackage object wasn't provided to the builder, the object is fetched from the database.
|
||||
// An error is returned if the mutation operation is not UpdateOne, or the database query fails.
|
||||
func (m *DbPackageMutation) OldSTime(ctx context.Context) (v *int64, err error) {
|
||||
if !m.op.Is(OpUpdateOne) {
|
||||
return v, errors.New("OldSTime is only allowed on UpdateOne operations")
|
||||
}
|
||||
if m.id == nil || m.oldValue == nil {
|
||||
return v, errors.New("OldSTime requires an ID field in the mutation")
|
||||
}
|
||||
oldValue, err := m.oldValue(ctx)
|
||||
if err != nil {
|
||||
return v, fmt.Errorf("querying old value for OldSTime: %w", err)
|
||||
}
|
||||
return oldValue.STime, nil
|
||||
}
|
||||
|
||||
// AddSTime adds i to the "s_time" field.
|
||||
func (m *DbPackageMutation) AddSTime(i int64) {
|
||||
if m.adds_time != nil {
|
||||
*m.adds_time += i
|
||||
} else {
|
||||
m.adds_time = &i
|
||||
}
|
||||
}
|
||||
|
||||
// AddedSTime returns the value that was added to the "s_time" field in this mutation.
|
||||
func (m *DbPackageMutation) AddedSTime() (r int64, exists bool) {
|
||||
v := m.adds_time
|
||||
if v == nil {
|
||||
return
|
||||
}
|
||||
return *v, true
|
||||
}
|
||||
|
||||
// ClearSTime clears the value of the "s_time" field.
|
||||
func (m *DbPackageMutation) ClearSTime() {
|
||||
m.s_time = nil
|
||||
m.adds_time = nil
|
||||
m.clearedFields[dbpackage.FieldSTime] = struct{}{}
|
||||
}
|
||||
|
||||
// STimeCleared returns if the "s_time" field was cleared in this mutation.
|
||||
func (m *DbPackageMutation) STimeCleared() bool {
|
||||
_, ok := m.clearedFields[dbpackage.FieldSTime]
|
||||
return ok
|
||||
}
|
||||
|
||||
// ResetSTime resets all changes to the "s_time" field.
|
||||
func (m *DbPackageMutation) ResetSTime() {
|
||||
m.s_time = nil
|
||||
m.adds_time = nil
|
||||
delete(m.clearedFields, dbpackage.FieldSTime)
|
||||
}
|
||||
|
||||
// SetIoIn sets the "io_in" field.
|
||||
func (m *DbPackageMutation) SetIoIn(i int64) {
|
||||
m.io_in = &i
|
||||
m.addio_in = nil
|
||||
}
|
||||
|
||||
// IoIn returns the value of the "io_in" field in the mutation.
|
||||
func (m *DbPackageMutation) IoIn() (r int64, exists bool) {
|
||||
v := m.io_in
|
||||
if v == nil {
|
||||
return
|
||||
}
|
||||
return *v, true
|
||||
}
|
||||
|
||||
// OldIoIn returns the old "io_in" field's value of the DbPackage entity.
|
||||
// If the DbPackage object wasn't provided to the builder, the object is fetched from the database.
|
||||
// An error is returned if the mutation operation is not UpdateOne, or the database query fails.
|
||||
func (m *DbPackageMutation) OldIoIn(ctx context.Context) (v *int64, err error) {
|
||||
if !m.op.Is(OpUpdateOne) {
|
||||
return v, errors.New("OldIoIn is only allowed on UpdateOne operations")
|
||||
}
|
||||
if m.id == nil || m.oldValue == nil {
|
||||
return v, errors.New("OldIoIn requires an ID field in the mutation")
|
||||
}
|
||||
oldValue, err := m.oldValue(ctx)
|
||||
if err != nil {
|
||||
return v, fmt.Errorf("querying old value for OldIoIn: %w", err)
|
||||
}
|
||||
return oldValue.IoIn, nil
|
||||
}
|
||||
|
||||
// AddIoIn adds i to the "io_in" field.
|
||||
func (m *DbPackageMutation) AddIoIn(i int64) {
|
||||
if m.addio_in != nil {
|
||||
*m.addio_in += i
|
||||
} else {
|
||||
m.addio_in = &i
|
||||
}
|
||||
}
|
||||
|
||||
// AddedIoIn returns the value that was added to the "io_in" field in this mutation.
|
||||
func (m *DbPackageMutation) AddedIoIn() (r int64, exists bool) {
|
||||
v := m.addio_in
|
||||
if v == nil {
|
||||
return
|
||||
}
|
||||
return *v, true
|
||||
}
|
||||
|
||||
// ClearIoIn clears the value of the "io_in" field.
|
||||
func (m *DbPackageMutation) ClearIoIn() {
|
||||
m.io_in = nil
|
||||
m.addio_in = nil
|
||||
m.clearedFields[dbpackage.FieldIoIn] = struct{}{}
|
||||
}
|
||||
|
||||
// IoInCleared returns if the "io_in" field was cleared in this mutation.
|
||||
func (m *DbPackageMutation) IoInCleared() bool {
|
||||
_, ok := m.clearedFields[dbpackage.FieldIoIn]
|
||||
return ok
|
||||
}
|
||||
|
||||
// ResetIoIn resets all changes to the "io_in" field.
|
||||
func (m *DbPackageMutation) ResetIoIn() {
|
||||
m.io_in = nil
|
||||
m.addio_in = nil
|
||||
delete(m.clearedFields, dbpackage.FieldIoIn)
|
||||
}
|
||||
|
||||
// SetIoOut sets the "io_out" field.
|
||||
func (m *DbPackageMutation) SetIoOut(i int64) {
|
||||
m.io_out = &i
|
||||
m.addio_out = nil
|
||||
}
|
||||
|
||||
// IoOut returns the value of the "io_out" field in the mutation.
|
||||
func (m *DbPackageMutation) IoOut() (r int64, exists bool) {
|
||||
v := m.io_out
|
||||
if v == nil {
|
||||
return
|
||||
}
|
||||
return *v, true
|
||||
}
|
||||
|
||||
// OldIoOut returns the old "io_out" field's value of the DbPackage entity.
|
||||
// If the DbPackage object wasn't provided to the builder, the object is fetched from the database.
|
||||
// An error is returned if the mutation operation is not UpdateOne, or the database query fails.
|
||||
func (m *DbPackageMutation) OldIoOut(ctx context.Context) (v *int64, err error) {
|
||||
if !m.op.Is(OpUpdateOne) {
|
||||
return v, errors.New("OldIoOut is only allowed on UpdateOne operations")
|
||||
}
|
||||
if m.id == nil || m.oldValue == nil {
|
||||
return v, errors.New("OldIoOut requires an ID field in the mutation")
|
||||
}
|
||||
oldValue, err := m.oldValue(ctx)
|
||||
if err != nil {
|
||||
return v, fmt.Errorf("querying old value for OldIoOut: %w", err)
|
||||
}
|
||||
return oldValue.IoOut, nil
|
||||
}
|
||||
|
||||
// AddIoOut adds i to the "io_out" field.
|
||||
func (m *DbPackageMutation) AddIoOut(i int64) {
|
||||
if m.addio_out != nil {
|
||||
*m.addio_out += i
|
||||
} else {
|
||||
m.addio_out = &i
|
||||
}
|
||||
}
|
||||
|
||||
// AddedIoOut returns the value that was added to the "io_out" field in this mutation.
|
||||
func (m *DbPackageMutation) AddedIoOut() (r int64, exists bool) {
|
||||
v := m.addio_out
|
||||
if v == nil {
|
||||
return
|
||||
}
|
||||
return *v, true
|
||||
}
|
||||
|
||||
// ClearIoOut clears the value of the "io_out" field.
|
||||
func (m *DbPackageMutation) ClearIoOut() {
|
||||
m.io_out = nil
|
||||
m.addio_out = nil
|
||||
m.clearedFields[dbpackage.FieldIoOut] = struct{}{}
|
||||
}
|
||||
|
||||
// IoOutCleared returns if the "io_out" field was cleared in this mutation.
|
||||
func (m *DbPackageMutation) IoOutCleared() bool {
|
||||
_, ok := m.clearedFields[dbpackage.FieldIoOut]
|
||||
return ok
|
||||
}
|
||||
|
||||
// ResetIoOut resets all changes to the "io_out" field.
|
||||
func (m *DbPackageMutation) ResetIoOut() {
|
||||
m.io_out = nil
|
||||
m.addio_out = nil
|
||||
delete(m.clearedFields, dbpackage.FieldIoOut)
|
||||
}
|
||||
|
||||
// Where appends a list predicates to the DbPackageMutation builder.
|
||||
func (m *DbPackageMutation) Where(ps ...predicate.DbPackage) {
|
||||
m.predicates = append(m.predicates, ps...)
|
||||
@@ -917,7 +1227,7 @@ func (m *DbPackageMutation) Type() string {
|
||||
// order to get all numeric fields that were incremented/decremented, call
|
||||
// AddedFields().
|
||||
func (m *DbPackageMutation) Fields() []string {
|
||||
fields := make([]string, 0, 16)
|
||||
fields := make([]string, 0, 20)
|
||||
if m.pkgbase != nil {
|
||||
fields = append(fields, dbpackage.FieldPkgbase)
|
||||
}
|
||||
@@ -945,9 +1255,6 @@ func (m *DbPackageMutation) Fields() []string {
|
||||
if m.build_time_start != nil {
|
||||
fields = append(fields, dbpackage.FieldBuildTimeStart)
|
||||
}
|
||||
if m.build_time_end != nil {
|
||||
fields = append(fields, dbpackage.FieldBuildTimeEnd)
|
||||
}
|
||||
if m.updated != nil {
|
||||
fields = append(fields, dbpackage.FieldUpdated)
|
||||
}
|
||||
@@ -966,6 +1273,21 @@ func (m *DbPackageMutation) Fields() []string {
|
||||
if m.debug_symbols != nil {
|
||||
fields = append(fields, dbpackage.FieldDebugSymbols)
|
||||
}
|
||||
if m.max_rss != nil {
|
||||
fields = append(fields, dbpackage.FieldMaxRss)
|
||||
}
|
||||
if m.u_time != nil {
|
||||
fields = append(fields, dbpackage.FieldUTime)
|
||||
}
|
||||
if m.s_time != nil {
|
||||
fields = append(fields, dbpackage.FieldSTime)
|
||||
}
|
||||
if m.io_in != nil {
|
||||
fields = append(fields, dbpackage.FieldIoIn)
|
||||
}
|
||||
if m.io_out != nil {
|
||||
fields = append(fields, dbpackage.FieldIoOut)
|
||||
}
|
||||
return fields
|
||||
}
|
||||
|
||||
@@ -992,8 +1314,6 @@ func (m *DbPackageMutation) Field(name string) (ent.Value, bool) {
|
||||
return m.RepoVersion()
|
||||
case dbpackage.FieldBuildTimeStart:
|
||||
return m.BuildTimeStart()
|
||||
case dbpackage.FieldBuildTimeEnd:
|
||||
return m.BuildTimeEnd()
|
||||
case dbpackage.FieldUpdated:
|
||||
return m.Updated()
|
||||
case dbpackage.FieldHash:
|
||||
@@ -1006,6 +1326,16 @@ func (m *DbPackageMutation) Field(name string) (ent.Value, bool) {
|
||||
return m.LastVerified()
|
||||
case dbpackage.FieldDebugSymbols:
|
||||
return m.DebugSymbols()
|
||||
case dbpackage.FieldMaxRss:
|
||||
return m.MaxRss()
|
||||
case dbpackage.FieldUTime:
|
||||
return m.UTime()
|
||||
case dbpackage.FieldSTime:
|
||||
return m.STime()
|
||||
case dbpackage.FieldIoIn:
|
||||
return m.IoIn()
|
||||
case dbpackage.FieldIoOut:
|
||||
return m.IoOut()
|
||||
}
|
||||
return nil, false
|
||||
}
|
||||
@@ -1033,8 +1363,6 @@ func (m *DbPackageMutation) OldField(ctx context.Context, name string) (ent.Valu
|
||||
return m.OldRepoVersion(ctx)
|
||||
case dbpackage.FieldBuildTimeStart:
|
||||
return m.OldBuildTimeStart(ctx)
|
||||
case dbpackage.FieldBuildTimeEnd:
|
||||
return m.OldBuildTimeEnd(ctx)
|
||||
case dbpackage.FieldUpdated:
|
||||
return m.OldUpdated(ctx)
|
||||
case dbpackage.FieldHash:
|
||||
@@ -1047,6 +1375,16 @@ func (m *DbPackageMutation) OldField(ctx context.Context, name string) (ent.Valu
|
||||
return m.OldLastVerified(ctx)
|
||||
case dbpackage.FieldDebugSymbols:
|
||||
return m.OldDebugSymbols(ctx)
|
||||
case dbpackage.FieldMaxRss:
|
||||
return m.OldMaxRss(ctx)
|
||||
case dbpackage.FieldUTime:
|
||||
return m.OldUTime(ctx)
|
||||
case dbpackage.FieldSTime:
|
||||
return m.OldSTime(ctx)
|
||||
case dbpackage.FieldIoIn:
|
||||
return m.OldIoIn(ctx)
|
||||
case dbpackage.FieldIoOut:
|
||||
return m.OldIoOut(ctx)
|
||||
}
|
||||
return nil, fmt.Errorf("unknown DbPackage field %s", name)
|
||||
}
|
||||
@@ -1119,13 +1457,6 @@ func (m *DbPackageMutation) SetField(name string, value ent.Value) error {
|
||||
}
|
||||
m.SetBuildTimeStart(v)
|
||||
return nil
|
||||
case dbpackage.FieldBuildTimeEnd:
|
||||
v, ok := value.(time.Time)
|
||||
if !ok {
|
||||
return fmt.Errorf("unexpected type %T for field %s", value, name)
|
||||
}
|
||||
m.SetBuildTimeEnd(v)
|
||||
return nil
|
||||
case dbpackage.FieldUpdated:
|
||||
v, ok := value.(time.Time)
|
||||
if !ok {
|
||||
@@ -1168,6 +1499,41 @@ func (m *DbPackageMutation) SetField(name string, value ent.Value) error {
|
||||
}
|
||||
m.SetDebugSymbols(v)
|
||||
return nil
|
||||
case dbpackage.FieldMaxRss:
|
||||
v, ok := value.(int64)
|
||||
if !ok {
|
||||
return fmt.Errorf("unexpected type %T for field %s", value, name)
|
||||
}
|
||||
m.SetMaxRss(v)
|
||||
return nil
|
||||
case dbpackage.FieldUTime:
|
||||
v, ok := value.(int64)
|
||||
if !ok {
|
||||
return fmt.Errorf("unexpected type %T for field %s", value, name)
|
||||
}
|
||||
m.SetUTime(v)
|
||||
return nil
|
||||
case dbpackage.FieldSTime:
|
||||
v, ok := value.(int64)
|
||||
if !ok {
|
||||
return fmt.Errorf("unexpected type %T for field %s", value, name)
|
||||
}
|
||||
m.SetSTime(v)
|
||||
return nil
|
||||
case dbpackage.FieldIoIn:
|
||||
v, ok := value.(int64)
|
||||
if !ok {
|
||||
return fmt.Errorf("unexpected type %T for field %s", value, name)
|
||||
}
|
||||
m.SetIoIn(v)
|
||||
return nil
|
||||
case dbpackage.FieldIoOut:
|
||||
v, ok := value.(int64)
|
||||
if !ok {
|
||||
return fmt.Errorf("unexpected type %T for field %s", value, name)
|
||||
}
|
||||
m.SetIoOut(v)
|
||||
return nil
|
||||
}
|
||||
return fmt.Errorf("unknown DbPackage field %s", name)
|
||||
}
|
||||
@@ -1175,13 +1541,41 @@ func (m *DbPackageMutation) SetField(name string, value ent.Value) error {
|
||||
// AddedFields returns all numeric fields that were incremented/decremented during
|
||||
// this mutation.
|
||||
func (m *DbPackageMutation) AddedFields() []string {
|
||||
return nil
|
||||
var fields []string
|
||||
if m.addmax_rss != nil {
|
||||
fields = append(fields, dbpackage.FieldMaxRss)
|
||||
}
|
||||
if m.addu_time != nil {
|
||||
fields = append(fields, dbpackage.FieldUTime)
|
||||
}
|
||||
if m.adds_time != nil {
|
||||
fields = append(fields, dbpackage.FieldSTime)
|
||||
}
|
||||
if m.addio_in != nil {
|
||||
fields = append(fields, dbpackage.FieldIoIn)
|
||||
}
|
||||
if m.addio_out != nil {
|
||||
fields = append(fields, dbpackage.FieldIoOut)
|
||||
}
|
||||
return fields
|
||||
}
|
||||
|
||||
// AddedField returns the numeric value that was incremented/decremented on a field
|
||||
// with the given name. The second boolean return value indicates that this field
|
||||
// was not set, or was not defined in the schema.
|
||||
func (m *DbPackageMutation) AddedField(name string) (ent.Value, bool) {
|
||||
switch name {
|
||||
case dbpackage.FieldMaxRss:
|
||||
return m.AddedMaxRss()
|
||||
case dbpackage.FieldUTime:
|
||||
return m.AddedUTime()
|
||||
case dbpackage.FieldSTime:
|
||||
return m.AddedSTime()
|
||||
case dbpackage.FieldIoIn:
|
||||
return m.AddedIoIn()
|
||||
case dbpackage.FieldIoOut:
|
||||
return m.AddedIoOut()
|
||||
}
|
||||
return nil, false
|
||||
}
|
||||
|
||||
@@ -1190,6 +1584,41 @@ func (m *DbPackageMutation) AddedField(name string) (ent.Value, bool) {
|
||||
// type.
|
||||
func (m *DbPackageMutation) AddField(name string, value ent.Value) error {
|
||||
switch name {
|
||||
case dbpackage.FieldMaxRss:
|
||||
v, ok := value.(int64)
|
||||
if !ok {
|
||||
return fmt.Errorf("unexpected type %T for field %s", value, name)
|
||||
}
|
||||
m.AddMaxRss(v)
|
||||
return nil
|
||||
case dbpackage.FieldUTime:
|
||||
v, ok := value.(int64)
|
||||
if !ok {
|
||||
return fmt.Errorf("unexpected type %T for field %s", value, name)
|
||||
}
|
||||
m.AddUTime(v)
|
||||
return nil
|
||||
case dbpackage.FieldSTime:
|
||||
v, ok := value.(int64)
|
||||
if !ok {
|
||||
return fmt.Errorf("unexpected type %T for field %s", value, name)
|
||||
}
|
||||
m.AddSTime(v)
|
||||
return nil
|
||||
case dbpackage.FieldIoIn:
|
||||
v, ok := value.(int64)
|
||||
if !ok {
|
||||
return fmt.Errorf("unexpected type %T for field %s", value, name)
|
||||
}
|
||||
m.AddIoIn(v)
|
||||
return nil
|
||||
case dbpackage.FieldIoOut:
|
||||
v, ok := value.(int64)
|
||||
if !ok {
|
||||
return fmt.Errorf("unexpected type %T for field %s", value, name)
|
||||
}
|
||||
m.AddIoOut(v)
|
||||
return nil
|
||||
}
|
||||
return fmt.Errorf("unknown DbPackage numeric field %s", name)
|
||||
}
|
||||
@@ -1216,9 +1645,6 @@ func (m *DbPackageMutation) ClearedFields() []string {
|
||||
if m.FieldCleared(dbpackage.FieldBuildTimeStart) {
|
||||
fields = append(fields, dbpackage.FieldBuildTimeStart)
|
||||
}
|
||||
if m.FieldCleared(dbpackage.FieldBuildTimeEnd) {
|
||||
fields = append(fields, dbpackage.FieldBuildTimeEnd)
|
||||
}
|
||||
if m.FieldCleared(dbpackage.FieldUpdated) {
|
||||
fields = append(fields, dbpackage.FieldUpdated)
|
||||
}
|
||||
@@ -1237,6 +1663,21 @@ func (m *DbPackageMutation) ClearedFields() []string {
|
||||
if m.FieldCleared(dbpackage.FieldDebugSymbols) {
|
||||
fields = append(fields, dbpackage.FieldDebugSymbols)
|
||||
}
|
||||
if m.FieldCleared(dbpackage.FieldMaxRss) {
|
||||
fields = append(fields, dbpackage.FieldMaxRss)
|
||||
}
|
||||
if m.FieldCleared(dbpackage.FieldUTime) {
|
||||
fields = append(fields, dbpackage.FieldUTime)
|
||||
}
|
||||
if m.FieldCleared(dbpackage.FieldSTime) {
|
||||
fields = append(fields, dbpackage.FieldSTime)
|
||||
}
|
||||
if m.FieldCleared(dbpackage.FieldIoIn) {
|
||||
fields = append(fields, dbpackage.FieldIoIn)
|
||||
}
|
||||
if m.FieldCleared(dbpackage.FieldIoOut) {
|
||||
fields = append(fields, dbpackage.FieldIoOut)
|
||||
}
|
||||
return fields
|
||||
}
|
||||
|
||||
@@ -1269,9 +1710,6 @@ func (m *DbPackageMutation) ClearField(name string) error {
|
||||
case dbpackage.FieldBuildTimeStart:
|
||||
m.ClearBuildTimeStart()
|
||||
return nil
|
||||
case dbpackage.FieldBuildTimeEnd:
|
||||
m.ClearBuildTimeEnd()
|
||||
return nil
|
||||
case dbpackage.FieldUpdated:
|
||||
m.ClearUpdated()
|
||||
return nil
|
||||
@@ -1290,6 +1728,21 @@ func (m *DbPackageMutation) ClearField(name string) error {
|
||||
case dbpackage.FieldDebugSymbols:
|
||||
m.ClearDebugSymbols()
|
||||
return nil
|
||||
case dbpackage.FieldMaxRss:
|
||||
m.ClearMaxRss()
|
||||
return nil
|
||||
case dbpackage.FieldUTime:
|
||||
m.ClearUTime()
|
||||
return nil
|
||||
case dbpackage.FieldSTime:
|
||||
m.ClearSTime()
|
||||
return nil
|
||||
case dbpackage.FieldIoIn:
|
||||
m.ClearIoIn()
|
||||
return nil
|
||||
case dbpackage.FieldIoOut:
|
||||
m.ClearIoOut()
|
||||
return nil
|
||||
}
|
||||
return fmt.Errorf("unknown DbPackage nullable field %s", name)
|
||||
}
|
||||
@@ -1325,9 +1778,6 @@ func (m *DbPackageMutation) ResetField(name string) error {
|
||||
case dbpackage.FieldBuildTimeStart:
|
||||
m.ResetBuildTimeStart()
|
||||
return nil
|
||||
case dbpackage.FieldBuildTimeEnd:
|
||||
m.ResetBuildTimeEnd()
|
||||
return nil
|
||||
case dbpackage.FieldUpdated:
|
||||
m.ResetUpdated()
|
||||
return nil
|
||||
@@ -1346,6 +1796,21 @@ func (m *DbPackageMutation) ResetField(name string) error {
|
||||
case dbpackage.FieldDebugSymbols:
|
||||
m.ResetDebugSymbols()
|
||||
return nil
|
||||
case dbpackage.FieldMaxRss:
|
||||
m.ResetMaxRss()
|
||||
return nil
|
||||
case dbpackage.FieldUTime:
|
||||
m.ResetUTime()
|
||||
return nil
|
||||
case dbpackage.FieldSTime:
|
||||
m.ResetSTime()
|
||||
return nil
|
||||
case dbpackage.FieldIoIn:
|
||||
m.ResetIoIn()
|
||||
return nil
|
||||
case dbpackage.FieldIoOut:
|
||||
m.ResetIoOut()
|
||||
return nil
|
||||
}
|
||||
return fmt.Errorf("unknown DbPackage field %s", name)
|
||||
}
|
||||
|
@@ -22,13 +22,17 @@ func (DbPackage) Fields() []ent.Field {
|
||||
field.String("version").Optional(),
|
||||
field.String("repo_version").Optional(),
|
||||
field.Time("build_time_start").Optional(),
|
||||
field.Time("build_time_end").Optional(),
|
||||
field.Time("updated").Optional(),
|
||||
field.String("hash").Optional(),
|
||||
field.Enum("lto").Values("enabled", "unknown", "disabled", "auto_disabled").Default("unknown").Optional(),
|
||||
field.String("last_version_build").Optional(),
|
||||
field.Time("last_verified").Optional(),
|
||||
field.Enum("debug_symbols").Values("available", "unknown", "not_available").Default("unknown").Optional(),
|
||||
field.Int64("max_rss").Optional().Nillable(),
|
||||
field.Int64("u_time").Optional().Nillable(),
|
||||
field.Int64("s_time").Optional().Nillable(),
|
||||
field.Int64("io_in").Optional().Nillable(),
|
||||
field.Int64("io_out").Optional().Nillable(),
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user