(ctx context.Context)
| 251 | } |
| 252 | |
| 253 | func (gcu *GitCommitUpdate) sqlSave(ctx context.Context) (n int, err error) { |
| 254 | _spec := sqlgraph.NewUpdateSpec(gitcommit.Table, gitcommit.Columns, sqlgraph.NewFieldSpec(gitcommit.FieldID, field.TypeUUID)) |
| 255 | if ps := gcu.mutation.predicates; len(ps) > 0 { |
| 256 | _spec.Predicate = func(selector *sql.Selector) { |
| 257 | for i := range ps { |
| 258 | ps[i](selector) |
| 259 | } |
| 260 | } |
| 261 | } |
| 262 | if value, ok := gcu.mutation.UpdateTime(); ok { |
| 263 | _spec.SetField(gitcommit.FieldUpdateTime, field.TypeTime, value) |
| 264 | } |
| 265 | if value, ok := gcu.mutation.CommitHash(); ok { |
| 266 | _spec.SetField(gitcommit.FieldCommitHash, field.TypeString, value) |
| 267 | } |
| 268 | if value, ok := gcu.mutation.BranchName(); ok { |
| 269 | _spec.SetField(gitcommit.FieldBranchName, field.TypeString, value) |
| 270 | } |
| 271 | if value, ok := gcu.mutation.RepoName(); ok { |
| 272 | _spec.SetField(gitcommit.FieldRepoName, field.TypeString, value) |
| 273 | } |
| 274 | if value, ok := gcu.mutation.CommitMessage(); ok { |
| 275 | _spec.SetField(gitcommit.FieldCommitMessage, field.TypeString, value) |
| 276 | } |
| 277 | if value, ok := gcu.mutation.CommitTimestamp(); ok { |
| 278 | _spec.SetField(gitcommit.FieldCommitTimestamp, field.TypeTime, value) |
| 279 | } |
| 280 | if value, ok := gcu.mutation.Author(); ok { |
| 281 | _spec.SetField(gitcommit.FieldAuthor, field.TypeString, value) |
| 282 | } |
| 283 | if gcu.mutation.AuthorCleared() { |
| 284 | _spec.ClearField(gitcommit.FieldAuthor, field.TypeString) |
| 285 | } |
| 286 | if value, ok := gcu.mutation.Timestamp(); ok { |
| 287 | _spec.SetField(gitcommit.FieldTimestamp, field.TypeTime, value) |
| 288 | } |
| 289 | if gcu.mutation.TimestampCleared() { |
| 290 | _spec.ClearField(gitcommit.FieldTimestamp, field.TypeTime) |
| 291 | } |
| 292 | if value, ok := gcu.mutation.PrNumber(); ok { |
| 293 | _spec.SetField(gitcommit.FieldPrNumber, field.TypeString, value) |
| 294 | } |
| 295 | if gcu.mutation.PrNumberCleared() { |
| 296 | _spec.ClearField(gitcommit.FieldPrNumber, field.TypeString) |
| 297 | } |
| 298 | if gcu.mutation.ResultsCleared() { |
| 299 | edge := &sqlgraph.EdgeSpec{ |
| 300 | Rel: sqlgraph.O2M, |
| 301 | Inverse: false, |
| 302 | Table: gitcommit.ResultsTable, |
| 303 | Columns: []string{gitcommit.ResultsColumn}, |
| 304 | Bidi: false, |
| 305 | Target: &sqlgraph.EdgeTarget{ |
| 306 | IDSpec: sqlgraph.NewFieldSpec(ciworkflowresult.FieldID, field.TypeUUID), |
| 307 | }, |
| 308 | } |
| 309 | _spec.Edges.Clear = append(_spec.Edges.Clear, edge) |
| 310 | } |
nothing calls this directly
no test coverage detected