MCPcopy Create free account
hub / github.com/InferCore/InferCore / AppendStep

Method AppendStep

internal/requests/postgres.go:124–133  ·  view source on GitHub ↗
(ctx context.Context, step StepRow)

Source from the content-addressed store, hash-verified

122}
123
124func (s *postgresStore) AppendStep(ctx context.Context, step StepRow) error {
125 _, err := s.db.ExecContext(ctx, `
126INSERT 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
135func nullStringBytes(b []byte) interface{} {
136 if len(b) == 0 {

Callers

nothing calls this directly

Calls 1

nullStringBytesFunction · 0.85

Tested by

no test coverage detected