Source identity
| Field | Recorded value |
|---|---|
| Source type | GitHub source |
| Original record | Janady13/missionmatch / db/queries/evaluations.sql |
| Date | Not specified in source |
| Repository | Janady13/missionmatch |
| Revision | 09015496d565a172bcaa15cfe9a8e4b072b13df0 |
| Branch | workstream-b-screenmatch |
| Path or archive member | db/queries/evaluations.sql |
| Original SHA-256 | c1267dcc9b9e64b19247bf1b67b7f92a3cadd90f6a9b5b493665c71cd573a4c3 |
| Git blob SHA | afe777744abd9171f491358b95c3f20f4f837f2c |
| Reading-copy SHA-256 | c1267dcc9b9e64b19247bf1b67b7f92a3cadd90f6a9b5b493665c71cd573a4c3 |
Every recorded occurrence
These 3 records contain identical original source bytes. Their paths and revisions remain part of the archive.
| Original record | Branch or archive | Revision / identifier | Original location |
|---|---|---|---|
| Janady13/missionmatch / db/queries/evaluations.sql | workstream-b-screenmatch | 09015496d565a172bcaa15cfe9a8e4b072b13df0 | Open original |
| Janady13/missionmatch / db/queries/evaluations.sql | workstream-c-slatematch | 5cd60c918301b46ecd6ed3e03e20c395da0062e2 | Open original |
| Janady13/missionmatch / db/queries/evaluations.sql | workstream-b-screenmatch | 09015496d565a172bcaa15cfe9a8e4b072b13df0 | Open original |
Recovered source transcript
Download complete source text ↓45 lines · 2.1 KB
-- name: UpsertCandidateEvaluation :exec
-- Upsert the latest screenMATCH qualification for one (candidate, requirement) pair. A fresh screen
-- overwrites the prior row so there is exactly one current evaluation per pair, which missionMATCH
-- reads instead of recomputing. evaluated_at is preserved as the first time the pair was screened;
-- updated_at moves to now() on every rescreen.
INSERT INTO candidate_evaluations (
organization_id, candidate_id, requirement_id,
total_score, band,
clearance_score, skills_score, certs_score, customer_score, experience_score, location_score,
explanation, matched_skills, gap_summary, model_version, evaluated_by
) VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16)
ON CONFLICT (organization_id, candidate_id, requirement_id) DO UPDATE SET
total_score = EXCLUDED.total_score,
band = EXCLUDED.band,
clearance_score = EXCLUDED.clearance_score,
skills_score = EXCLUDED.skills_score,
certs_score = EXCLUDED.certs_score,
customer_score = EXCLUDED.customer_score,
experience_score = EXCLUDED.experience_score,
location_score = EXCLUDED.location_score,
explanation = EXCLUDED.explanation,
matched_skills = EXCLUDED.matched_skills,
gap_summary = EXCLUDED.gap_summary,
model_version = EXCLUDED.model_version,
evaluated_by = EXCLUDED.evaluated_by,
updated_at = now();
-- name: GetCandidateEvaluation :one
SELECT * FROM candidate_evaluations
WHERE candidate_id = $1 AND requirement_id = $2;
-- name: ListEvaluationsForRequirement :many
-- The persisted screenMATCH qualifications for one requirement, best first. missionMATCH coverage and
-- the persisted ranked view read this rather than rescore the pool.
SELECT * FROM candidate_evaluations
WHERE requirement_id = $1
ORDER BY total_score DESC, candidate_id;
-- name: ListLatestEvaluationsByCandidate :many
-- The persisted qualifications for one candidate across requirements, best first (who can support
-- which mission today, read from the stored artifact).
SELECT * FROM candidate_evaluations
WHERE candidate_id = $1
ORDER BY total_score DESC, requirement_id;