(ctx context.Context, parentKey string)
| 403 | } |
| 404 | |
| 405 | func (c *PostgreSQLDependentCache) commit(ctx context.Context, parentKey string) error { |
| 406 | log := logger.FromContext(ctx) |
| 407 | |
| 408 | _, err := c.pool.Exec( |
| 409 | ctx, |
| 410 | "UPDATE dependent_values SET committed = TRUE WHERE parent_key = $1 AND NOT committed", |
| 411 | parentKey, |
| 412 | ) |
| 413 | if err != nil { |
| 414 | log.Errorw("Error committing dependent values", |
| 415 | "parentKey", parentKey, |
| 416 | "err", err, |
| 417 | ) |
| 418 | return err |
| 419 | } |
| 420 | |
| 421 | return nil |
| 422 | } |
| 423 | |
| 424 | func (c *PostgreSQLDependentCache) rollback(ctx context.Context, parentKey string) error { |
| 425 | log := logger.FromContext(ctx) |
nothing calls this directly
no test coverage detected