ThatAIguyA world of ideas

THE CONSCIOUSNESS ATLAS
Read. Experiment. Follow the evidence.

ConsciousnessLearn · Explore · Joseph Anady

Janady13/missionmatch / db/queries/opportunity_records.sql

Source identity, revision, and recovered contents.

GitHub sourceSource text recovered

Source identity

FieldRecorded value
Source typeGitHub source
Original recordJanady13/missionmatch / db/queries/opportunity_records.sql
DateNot specified in source
RepositoryJanady13/missionmatch
Revision720d47fae476b0d38477ae4401697d372b1ea2bc
Branchfeature/opportunity-to-outcome
Path or archive memberdb/queries/opportunity_records.sql
Original SHA-256d4ef23e855ef4fcc0047bccb8041c6094847086b7bd23abf7926eea7734a0188
Git blob SHAea43ed6faf9410e6a629e1572f44fe2b3e30c8a3
Reading-copy SHA-256d4ef23e855ef4fcc0047bccb8041c6094847086b7bd23abf7926eea7734a0188

Original source ↗

Every recorded occurrence

These 15 records contain identical original source bytes. Their paths and revisions remain part of the archive.

Original recordBranch or archiveRevision / identifierOriginal location
Janady13/missionmatch / db/queries/opportunity_records.sqlfeature/opportunity-to-outcome720d47fae476b0d38477ae4401697d372b1ea2bcOpen original
Janady13/missionmatch / db/queries/opportunity_records.sqlcollision-deconfliction4ee5a09972608ed89f8377c6665542d5f450f0a6Open original
Janady13/missionmatch / db/queries/opportunity_records.sqlm5-price-to-win41000ad30fff4129fdaf5ec84e15ba14c27d4890Open original
Janady13/missionmatch / db/queries/opportunity_records.sqlmaster1e9249840a4302ec82e123b9c9cb6f75badea3e4Open original
Janady13/missionmatch / db/queries/opportunity_records.sqlws8-teaching-loopc823f0fb6bb2aba0f39001eb6de96f4000d9321fOpen original
Janady13/missionmatch / db/queries/opportunity_records.sqlmag-substrateb82c7100a492dec67dfd1eda6b3f53def859be35Open original
Janady13/missionmatch / db/queries/opportunity_records.sqltime-to-fill-survivalb66e1e505863d4f17741a4b9ede73509e45bd6c6Open original
Janady13/missionmatch / db/queries/opportunity_records.sqlgraphrag-foundationb0ddeb9f633fd138d09309d1a17b7d13bc3a67f7Open original
Janady13/missionmatch / db/queries/opportunity_records.sqlws9-bench-ingestionf585a9ef32fa554663ce1fba9a414a54b6e49cf0Open original
Janady13/missionmatch / db/queries/opportunity_records.sqlpresentation-readinesseb574acaa29d71ce4d0f852572e87c275c79fdb7Open original
Janady13/missionmatch / db/queries/opportunity_records.sqlvendor-intelligencefe9796a19c261951d3f2565206c0c1b5ac294465Open original
Janady13/missionmatch / db/queries/opportunity_records.sqlws7-federal-signal6a9f6ce9cfb13345ffb47770d4960e7c2d9c17c2Open original
Janady13/missionmatch / db/queries/opportunity_records.sqlphase2-connectorse038d4c687aec16f8bd9bc4d907eea14d91f8704Open original
Janady13/missionmatch / db/queries/opportunity_records.sqlfeature/aioe-upgrade2178e7298d0e5d9af83afa12402fd587f0ba6ed8Open original
Janady13/missionmatch / db/queries/opportunity_records.sqlcapture-readinessbae6af7cb2997e819174a9e9cfff5e16067a1975Open original

Recovered source transcript

