Skip to content

Fix GetCountry ToLower index skip #84

Description

@adedw

What to build

The GetCountryQuery handler compares c.ISO3Code.ToLower().Equals(...), which translates to LOWER() on both sides of the predicate — the index on the char(3) PK is not used. Compare the ISO3 code directly against the PK column (WHERE iso3 = @p) and handle case-insensitivity client-side (PK is char(3); string.Equals(..., StringComparison.OrdinalIgnoreCase) after fetch).

Acceptance criteria

  • Generated SQL compares the PK column directly — no LOWER() on the indexed side (verifiable via query plan or logged SQL).
  • Country lookup remains case-insensitive from the caller's perspective.
  • Build and app smoke pass.

Blocked by

None (can start immediately).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agentFully specified, ready for an AFK agent

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions