(ctx context.Context, row RequestRow)
| 89 | } |
| 90 | |
| 91 | func (s *sqliteStore) CreateRequest(ctx context.Context, row RequestRow) error { |
| 92 | _, err := s.db.ExecContext(ctx, ` |
| 93 | INSERT INTO requests ( |
| 94 | request_id, trace_id, request_type, tenant_id, task_type, priority, pipeline_ref, |
| 95 | input_json, context_json, ai_request_json, policy_snapshot_json, status, selected_backend, route_reason, |
| 96 | created_at, updated_at |
| 97 | ) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)`, |
| 98 | row.RequestID, row.TraceID, row.RequestType, row.TenantID, row.TaskType, row.Priority, row.PipelineRef, |
| 99 | string(row.InputJSON), string(row.ContextJSON), string(row.AIRequestJSON), string(row.PolicySnapshot), row.Status, row.SelectedBackend, row.RouteReason, |
| 100 | row.CreatedAt.UnixMilli(), row.UpdatedAt.UnixMilli(), |
| 101 | ) |
| 102 | return err |
| 103 | } |
| 104 | |
| 105 | func (s *sqliteStore) UpdateRequest(ctx context.Context, requestID string, patch RequestPatch) error { |
| 106 | r, err := s.GetRequest(ctx, requestID) |
nothing calls this directly
no outgoing calls
no test coverage detected