-- Opportunity Intelligence unified records. Global public catalog (no organization_id, outside RLS): -- reads run straight off the pool, writes come from cmd/opp-sync as the migrator role. -- name: UpsertOpportunityRecord :exec INSERT INTO opportunity_records ( source_name, source_record_id, dedupe_key, record_kind, title, agency, sub_agency, naics, psc, pop_city, pop_state, pop_country, pop_zip, set_aside, set_aside_code, contract_vehicle, estimated_value, value_source, incumbent_name, incumbent_uei, posted_date, response_deadline, award_date, estimated_award_date, pop_start_date, pop_end_date, ui_link, is_planning, raw_object_key, raw_sha256, fetched_at, synced_at ) VALUES ( $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, now() ) ON CONFLICT (source_name, source_record_id) DO UPDATE SET dedupe_key = EXCLUDED.dedupe_key, record_kind = EXCLUDED.record_kind, title = EXCLUDED.title, agency = EXCLUDED.agency, sub_agency = EXCLUDED.sub_agency, naics = EXCLUDED.naics, psc = EXCLUDED.psc, pop_city = EXCLUDED.pop_city, pop_state = EXCLUDED.pop_state, pop_country = EXCLUDED.pop_country, pop_zip = EXCLUDED.pop_zip, set_aside = EXCLUDED.set_aside, set_aside_code = EXCLUDED.set_aside_code, contract_vehicle = EXCLUDED.contract_vehicle, estimated_value = EXCLUDED.estimated_value, value_source = EXCLUDED.value_source, incumbent_name = EXCLUDED.incumbent_name, incumbent_uei = EXCLUDED.incumbent_uei, posted_date = EXCLUDED.posted_date, response_deadline = EXCLUDED.response_deadline, award_date = EXCLUDED.award_date, estimated_award_date = EXCLUDED.estimated_award_date, pop_start_date = EXCLUDED.pop_start_date, pop_end_date = EXCLUDED.pop_end_date, ui_link = EXCLUDED.ui_link, is_planning = EXCLUDED.is_planning, raw_object_key = EXCLUDED.raw_object_key, raw_sha256 = EXCLUDED.raw_sha256, fetched_at = EXCLUDED.fetched_at, synced_at = now(); -- name: GetOpportunityRecord :one SELECT * FROM opportunity_records WHERE id = $1; -- name: OpportunityRecordMeta :one SELECT COUNT(*)::bigint AS total, MAX(synced_at) AS last_synced FROM opportunity_records; -- name: ListOpportunityRecords :many -- Optional filters (NULL array = no filter). Soonest closing first, then most recently posted, then id -- as a unique tiebreaker so the order is deterministic. Text equality filters compare upper() on both -- sides; the service upper cases the params so casing drift cannot silently zero out results. The -- optional missions filter keeps a record only when a federal_mission_tag links it to one of the named -- mission codes; a NULL missions array means no mission filter, so the default path is unchanged. SELECT * FROM opportunity_records WHERE (sqlc.narg('kinds')::text[] IS NULL OR record_kind = ANY(sqlc.narg('kinds')::text[])) AND (sqlc.narg('naics')::text[] IS NULL OR naics = ANY(sqlc.narg('naics')::text[])) AND (sqlc.narg('agencies')::text[] IS NULL OR upper(agency) = ANY(sqlc.narg('agencies')::text[])) AND (sqlc.narg('states')::text[] IS NULL OR upper(pop_state) = ANY(sqlc.narg('states')::text[])) AND (sqlc.narg('missions')::text[] IS NULL OR EXISTS ( SELECT 1 FROM federal_mission_tags t WHERE t.record_table = 'opportunity_records' AND t.record_id = opportunity_records.id::text AND t.mission_code = ANY(sqlc.narg('missions')::text[]))) ORDER BY (response_deadline IS NULL OR response_deadline < now()), response_deadline ASC, posted_date DESC NULLS LAST, id LIMIT sqlc.arg('lim')::int;

Search equations, builds, manuscript text, and recovered sources.