1
0
forked from ALHP/ALHP.GO

added debuginfod support

This commit is contained in:
2022-02-13 22:33:57 +01:00
parent 45672e3459
commit c7ba7340a5
13 changed files with 372 additions and 22 deletions

View File

@@ -266,6 +266,26 @@ func (dpu *DbPackageUpdate) ClearLastVerified() *DbPackageUpdate {
return dpu
}
// SetDebugSymbols sets the "debug_symbols" field.
func (dpu *DbPackageUpdate) SetDebugSymbols(ds dbpackage.DebugSymbols) *DbPackageUpdate {
dpu.mutation.SetDebugSymbols(ds)
return dpu
}
// SetNillableDebugSymbols sets the "debug_symbols" field if the given value is not nil.
func (dpu *DbPackageUpdate) SetNillableDebugSymbols(ds *dbpackage.DebugSymbols) *DbPackageUpdate {
if ds != nil {
dpu.SetDebugSymbols(*ds)
}
return dpu
}
// ClearDebugSymbols clears the value of the "debug_symbols" field.
func (dpu *DbPackageUpdate) ClearDebugSymbols() *DbPackageUpdate {
dpu.mutation.ClearDebugSymbols()
return dpu
}
// Mutation returns the DbPackageMutation object of the builder.
func (dpu *DbPackageUpdate) Mutation() *DbPackageMutation {
return dpu.mutation
@@ -348,6 +368,11 @@ func (dpu *DbPackageUpdate) check() error {
return &ValidationError{Name: "lto", err: fmt.Errorf(`ent: validator failed for field "DbPackage.lto": %w`, err)}
}
}
if v, ok := dpu.mutation.DebugSymbols(); ok {
if err := dbpackage.DebugSymbolsValidator(v); err != nil {
return &ValidationError{Name: "debug_symbols", err: fmt.Errorf(`ent: validator failed for field "DbPackage.debug_symbols": %w`, err)}
}
}
return nil
}
@@ -532,6 +557,19 @@ func (dpu *DbPackageUpdate) sqlSave(ctx context.Context) (n int, err error) {
Column: dbpackage.FieldLastVerified,
})
}
if value, ok := dpu.mutation.DebugSymbols(); ok {
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
Type: field.TypeEnum,
Value: value,
Column: dbpackage.FieldDebugSymbols,
})
}
if dpu.mutation.DebugSymbolsCleared() {
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
Type: field.TypeEnum,
Column: dbpackage.FieldDebugSymbols,
})
}
if n, err = sqlgraph.UpdateNodes(ctx, dpu.driver, _spec); err != nil {
if _, ok := err.(*sqlgraph.NotFoundError); ok {
err = &NotFoundError{dbpackage.Label}
@@ -789,6 +827,26 @@ func (dpuo *DbPackageUpdateOne) ClearLastVerified() *DbPackageUpdateOne {
return dpuo
}
// SetDebugSymbols sets the "debug_symbols" field.
func (dpuo *DbPackageUpdateOne) SetDebugSymbols(ds dbpackage.DebugSymbols) *DbPackageUpdateOne {
dpuo.mutation.SetDebugSymbols(ds)
return dpuo
}
// SetNillableDebugSymbols sets the "debug_symbols" field if the given value is not nil.
func (dpuo *DbPackageUpdateOne) SetNillableDebugSymbols(ds *dbpackage.DebugSymbols) *DbPackageUpdateOne {
if ds != nil {
dpuo.SetDebugSymbols(*ds)
}
return dpuo
}
// ClearDebugSymbols clears the value of the "debug_symbols" field.
func (dpuo *DbPackageUpdateOne) ClearDebugSymbols() *DbPackageUpdateOne {
dpuo.mutation.ClearDebugSymbols()
return dpuo
}
// Mutation returns the DbPackageMutation object of the builder.
func (dpuo *DbPackageUpdateOne) Mutation() *DbPackageMutation {
return dpuo.mutation
@@ -878,6 +936,11 @@ func (dpuo *DbPackageUpdateOne) check() error {
return &ValidationError{Name: "lto", err: fmt.Errorf(`ent: validator failed for field "DbPackage.lto": %w`, err)}
}
}
if v, ok := dpuo.mutation.DebugSymbols(); ok {
if err := dbpackage.DebugSymbolsValidator(v); err != nil {
return &ValidationError{Name: "debug_symbols", err: fmt.Errorf(`ent: validator failed for field "DbPackage.debug_symbols": %w`, err)}
}
}
return nil
}
@@ -1079,6 +1142,19 @@ func (dpuo *DbPackageUpdateOne) sqlSave(ctx context.Context) (_node *DbPackage,
Column: dbpackage.FieldLastVerified,
})
}
if value, ok := dpuo.mutation.DebugSymbols(); ok {
_spec.Fields.Set = append(_spec.Fields.Set, &sqlgraph.FieldSpec{
Type: field.TypeEnum,
Value: value,
Column: dbpackage.FieldDebugSymbols,
})
}
if dpuo.mutation.DebugSymbolsCleared() {
_spec.Fields.Clear = append(_spec.Fields.Clear, &sqlgraph.FieldSpec{
Type: field.TypeEnum,
Column: dbpackage.FieldDebugSymbols,
})
}
_node = &DbPackage{config: dpuo.config}
_spec.Assign = _node.assignValues
_spec.ScanValues = _node.scanValues