Skip to content

Bug: Missing commas in Scan() calls - database/postgres.go (ingestion & api services) #14

@pragnyanramtha

Description

@pragnyanramtha

Description

Multiple Scan() calls in both ingestion-service and api-service database layers are missing commas between struct fields, causing compilation errors.

Affected Files

  • backend/ingestion-service/internal/database/postgres.go (lines 94-97)
  • backend/api-service/internal/database/postgres.go (lines 150-157, 186-190, 209-211)

Example Error

In ingestion-service/internal/database/postgres.go:

// Line 96 - Missing comma between &event.ProcessingStatus and &event.ProcessedAt
err := db.conn.QueryRow(query, source, sourceID).Scan(
    &event.ID, &event.Source, &event.SourceID, &event.EventType,
    &rawDataJSON, &event.Author, &event.Channel, &event.ReceivedAt,
    &event.ProcessingStatus &event.ProcessedAt, &event.ErrorMessage, &event.ErrorCount,
    //                     ^^^ Missing comma here
)

Impact

  • Code does not compile
  • Blocks all database operations (StoreEvent, GetEventBySourceID, GetPendingEvents)
  • Similar issue in api-service affects GetEventHistory, GetEntities, GetEntityDetails

Suggested Fix

Add missing commas between struct field references in all Scan() calls.

Labels

bug, backend,priority-critical

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions