(ctx context.Context, step StepRow)
| 122 | } |
| 123 | |
| 124 | func (s *postgresStore) AppendStep(ctx context.Context, step StepRow) error { |
| 125 | _, err := s.db.ExecContext(ctx, ` |
| 126 | INSERT INTO request_steps ( |
| 127 | request_id, step_index, step_type, input_json, output_json, backend, status, error, latency_ms, metadata_json |
| 128 | ) VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10)`, |
| 129 | step.RequestID, step.StepIndex, step.StepType, nullStringBytes(step.InputJSON), nullStringBytes(step.OutputJSON), |
| 130 | step.Backend, step.Status, step.Error, step.LatencyMs, nullStringBytes(step.MetadataJSON), |
| 131 | ) |
| 132 | return err |
| 133 | } |
| 134 | |
| 135 | func nullStringBytes(b []byte) interface{} { |
| 136 | if len(b) == 0 { |
nothing calls this directly
no test coverage detected