ThatAIguyA world of ideas

THE CONSCIOUSNESS ATLAS
Read. Experiment. Follow the evidence.

ConsciousnessLearn · Explore · Joseph Anady

Janady13/missionmatch / internal/platform/database/dbgen/opportunities.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/opportunities.sql.go
DateNot specified in source
RepositoryJanady13/missionmatch
Revision720d47fae476b0d38477ae4401697d372b1ea2bc
Branchfeature/opportunity-to-outcome
Path or archive memberinternal/platform/database/dbgen/opportunities.sql.go
Original SHA-2567b20aee1d62bb2e092734daac475630a9fd5080f3b699d46944715a462646704
Git blob SHA46e5df22b6287f98905f3fd8cf6bad2ca9cfefc9
Reading-copy SHA-2567b20aee1d62bb2e092734daac475630a9fd5080f3b699d46944715a462646704

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/opportunities.sql.gofeature/opportunity-to-outcome720d47fae476b0d38477ae4401697d372b1ea2bcOpen original
Janady13/missionmatch / internal/platform/database/dbgen/opportunities.sql.gocollision-deconfliction4ee5a09972608ed89f8377c6665542d5f450f0a6Open original
Janady13/missionmatch / internal/platform/database/dbgen/opportunities.sql.gows6-retrieval6c56e29231ec05735927fa265c97d517499dfeafOpen original
Janady13/missionmatch / internal/platform/database/dbgen/opportunities.sql.gom5-price-to-win41000ad30fff4129fdaf5ec84e15ba14c27d4890Open original
Janady13/missionmatch / internal/platform/database/dbgen/opportunities.sql.gomaster1e9249840a4302ec82e123b9c9cb6f75badea3e4Open original
Janady13/missionmatch / internal/platform/database/dbgen/opportunities.sql.gows8-teaching-loopc823f0fb6bb2aba0f39001eb6de96f4000d9321fOpen original
Janady13/missionmatch / internal/platform/database/dbgen/opportunities.sql.gomag-substrateb82c7100a492dec67dfd1eda6b3f53def859be35Open original
Janady13/missionmatch / internal/platform/database/dbgen/opportunities.sql.gows3-clearance4b8e7ce594c068621867f9c9deed0ec64ae6c553Open original
Janady13/missionmatch / internal/platform/database/dbgen/opportunities.sql.gophase2-eval-fairnessd361af254701975fe239927656ababb56374655eOpen original
Janady13/missionmatch / internal/platform/database/dbgen/opportunities.sql.gotime-to-fill-survivalb66e1e505863d4f17741a4b9ede73509e45bd6c6Open original
Janady13/missionmatch / internal/platform/database/dbgen/opportunities.sql.gographrag-foundationb0ddeb9f633fd138d09309d1a17b7d13bc3a67f7Open original
Janady13/missionmatch / internal/platform/database/dbgen/opportunities.sql.gows9-bench-ingestionf585a9ef32fa554663ce1fba9a414a54b6e49cf0Open original
Janady13/missionmatch / internal/platform/database/dbgen/opportunities.sql.gopresentation-readinesseb574acaa29d71ce4d0f852572e87c275c79fdb7Open original
Janady13/missionmatch / internal/platform/database/dbgen/opportunities.sql.govendor-intelligencefe9796a19c261951d3f2565206c0c1b5ac294465Open original
Janady13/missionmatch / internal/platform/database/dbgen/opportunities.sql.gows7-federal-signal6a9f6ce9cfb13345ffb47770d4960e7c2d9c17c2Open original
Janady13/missionmatch / internal/platform/database/dbgen/opportunities.sql.gophase2-connectorse038d4c687aec16f8bd9bc4d907eea14d91f8704Open original
Janady13/missionmatch / internal/platform/database/dbgen/opportunities.sql.gofeature/aioe-upgrade2178e7298d0e5d9af83afa12402fd587f0ba6ed8Open original
Janady13/missionmatch / internal/platform/database/dbgen/opportunities.sql.gocapture-readinessbae6af7cb2997e819174a9e9cfff5e16067a1975Open original

Recovered source transcript

// Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.31.1 // source: opportunities.sql package dbgen import ( "context" "github.com/google/uuid" "github.com/jackc/pgx/v5/pgtype" ) const createOpportunity = `-- name: CreateOpportunity :one INSERT INTO opportunities (organization_id, name, solicitation_number, customer_agency, due_date, status) VALUES ($1,$2,$3,$4,$5,$6) RETURNING id, organization_id, name, solicitation_number, customer_agency, due_date, status, created_at, updated_at, value, value_source, federal_ref ` type CreateOpportunityParams struct { OrganizationID uuid.UUID `json:"organization_id"` Name string `json:"name"` SolicitationNumber *string `json:"solicitation_number"` CustomerAgency *string `json:"customer_agency"` DueDate pgtype.Date `json:"due_date"` Status string `json:"status"` } func (q *Queries) CreateOpportunity(ctx context.Context, arg CreateOpportunityParams) (Opportunity, error) { row := q.db.QueryRow(ctx, createOpportunity, arg.OrganizationID, arg.Name, arg.SolicitationNumber, arg.CustomerAgency, arg.DueDate, arg.Status, ) var i Opportunity err := row.Scan( &i.ID, &i.OrganizationID, &i.Name, &i.SolicitationNumber, &i.CustomerAgency, &i.DueDate, &i.Status, &i.CreatedAt, &i.UpdatedAt, &i.Value, &i.ValueSource, &i.FederalRef, ) return i, err } const getOpportunity = `-- name: GetOpportunity :one SELECT id, organization_id, name, solicitation_number, customer_agency, due_date, status, created_at, updated_at, value, value_source, federal_ref FROM opportunities WHERE id = $1 ` func (q *Queries) GetOpportunity(ctx context.Context, id uuid.UUID) (Opportunity, error) { row := q.db.QueryRow(ctx, getOpportunity, id) var i Opportunity err := row.Scan( &i.ID, &i.OrganizationID, &i.Name, &i.SolicitationNumber, &i.CustomerAgency, &i.DueDate, &i.Status, &i.CreatedAt, &i.UpdatedAt, &i.Value, &i.ValueSource, &i.FederalRef, ) return i, err } const listOpportunities = `-- name: ListOpportunities :many SELECT id, organization_id, name, solicitation_number, customer_agency, due_date, status, created_at, updated_at, value, value_source, federal_ref FROM opportunities ORDER BY created_at DESC, id DESC LIMIT $1 OFFSET $2 ` type ListOpportunitiesParams struct { Limit int32 `json:"limit"` Offset int32 `json:"offset"` } func (q *Queries) ListOpportunities(ctx context.Context, arg ListOpportunitiesParams) ([]Opportunity, error) { rows, err := q.db.Query(ctx, listOpportunities, arg.Limit, arg.Offset) if err != nil { return nil, err } defer rows.Close() items := []Opportunity{} for rows.Next() { var i Opportunity if err := rows.Scan( &i.ID, &i.OrganizationID, &i.Name, &i.SolicitationNumber, &i.CustomerAgency, &i.DueDate, &i.Status, &i.CreatedAt, &i.UpdatedAt, &i.Value, &i.ValueSource, &i.FederalRef, ); err != nil { return nil, err } items = append(items, i) } if err := rows.Err(); err != nil { return nil, err } return items, nil } const listRequirementsForOpportunity = `-- name: ListRequirementsForOpportunity :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 opportunity_id = $1 AND deleted_at IS NULL ORDER BY created_at DESC, id DESC ` func (q *Queries) ListRequirementsForOpportunity(ctx context.Context, opportunityID *uuid.UUID) ([]Requirement, error) { rows, err := q.db.Query(ctx, listRequirementsForOpportunity, opportunityID) 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 proposalReadiness = `-- name: ProposalReadiness :many SELECT sm.band, sm.decision, COUNT(*) AS n FROM requirements r JOIN slates s ON s.requirement_id = r.id JOIN slate_members sm ON sm.slate_id = s.id WHERE r.opportunity_id = $1 GROUP BY sm.band, sm.decision ORDER BY sm.band, sm.decision ` type ProposalReadinessRow struct { Band string `json:"band"` Decision string `json:"decision"` N int64 `json:"n"` } // Band/decision rollup across every slate member under one opportunity's requirements, the source // for GET /proposal-readiness [review COMPL-2]. RLS scopes all three tables to the caller's org. func (q *Queries) ProposalReadiness(ctx context.Context, opportunityID *uuid.UUID) ([]ProposalReadinessRow, error) { rows, err := q.db.Query(ctx, proposalReadiness, opportunityID) if err != nil { return nil, err } defer rows.Close() items := []ProposalReadinessRow{} for rows.Next() { var i ProposalReadinessRow if err := rows.Scan(&i.Band, &i.Decision, &i.N); 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.