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

Method CreateRequest

internal/requests/sqlite.go:91–103  ·  view source on GitHub ↗
(ctx context.Context, row RequestRow)

Source from the content-addressed store, hash-verified

89}
90
91func (s *sqliteStore) CreateRequest(ctx context.Context, row RequestRow) error {
92 _, err := s.db.ExecContext(ctx, `
93INSERT 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
105func (s *sqliteStore) UpdateRequest(ctx context.Context, requestID string, patch RequestPatch) error {
106 r, err := s.GetRequest(ctx, requestID)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected