# ListProductVariants

## Overview

ListProductVariants retrieves all variant records for a given product. Used during variant generation to detect existing combinations and skip duplicates, ensuring idempotent generation.

## Business Rules

- Searches ProductVariant table for all records matching the given productId
- Returns all matching variant records as an array, including axis value combination and linked Item ID
- Returns an empty array if the product has no variants

## Process Flow

```mermaid
flowchart TD
    A[Receive productId] --> B[SELECT from ProductVariant where productId = input]
    B --> C{Variants found?}
    C -->|Yes| D[Return variant records]
    C -->|No| E[Return empty array]
```

## External Dependencies

- None

## Error Scenarios

None

## Test Cases

- returns variants when found
- returns empty array when no variants
