ThatAIguyA world of ideas

THE CONSCIOUSNESS ATLAS
Read. Experiment. Follow the evidence.

ConsciousnessLearn · Explore · Joseph Anady

Janady13/missionmatch / internal/platform/database/dbgen/requirements.sql.go

Source identity, revision, and recovered contents.

GitHub sourceSource text recovered

Source identity

FieldRecorded value
Source typeGitHub source
Original recordJanady13/missionmatch / internal/platform/database/dbgen/requirements.sql.go
DateNot specified in source
RepositoryJanady13/missionmatch
Revision720d47fae476b0d38477ae4401697d372b1ea2bc
Branchfeature/opportunity-to-outcome
Path or archive memberinternal/platform/database/dbgen/requirements.sql.go
Original SHA-25665f4000c318a2240c5f7c9df043fa68a8ff989cf83b28cee5c621d73a46385d1
Git blob SHA4b3052c5e84e1657101057fa4413f3e5256f7d04
Reading-copy SHA-25665f4000c318a2240c5f7c9df043fa68a8ff989cf83b28cee5c621d73a46385d1

Original source ↗

Every recorded occurrence

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

Original recordBranch or archiveRevision / identifierOriginal location
Janady13/missionmatch / internal/platform/database/dbgen/requirements.sql.gofeature/opportunity-to-outcome720d47fae476b0d38477ae4401697d372b1ea2bcOpen original
Janady13/missionmatch / internal/platform/database/dbgen/requirements.sql.gocollision-deconfliction4ee5a09972608ed89f8377c6665542d5f450f0a6Open original
Janady13/missionmatch / internal/platform/database/dbgen/requirements.sql.gows6-retrieval6c56e29231ec05735927fa265c97d517499dfeafOpen original
Janady13/missionmatch / internal/platform/database/dbgen/requirements.sql.gom5-price-to-win41000ad30fff4129fdaf5ec84e15ba14c27d4890Open original
Janady13/missionmatch / internal/platform/database/dbgen/requirements.sql.gomaster1e9249840a4302ec82e123b9c9cb6f75badea3e4Open original
Janady13/missionmatch / internal/platform/database/dbgen/requirements.sql.gows8-teaching-loopc823f0fb6bb2aba0f39001eb6de96f4000d9321fOpen original
Janady13/missionmatch / internal/platform/database/dbgen/requirements.sql.gomag-substrateb82c7100a492dec67dfd1eda6b3f53def859be35Open original
Janady13/missionmatch / internal/platform/database/dbgen/requirements.sql.gows3-clearance4b8e7ce594c068621867f9c9deed0ec64ae6c553Open original
Janady13/missionmatch / internal/platform/database/dbgen/requirements.sql.gophase2-eval-fairnessd361af254701975fe239927656ababb56374655eOpen original
Janady13/missionmatch / internal/platform/database/dbgen/requirements.sql.gotime-to-fill-survivalb66e1e505863d4f17741a4b9ede73509e45bd6c6Open original
Janady13/missionmatch / internal/platform/database/dbgen/requirements.sql.gographrag-foundationb0ddeb9f633fd138d09309d1a17b7d13bc3a67f7Open original
Janady13/missionmatch / internal/platform/database/dbgen/requirements.sql.gows9-bench-ingestionf585a9ef32fa554663ce1fba9a414a54b6e49cf0Open original
Janady13/missionmatch / internal/platform/database/dbgen/requirements.sql.gopresentation-readinesseb574acaa29d71ce4d0f852572e87c275c79fdb7Open original
Janady13/missionmatch / internal/platform/database/dbgen/requirements.sql.govendor-intelligencefe9796a19c261951d3f2565206c0c1b5ac294465Open original
Janady13/missionmatch / internal/platform/database/dbgen/requirements.sql.gows7-federal-signal6a9f6ce9cfb13345ffb47770d4960e7c2d9c17c2Open original
Janady13/missionmatch / internal/platform/database/dbgen/requirements.sql.gophase2-connectorse038d4c687aec16f8bd9bc4d907eea14d91f8704Open original
Janady13/missionmatch / internal/platform/database/dbgen/requirements.sql.gofeature/aioe-upgrade2178e7298d0e5d9af83afa12402fd587f0ba6ed8Open original
Janady13/missionmatch / internal/platform/database/dbgen/requirements.sql.gocapture-readinessbae6af7cb2997e819174a9e9cfff5e16067a1975Open original

Recovered source transcript

// Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.31.1 // source: requirements.sql package dbgen import ( "context" "github.com/google/uuid" ) const addRequiredCertification = `-- name: AddRequiredCertification :exec INSERT INTO required_certifications (organization_id, requirement_id, name) VALUES ($1,$2,$3) ON CONFLICT (requirement_id, name) DO NOTHING ` type AddRequiredCertificationParams struct { OrganizationID uuid.UUID `json:"organization_id"` RequirementID uuid.UUID `json:"requirement_id"` Name string `json:"name"` } func (q *Queries) AddRequiredCertification(ctx context.Context, arg AddRequiredCertificationParams) error { _, err := q.db.Exec(ctx, addRequiredCertification, arg.OrganizationID, arg.RequirementID, arg.Name) return err } const addRequiredSkill = `-- name: AddRequiredSkill :exec INSERT INTO required_skills (organization_id, requirement_id, skill_id, mandatory) VALUES ($1,$2,$3,$4) ON CONFLICT (requirement_id, skill_id) DO UPDATE SET mandatory = EXCLUDED.mandatory ` type AddRequiredSkillParams struct { OrganizationID uuid.UUID `json:"organization_id"` RequirementID uuid.UUID `json:"requirement_id"` SkillID uuid.UUID `json:"skill_id"` Mandatory bool `json:"mandatory"` } func (q *Queries) AddRequiredSkill(ctx context.Context, arg AddRequiredSkillParams) error { _, err := q.db.Exec(ctx, addRequiredSkill, arg.OrganizationID, arg.RequirementID, arg.SkillID, arg.Mandatory, ) return err } const createRequirement = `-- name: CreateRequirement :one INSERT INTO requirements ( organization_id, opportunity_id, title, customer_agency, required_level, required_poly, required_years, work_location, remote_allowed, key_personnel ) VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10) RETURNING id, organization_id, opportunity_id, title, customer_agency, required_level, required_poly, required_years, work_location, remote_allowed, key_personnel, created_at, updated_at, deleted_at, labor_category, quantity, required_compartments ` type CreateRequirementParams struct { OrganizationID uuid.UUID `json:"organization_id"` OpportunityID *uuid.UUID `json:"opportunity_id"` Title string `json:"title"` CustomerAgency *string `json:"customer_agency"` RequiredLevel string `json:"required_level"` RequiredPoly string `json:"required_poly"` RequiredYears int32 `json:"required_years"` WorkLocation *string `json:"work_location"` RemoteAllowed bool `json:"remote_allowed"` KeyPersonnel bool `json:"key_personnel"` } func (q *Queries) CreateRequirement(ctx context.Context, arg CreateRequirementParams) (Requirement, error) { row := q.db.QueryRow(ctx, createRequirement, arg.OrganizationID, arg.OpportunityID, arg.Title, arg.CustomerAgency, arg.RequiredLevel, arg.RequiredPoly, arg.RequiredYears, arg.WorkLocation, arg.RemoteAllowed, arg.KeyPersonnel, ) var i Requirement err := row.Scan( &i.ID, &i.OrganizationID, &i.OpportunityID, &i.Title, &i.CustomerAgency, &i.RequiredLevel, &i.RequiredPoly, &i.RequiredYears, &i.WorkLocation, &i.RemoteAllowed, &i.KeyPersonnel, &i.CreatedAt, &i.UpdatedAt, &i.DeletedAt, &i.LaborCategory, &i.Quantity, &i.RequiredCompartments, ) return i, err } const getRequirement = `-- name: GetRequirement :one SELECT id, organization_id, opportunity_id, title, customer_agency, required_level, required_poly, required_years, work_location, remote_allowed, key_personnel, created_at, updated_at, deleted_at, labor_category, quantity, required_compartments FROM requirements WHERE id = $1 AND deleted_at IS NULL ` func (q *Queries) GetRequirement(ctx context.Context, id uuid.UUID) (Requirement, error) { row := q.db.QueryRow(ctx, getRequirement, id) var i Requirement err := row.Scan( &i.ID, &i.OrganizationID, &i.OpportunityID, &i.Title, &i.CustomerAgency, &i.RequiredLevel, &i.RequiredPoly, &i.RequiredYears, &i.WorkLocation, &i.RemoteAllowed, &i.KeyPersonnel, &i.CreatedAt, &i.UpdatedAt, &i.DeletedAt, &i.LaborCategory, &i.Quantity, &i.RequiredCompartments, ) return i, err } const listOpenRequirements = `-- name: ListOpenRequirements :many SELECT r.id, r.organization_id, r.opportunity_id, r.title, r.customer_agency, r.required_level, r.required_poly, r.required_years, r.work_location, r.remote_allowed, r.key_personnel, r.created_at, r.updated_at, r.deleted_at, r.labor_category, r.quantity, r.required_compartments FROM requirements r LEFT JOIN opportunities o ON o.organization_id = r.organization_id AND o.id = r.opportunity_id WHERE r.deleted_at IS NULL AND (o.id IS NULL OR o.status = 'open') ORDER BY r.created_at DESC, r.id DESC LIMIT $1 OFFSET $2 ` type ListOpenRequirementsParams struct { Limit int32 `json:"limit"` Offset int32 `json:"offset"` } // Only requirements whose opportunity is open, plus standalone requirements (NULL opportunity_id), // mirroring the Command Center predicate (o.id IS NULL OR o.status='open'). The LEFT JOIN selects r.* // so the row type stays Requirement. Used by the Opportunity Fit Engine, which scores only OPEN ones. func (q *Queries) ListOpenRequirements(ctx context.Context, arg ListOpenRequirementsParams) ([]Requirement, error) { rows, err := q.db.Query(ctx, listOpenRequirements, arg.Limit, arg.Offset) if err != nil { return nil, err } defer rows.Close() items := []Requirement{} for rows.Next() { var i Requirement if err := rows.Scan( &i.ID, &i.OrganizationID, &i.OpportunityID, &i.Title, &i.CustomerAgency, &i.RequiredLevel, &i.RequiredPoly, &i.RequiredYears, &i.WorkLocation, &i.RemoteAllowed, &i.KeyPersonnel, &i.CreatedAt, &i.UpdatedAt, &i.DeletedAt, &i.LaborCategory, &i.Quantity, &i.RequiredCompartments, ); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const listRequiredCertifications = `-- name: ListRequiredCertifications :many SELECT name FROM required_certifications WHERE requirement_id = $1 ORDER BY name ` func (q *Queries) ListRequiredCertifications(ctx context.Context, requirementID uuid.UUID) ([]string, error) { rows, err := q.db.Query(ctx, listRequiredCertifications, requirementID) if err != nil { return nil, err } defer rows.Close() items := []string{} for rows.Next() { var name string if err := rows.Scan(&name); err != nil { return nil, err } items = append(items, name) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const listRequiredSkills = `-- name: ListRequiredSkills :many SELECT s.id, s.name, rs.mandatory FROM required_skills rs JOIN skills s ON s.id = rs.skill_id WHERE rs.requirement_id = $1 ORDER BY s.name ` type ListRequiredSkillsRow struct { ID uuid.UUID `json:"id"` Name string `json:"name"` Mandatory bool `json:"mandatory"` } func (q *Queries) ListRequiredSkills(ctx context.Context, requirementID uuid.UUID) ([]ListRequiredSkillsRow, error) { rows, err := q.db.Query(ctx, listRequiredSkills, requirementID) if err != nil { return nil, err } defer rows.Close() items := []ListRequiredSkillsRow{} for rows.Next() { var i ListRequiredSkillsRow if err := rows.Scan(&i.ID, &i.Name, &i.Mandatory); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const listRequirements = `-- name: ListRequirements :many SELECT id, organization_id, opportunity_id, title, customer_agency, required_level, required_poly, required_years, work_location, remote_allowed, key_personnel, created_at, updated_at, deleted_at, labor_category, quantity, required_compartments FROM requirements WHERE deleted_at IS NULL ORDER BY created_at DESC, id DESC LIMIT $1 OFFSET $2 ` type ListRequirementsParams struct { Limit int32 `json:"limit"` Offset int32 `json:"offset"` } // id is a unique trailing sort key so the order is total: ties on created_at no longer leave the // LIMIT/OFFSET cut and the downstream Best Fit pick nondeterministic. func (q *Queries) ListRequirements(ctx context.Context, arg ListRequirementsParams) ([]Requirement, error) { rows, err := q.db.Query(ctx, listRequirements, arg.Limit, arg.Offset) if err != nil { return nil, err } defer rows.Close() items := []Requirement{} for rows.Next() { var i Requirement if err := rows.Scan( &i.ID, &i.OrganizationID, &i.OpportunityID, &i.Title, &i.CustomerAgency, &i.RequiredLevel, &i.RequiredPoly, &i.RequiredYears, &i.WorkLocation, &i.RemoteAllowed, &i.KeyPersonnel, &i.CreatedAt, &i.UpdatedAt, &i.DeletedAt, &i.LaborCategory, &i.Quantity, &i.RequiredCompartments, ); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil }

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